Skip to content

Is it possible to remove the caption from HTML tables in PDF output? #10677

Answered by cscheid
lballabio asked this question in Q&A
Discussion options

You must be logged in to vote

(I'm guessing that's because it's an HTML table?)

Yes, but not exactly. Here's what's going on, and how to learn to diagnose these issues in the future.

First, do this to your document front matter:

---
title: "table demo"
jupyter: python3
keep-md: true
keep-tex: true
format: pdf
---

My local file is called 10677.qmd, so:

  • keep-md: true will keep a file called 10677.pdf.md in your file system.
  • keep-tex: true will keep 10677.tex

10677.pdf.md

df always emits HTML tables, apparently. The relevant outputs are:

df

::: {.cell execution_count=2}
``` {.python .cell-code}
df
```

::: {.cell-output .cell-output-display execution_count=8}

```{=html}
<div>
<style scoped>
    .dataframe tbody tr …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lballabio
Comment options

Answer selected by lballabio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants