diff --git a/docs/output-formats/pdf-basics.qmd b/docs/output-formats/pdf-basics.qmd index c2448d20ec..3d79f498ac 100644 --- a/docs/output-formats/pdf-basics.qmd +++ b/docs/output-formats/pdf-basics.qmd @@ -222,9 +222,11 @@ With fonts with appropriate support, Greek symbols render correctly in headings, ## Raw LaTeX -When creating a PDF document, Pandoc allows the use of [raw LaTeX](https://pandoc.org/MANUAL.html#extension-raw_tex) directives intermixed with markdown. For example: +When creating a PDF document, Pandoc allows the use of [raw LaTeX](https://pandoc.org/MANUAL.html#extension-raw_tex) directives intermixed with markdown. +Although Pandoc allows LaTeX to appear unescaped in Markdown, we instead recommend to wrap the content in a raw block. For example: -``` tex +```` markdown +```{=latex} \begin{tabular}{|l|l|}\hline Age & Frequency \\ \hline 18--25 & 15 \\ @@ -232,7 +234,9 @@ Age & Frequency \\ \hline 36--45 & 22 \\ \hline \end{tabular} ``` +```` +Raw LaTeX can be specified as a block element (as shown above), or as an inline element, such as `` `\textrm{hello}`{=latex} ``. Raw LaTeX commands will be preserved and passed unchanged to the LaTeX writer. ::: callout-warning