mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 11:57:16 +00: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.
555 B
555 B
% 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}"
]
]