简体   繁体   中英

Tweak pandoc highlighting for C#

I use Pandoc for Markdown compiling. But it seems that the integrated syntax highlighter doesn't know about the var C# keyword and doesn't highlight it when compiled into PDF:

pandoc foo.md -o foo.pdf

Is there any way how to tweak the Pandoc syntax highlighter?

There are some instructions for doing this at the end of the README for highlighting-kate . Note that you'll have to recompile the library and pandoc, so this is only a good solution if you have a Haskell build environment set up and don't mind compiling pandoc from source.

In pandoc 1.12 (which I hope will be out this month), there will be an easy way to specify python "filters" that operate directly on the parsed document; so, for example, you could write a short filter that calls pygments to highlight code blocks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM