1

In emacs, is it possible to configure an "org" file to have different exporting behaviors depending on the output format?

For example: I'd like to export equations as itself for LaTeX, but as images (I believe it is achieved with the option tex:imagemagick) when exporting to HTML.

Dox
  • 497
  • 4
  • 14
  • Please note that we consider cross-posting to different Stack Exchange sites to be abusive behavior. So if you cross-posted the same question (I cannot find it on U&L, if you did this), please delete (or flag for deletion) all duplicates. – Daniel Beck Oct 12 '13 at 21:57
  • @DanielBeck It looks like I was a bit too trigger-happy here. Consider http://unix.stackexchange.com/q/94619/2465 Interestingly, the U&L question was closed briefly for that reason (U&L has a specific close reason "posted on multiple sites"), so I wasn't the only one who thought they were very similar. **Dox**, it might be better when you do something like this in the future to *clearly* differentiate the questions from one another, to avoid such mishaps. – user Oct 12 '13 at 22:08
  • @MichaelKjörling Right, thanks for clarifying. I already assumed this based on your comments being deleted. OTOH I wanted to clarify the cross-posting policy in general, given that Dox writes: "*and additionally it's a different group*". – Daniel Beck Oct 12 '13 at 22:19

1 Answers1

1

If the behavior you want can somehow be implemented by code added to the heading of the output file, you have various tags to work with like #+LATEX_HEADER, #+LATEX_CLASS_OPTIONS or #+HTML_HEAD (depending on the version of org-mode). Check the general org-mode documentation for more details.

If that's not good enough, and you need to roll your own back-end, see the Org Export Documentation.

Many other potentially useful suggestions can be found over at these related questions:

Brian Z
  • 1,090
  • 10
  • 20