2

I have some code snippets within an org file:

#+BEGIN_SRC python
print 42
#+END_SRC

When exporting to HTML (org-export-dispatch), the syntax highlighting seems to follow my current theme, but the background of the code block remains pure white (and as I'm using a dark theme, makes the code quite unreadable).

From what I've seen htmlize.el (https://github.com/hniksic/emacs-htmlize) is supposed to help. I can call htmlize-buffer and indeed I get a page that has the right background colour, but it's just a "raw" copy of my buffer and not a proper Org export.

How should I go about to make org-export-dispatch use htmlize only for the source code blocks ?

FWIW I'm using Emacs 24.5.1

Your Answer

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

Browse other questions tagged or ask your own question.