Next: , Previous: , Up: Exporting   [Contents]

12.8 LaTeX Export

The LaTeX export back-end can handle complex documents, incorporate standard or custom LaTeX document classes, generate documents using alternate LaTeX engines, and produce fully linked PDF files with indexes, bibliographies, and tables of contents, destined for interactive online viewing or high-quality print publication.

By default, the LaTeX output uses the article class. You can change this by adding an option like ‘#+LATEX_CLASS: myclass’ in your file. The class must be listed in org-latex-classes.

C-c C-e l l

Export to a LaTeX file with a ‘.tex’ extension. For ‘’, Org exports to ‘myfile.tex’, overwriting without warning.

C-c C-e l p

Export as LaTeX file and convert it to PDF file.

C-c C-e l o

Export as LaTeX file and convert it to PDF, then open the PDF using the default viewer.

The LaTeX export back-end can insert any arbitrary LaTeX code, see Embedded LaTeX. There are three ways to embed such code in the Org file and they all use different quoting syntax.

Inserting in-line quoted with @ symbols:

Code embedded in-line @@latex:any arbitrary LaTeX code@@ in a paragraph.

Inserting as one or more keyword lines in the Org file:

#+LATEX: any arbitrary LaTeX code

Inserting as an export block in the Org file, where the back-end exports any code between begin and end markers:

  any arbitrary LaTeX code