extension latex_macros substitutes macros except for PDF meta data #11548
-
|
Hi, I believe this is a bug, but I am not sure, therefore I am posting here. When i process with Is it a feature that all LaTeX macros are replaced by an empty string in title-meta, when this is derived from title? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
PDF metadata can't contain LaTeX commands, so when we encounter a RawInline "latex", we strip it out. Now, you might say, "A" is not a command, it's just regular text. But it's still in a RawInline "latex" element. Perhaps I'd suggest using a different approach, e.g. a Lua filter and a span with a class. |
Beta Was this translation helpful? Give feedback.
PDF metadata can't contain LaTeX commands, so when we encounter a RawInline "latex", we strip it out.
https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/Writers/LaTeX.hs#L187-L188
stringifyis what is getting rid of the RawInline "latex" element.https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/Shared.hs#L364-L375
Now, you might say, "A" is not a command, it's just regular text. But it's still in a RawInline "latex" element. Perhaps
stringifycould be taught to make some fine distinctions, but it's the kind of thing that could have unexpected consequences.I'd suggest using a different approach, e.g. a Lua filter and a span with a class.