Skip to content
Discussion options

You must be logged in to vote

pandoc.utils.stringify() is about transforming AST content to strings. As doc says:

Converts the given element (Pandoc, Meta, Block, or Inline) into a string with all formatting removed.

You either need to keep the block.content and 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 the block.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 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@produnis
Comment options

Answer selected by produnis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lua Issues related to the lua codebase, filter chain, etc
2 participants