Skip to content

How do I use Pandoc to convert Latex to HTML such that the source code snippets inside Latex keep syntax highlighting in HTML? #10285

Answered by massifrg
minoush82 asked this question in Q&A
Discussion options

You must be logged in to vote

The output is right, but you have no CSS attached to your HTML, because without the -s/--standalone option you only get a HTML fragment.

Try this instead:

pandoc -s -N -f latex -t html example.tex -o example.html

and you should see the output in colors.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by minoush82
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