Skip to content

Table subcaptions with math symbols in quarto PDF #10088

Closed Answered by cscheid
zbig-karp asked this question in Q&A
Discussion options

You must be logged in to vote

This is the keep-md: true output:

---
title: Hello
format: pdf
keep-tex: true
keep-md: true
---


::: {#tbl-example .cell layout-ncol="2" tbl-cap='Some caption' tbl-subcap='["$\\\\langle M_xM_y\\\\rangle$","$\\\\langle M_xL_y\\\\rangle$"]'}

```{.r .cell-code}
library(knitr)
library(kableExtra)

kable(matrix(1:4, ncol = 2))
```

::: {.cell-output-display}

\begin{tabular}{r|r}
\hline
1 & 3\\
\hline
2 & 4\\
\hline
\end{tabular}


:::

```{.r .cell-code}
kable(matrix(1:4, ncol = 2))
```

::: {.cell-output-display}

\begin{tabular}{r|r}
\hline
1 & 3\\
\hline
2 & 4\\
\hline
\end{tabular}


:::
:::

and this is the relevant part of the resulting .tex file:

\begin{document}
\maketitle


\begin{…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mcanouil
Comment options

@cscheid
Comment options

Answer selected by mcanouil
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
tables Issues with Tables including the gt integration latex LaTeX engines related libraries and technologies math any issue related to math support in specific formats
3 participants