-
DescriptionI have a project written in an Rmd file where the chunks that display visualizations in the document look like this. Unfortunately, this does not work when used in Quarto. I am familiar with the '#|' way of specifying figure characteristics. The best solution for me would not require modifying all the chunks. Is it possible to work with the pure LaTeX figure environment? \begin{figure}
\label{fig-theFigure} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````qmd
---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
The end.
```` |
Beta Was this translation helpful? Give feedback.
You can't do that with Quarto. It may have worked with R Markdown and knitr but probaby as a side effect because in some cases knitr will generate some LaTeX code directly (which will be mixed with yours).
here Quarto will always include image using Markdown syntax

So your are mixing markdown with LaTeX.Quarto has all the tool you need to produce a figure environment with caption and cross reference from a chunk. You just need to use the right syntax.
will produce