Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I recently stumbled upon Emacs' org mode for taking notes and I am interested in using it. I wish to keep my notes in an org file and publish them in html for reading.

But I also wish to include Latex formulae into my notes.

So far I have been able to export plain text in my org file into HTML and export latex notes in another org file into a latex pdf.

But Latex formulae are not displayed when I export my document to HTML. This is what I tried to get my Latex into HTML

    #+TITLE:     NOTES
    #+AUTHOR:    [Smiling Buddha]
    #+DATE:      2013-08-22 Thu
    #+LANGUAGE:  en
    #+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
    #+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
    #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:
    #+EXPORT_SELECT_TAGS: export
    #+EXPORT_EXCLUDE_TAGS: noexport
    #+STARTUP: indent
    #+LaTeX: \usepackage{amsmath} 

    \sqrt{x}  = 4

However the HTML document just displays the title of the document and the authors name.

Latex formula $\sqrt{x}=4$ is not generated. Does anyone know how to do this?

share|improve this question

org-mode uses MathJax to typeset the TeX when exported to html. To that end, in your org file you should have something like Hello world \(e^{-i\pi) = 1\) which should be exported correctly.

share|improve this answer

To expand on Dror's answer:

#+BEGIN_LaTeX ... #+END_LaTeX only applies when exporting to latex. It allows for backend specific code when exporting (by the same concept #+Begin_HTML ... #+END_HTML does the same for HTML code.

The full set of environments that allow for LaTeX code to be generated on export can be found in the Org Manual.

LaTeX fragments don't need any special marking at all. The following snippets will be identified as LaTeX source code:

  • Environments of any kind. The only requirement is that the \begin and \end statements appear on a new line, at the beginning of the line or after whitespaces only.
  • Text within the usual LaTeX math delimiters. To avoid conflicts with currency specifications, single ‘$’ characters are only recognized as math delimiters if the enclosed text contains at most two line breaks, is directly attached to the ‘$’ characters with no whitespace in between, and if the closing ‘$’ is followed by whitespace, punctuation or a dash. For the other delimiters, there is no such restriction, so when in doubt, use ‘(...)’ as inline math delimiters.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.