This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Up: Math formatting in ODT export


Working with LaTeX math snippets

LaTeX math snippets (see LaTeX fragments) can be embedded in an ODT document in one of the following ways:

  1. MathML

    Add this line to the Org file. This option is activated on a per-file basis.

              #+OPTIONS: LaTeX:t
    

    With this option, LaTeX fragments are first converted into MathML fragments using an external LaTeX-to-MathML converter program. The resulting MathML fragments are then embedded as an OpenDocument Formula in the exported document.

    To specify the LaTeX-to-MathML converter, customize the variables org-latex-to-mathml-convert-command and org-latex-to-mathml-jar-file.

    To use MathToWeb1 as the preferred converter, configure the above variables as

              (setq org-latex-to-mathml-convert-command
                    "java -jar %j -unicode -force -df %o %I"
                    org-latex-to-mathml-jar-file
                    "/path/to/mathtoweb.jar")
    

    To use LaTeXML2 use

              (setq org-latex-to-mathml-convert-command
                    "latexmlmath \"%i\" --presentationmathml=%o")
    

    To quickly verify the reliability of the LaTeX-to-MathML converter, use the following commands:

    M-x org-odt-export-as-odf RET
    Convert a LaTeX math snippet to an OpenDocument formula (.odf) file.
    M-x org-odt-export-as-odf-and-open RET
    Convert a LaTeX math snippet to an OpenDocument formula (.odf) file and open the formula file with the system-registered application.

  2. PNG images

    Add this line to the Org file. This option is activated on a per-file basis.

              #+OPTIONS: tex:dvipng
    
              #+OPTIONS: tex:dvisvgm
    

    or:

              #+OPTIONS: tex:imagemagick
    

    Under this option, LaTeX fragments are processed into PNG or SVG images and the resulting images are embedded in the exported document. This method requires dvipng program, dvisvgm or imagemagick programs.


Footnotes

[1] See MathToWeb.

[2] See http://dlmf.nist.gov/LaTeXML/.