-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Bug description
I try to generate a LaTeX table in Julia using PrettyTables.jl
This creates the LaTeX code for the \begin{tabular} ... \end{tabular} sections.
-
If I use
#| output: truethat gets inserted in averbatimenvironment, which prints the LaTeX code in the final document, which is not what I want. It does include thetableenvironment and adds a caption and label as expected, though. I can use the@tbl-labelmethod to cross-reference in this case. -
If I use
#| output: asisthe output is inserted as is (as expected). This renders a nice table, however, then I don't get thetableenvironment and no caption and label. -
I use 2, and add the
\begin{table},\caption,\labelbefore the block and the\end{table}after. Then I get the correct table, incl. caption, but I cannot use the@tbl-labelto crossreference, which is annoying, since I want to use HTML export as well. For LaTeX\ref{tbl-label}works, but then I'd need to add the "Table" in front of that and it would need more trickery to switch to HTML export.
Is there a way to either make (1) not use the verbatim environment, or (2) honour the float options #| label and #| tbl-cap:?
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.