pandoc seems to understand a ton of programming languages (as evidenced by the output of pandoc --list-highlight-languages) - but I've been unable to "highlight" the entire file.
What I'm trying to do is something like
$ pandoc -s -t latex -o t.tex t.c
but it doesn't come out syntax-highlighted - at best it packs my source code into verbatim.
Save 1.md with contents:
```c
Save 2.md with contents:
```
Then:
pandoc -s -o t.tex 1.md t.c 2.md
See also https://pandoc.org/MANUAL.html#syntax-highlighting
Or you can use a filter like the following: https://github.com/owickstrom/pandoc-include-code
For future questions, please use the pandoc-discuss mailing list instead of this issue tracker. Thanks!
Another option is to use the skylighting executable provided with the skylighting package.
$ cabal install skylighting
. . . . .
Haddock skylighting-0.8.2 (lib)
Installing skylighting-0.8.2 (lib)
Completed skylighting-0.8.2 (lib)
Warning: You asked to install executables, but there are no executables in
target: skylighting. Perhaps you want to use --lib to install libraries
instead.
Thank you, very helpful. Following the guidance (added -fexecutable to Cabal invocation), it works now!
Most helpful comment
Another option is to use the
skylightingexecutable provided with the skylighting package.