Make your Org exports blend in
Go to file
2024-04-21 17:51:12 +08:00
logo.svg Initial commit 2021-08-30 04:59:04 +08:00
ox-chameleon.el Work with multiple HTML content classes 2024-04-21 17:51:12 +08:00
README.org Mention required LaTeX setup in readme 2022-09-27 12:20:28 +08:00

Org Chameleon Export

Sometimes you want your exports to blend in with your Emacs theme.

/tec/ox-chameleon/media/branch/master/logo.svg

This currently only works with LaTeX exports, but it would be nice if more formats could be supported in future. To use with LaTeX just change the documents #+latex_class to use the pseudo-class chameleon and org-latex-default-class will be used with some extra generated preamble content to make the result similar to your buffer 🙂.

Required ox-latex tweaks

For ox-chameleon to work, two things are needed:

  1. Some KOMA-script tooling, provided by either

    1. Using a KOMA class, such as scrartcl, scrrept, or scrbook
    2. Adding the scrextend package
  2. The xcolor package, if its not already part of the preamble

To add packages to the LaTeX preamble globally, you can use org-latex-packages-alist like so

(add-to-list 'org-latex-packages-alist '("" "scrextend" nil))
(add-to-list 'org-latex-packages-alist '("" "xcolor" nil))

Alternatively, you can just add them to documents where ox-chameleon is used, like so

#+latex_header: \usepackage{scrextend}
#+latex_header: \usepackage{xcolor}