DescriptionHi there, I have a question about Lua scripting. Please take a look at my "Cheatsheet" extension on GitHub: Cheatsheet Extension. This extension produces a PDF file and introduces a filter where the following Quarto syntax: is rendered to a TikZ picture node. The issue I'm facing is that Is there an alternative method to retain formatting? As seen in this example, I currently have to resort to: to achieve proper output. However, this becomes cumbersome, especially when dealing with complex mathematical formulas. Any suggestions or insights would be greatly appreciated! |
Replies: 1 comment 1 reply
|
You either need to keep the If you want to build a LaTeX Hope this helps clarify the behavior you are seeing. |
pandoc.utils.stringify()is about transforming AST content to strings. As doc says:You either need to keep the
block.contentand add around it some AST content, then let Pandoc do the writing to the output format. Lua filters for Pandoc are all about modifying the document content in its normalized AST form, so you need to build around this.If you want to build a LaTeX
pandoc.RawBlock()in Lua from theblock.content, you must directly convert it to LaTeX from within Lua filter.pandoc.write()lets you do that, providing the right options.Hope this helps clarify the behavior you are …