I'm developing some videos for my Introduction to Computing class, and as part of that I'll have lots and lots of slides of code with its output. I'd like to apply some syntax highlighting to emphasize reserved words, functions, variables, strings, and comments.

Doing that manually is going to take a couple eternities. Are there any automated tools online that will do this effectively? I've found a couple, but they either (a) focused exclusively on formatting, not highlighting, or (b) didn't result in copyable output.

  • 1
    What programming languages need to be covered? How much would you be willing to pay – or must it come free of cost? Speaking of "copyable output", what (target) format are you thinking of?
    – Izzy
    Sep 8, 2016 at 6:06
  • 1
    Which slide show program do you use? In case you're using LaTeX Beamer, there are packages for highlighting code. I don't know about formatting, though. Maybe this could be integrated via scripting (e.g. using Lua).
    – ComFreek
    Sep 8, 2016 at 11:00
  • Programming language is Python. If there's a paid product, I'd be open to seeing if the school will fund it! The target format will be PowerPoint.
    – David
    Sep 8, 2016 at 22:54
  • You can look at some of the work flows proposed here webapps.stackexchange.com/q/19241/41289 Sep 15, 2016 at 18:38

1 Answer 1


The python pygments includes a utility pygmentize that can syntax highlight a large number of programming languages to the command prompt or to HTML. LaTex or RTF.

pygmentize -f html /path/to/file.py

Would syntax highlight your file into html and output to the console or you can pipe it to a file.

There are lots of options to customise the output.

Python and Pygments are both Free, Gratis & Open Source and cross platform.

  • Thank you! I'll look into that!
    – David
    Sep 8, 2016 at 22:55

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.