Prevent Quarto from wrapping LaTeX code in a table
environment
#9332
Replies: 2 comments 9 replies
-
I don't think you can do that and keep your table being a cross-reference at the same time. |
Beta Was this translation helpful? Give feedback.
-
Another use case/question for using
Is that the approach we should be using until the dust settles on I experimented with conditional chunk options and conditional cross reference container divs:
but those don't seem to work :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi everyone,
How can I stop Quarto from enclosing LaTeX code in a table environment when using the
tbl-cap
andlabel
chunk options?Background: I maintain a package to create tables in
R
. My users want to usetbl-cap
andlabel
chunk options to specify captions and labels in consistent fashion across output formats.This works well in HTML and markdown formats. For LaTeX, however, Quarto automatically wraps the code in a floating
table
environment. This breaks my package LaTeX code, which relies on thetabularray
package to produce "long" tables that cannot be included in a floating environment liketable
.I would like to retrieve the value of chunk options and process those internally in my package. The retrieval can be done easily with
knitr::opts_current$get()
. All I am missing is a way to prevent Quarto wrapping.Thanks!
Example:
Beta Was this translation helpful? Give feedback.
All reactions