Skip to content

Commit c70a3f5

Browse files
authored
Update pdf-basics.qmd (#1671)
1 parent 342bb8d commit c70a3f5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/output-formats/pdf-basics.qmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,21 @@ With fonts with appropriate support, Greek symbols render correctly in headings,
222222

223223
## Raw LaTeX
224224

225-
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:
225+
When creating a PDF document, Pandoc allows the use of [raw LaTeX](https://pandoc.org/MANUAL.html#extension-raw_tex) directives intermixed with markdown.
226+
Although Pandoc allows LaTeX to appear unescaped in Markdown, we instead recommend to wrap the content in a raw block. For example:
226227

227-
``` tex
228+
```` markdown
229+
```{=latex}
228230
\begin{tabular}{|l|l|}\hline
229231
Age & Frequency \\ \hline
230232
18--25 & 15 \\
231233
26--35 & 33 \\
232234
36--45 & 22 \\ \hline
233235
\end{tabular}
234236
```
237+
````
235238

239+
Raw LaTeX can be specified as a block element (as shown above), or as an inline element, such as `` `\textrm{hello}`{=latex} ``.
236240
Raw LaTeX commands will be preserved and passed unchanged to the LaTeX writer.
237241

238242
::: callout-warning

0 commit comments

Comments
 (0)