Skip to content

RawBlock not found by pandoc depending on how file is passed (tex to html) #10270

Closed Answered by tarleb
Pecnut asked this question in Q&A
Discussion options

You must be logged in to vote

Pandoc tries to guess the input format based of the filename extension, so it uses the latex reader in your second case above. If there is no input filename, as in the first case, then pandoc defaults to markdown.

The LaTeX reader skips TeX commands that it cannot handle, while the Markdown reader puts all LaTeX blocks in the RawBlock elements that are then processed by the filter. You could try to set --from=markdown or --from=latex+raw_tex when using an input file with a .tex extension. Enabling the +raw_tex extension on the LaTeX reader ensures that unknown TeX blocks are kept around instead of just being skipped.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Pecnut
Comment options

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

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants