Empty table sub-captions when rendering to PDF (kableExtra) #4206
Replies: 2 comments 2 replies
-
A look at the intermediate markdown suggests kableExtra is doing something to how the format is detected. The knitr tables end up in pipe format, and the kableExtra ones in latex. Intermediate markdown
One fix is to explicitly specify the format argument in
I'm not sure exactly why this happens, but it is worth noting if you flip the order of your tables so the kableExtra ones are first, the kable ones end up with the same problem. |
Beta Was this translation helpful? Give feedback.
-
(Just in passing, I'll note that if you want crossrefs to work with these figures, you'll need your labels to start with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm attempting to use the
kableExtra
package to make two sub-tables but empty sub-captions are being created.An easy workaround is to split the tables into Table 1 and Table 2 (likely makes more sense anyway)
but thought I'd share this behaviour I don't understand.
In my project I use other
kableExtra
functions but consider this toy example to show the issue.In the first chunk, knitr will create two tables, 1.(a) and 1.(b).
For the second chunk, the kable function is seemingly identical and a re-export of the knitr package.
However, it leads to duplication of captions where 1.(a) and 1.(b) are blank whereas 1.(c) and 1.(d) are the desired subcaps.
Off-topic, what are people's goto for rendering tables to PDF in Quarto?
I like
gt
but not sure how good the LaTeX functionality is.Beta Was this translation helpful? Give feedback.
All reactions