6

Currently I have a bunch of code snippets in my Org-based presentation. I'm exporting them with ox-reveal, but the exported code doesn't have any syntax highlighting. Is there any way to:

  1. have syntax highlighting in code blocks in org-mode?
  2. ensure that the syntax highlighting is carried through to the exported HTML?
4

You can enable syntax highlighting of code blocks in org-mode by setting org-src-fontify-natively to t.

That will probably not help exporting to ox-reveal. In any case "normal" HTML export syntax highlighting (without ox-reveal) is enabled by default if you have htmlize.el installed, so it may be worthwile checking if you have htmlize installed. See this answer on SO

  • Indeed it does, I had been using #+begin_example instead of #+begin_src with the language spec. – stsquad Oct 17 '14 at 10:02

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.