I want to publish a project in Emacs org-mode, which contains several .html files. There are some python code examples in them that I wanna highlight. But htmlize.el won't do that for me. Strangely, when exporting single .html file (using C-c C-e h), the code examples are highlighted . So how could I get htmlize.el work for project publishing?
10
votes
3 Answers
4
votes
In your org-publish-project-alist
, set the htmlized-source
property to non-nil:
(setq org-publish-project-alist
'(("my-project"
:base-directory ...
:htmlized-source t
...
)))
See the Publishing action section of the Org-mode manual.
3
votes
:htmlized-source t
as Dave Bacher suggested does not work for me. I have the most recent version of htmlize.el (1.56) installed, but still in the exactly same situation as you were. – Jordan He