mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
74f583847f
Fix `rawTeXParser`. Make macro expansion in raw LaTeX depend on the setting of the `latex_macros` extension. Previously macros were always expanded, even in raw TeX in markdown. In addition, there was previously a bug that caused content to be garbled in certain cases. Closes #11253. Handle `ifstrequal` at a lower level, like the other `if` commands. See #11253.
28 lines
555 B
Markdown
28 lines
555 B
Markdown
```
|
|
% pandoc -f markdown -t native
|
|
\ifstrequal{hello}{hello}{TRUE}{FALSE}
|
|
\ifstrequal{hello}{world}{TRUE}{FALSE}
|
|
^D
|
|
[ Para
|
|
[ RawInline (Format "tex") "TRUE"
|
|
, SoftBreak
|
|
, RawInline (Format "tex") "FALSE"
|
|
]
|
|
]
|
|
```
|
|
|
|
```
|
|
% pandoc -f markdown-latex_macros -t native
|
|
\ifstrequal{hello}{hello}{TRUE}{FALSE}
|
|
\ifstrequal{hello}{world}{TRUE}{FALSE}
|
|
^D
|
|
[ Para
|
|
[ RawInline
|
|
(Format "tex") "\\ifstrequal{hello}{hello}{TRUE}{FALSE}"
|
|
, SoftBreak
|
|
, RawInline
|
|
(Format "tex") "\\ifstrequal{hello}{world}{TRUE}{FALSE}"
|
|
]
|
|
]
|
|
```
|