0

am using pandoc along with LaTex to create pdf output.

I am highlighting some code using ` backticks.

The text within the backtick is just highlighted using a different font.

How can I change the color of the highlighted text along with the background color.

Note that this is for in-line highlighting.

1

At the Pandoc user guide you can find that:

Pandoc will automatically highlight syntax in fenced code blocks that are marked with a language name. The Haskell library highlighting-kate is used for highlighting, which works in HTML, Docx, and LaTeX/PDF output. To see a list of language names that pandoc will recognize, type pandoc --list-highlight-languages.

The color scheme can be selected using the --highlight-style option. The default color scheme is pygments, which imitates the default color scheme used by the Python library pygments (though pygments is not actually used to do the highlighting). To see a list of highlight styles, type pandoc --list-highlight-styles.

To disable highlighting, use the --no-highlight option.

Your answer is right there, if I run pandoc --list-highlight-styles I get:

pygments
tango
espresso
zenburn
kate
monochrome
breezedark
haddock

Your question is for inline highlighting, but you should change for the three backticks syntax if you want customized code highlighting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.