Org Mode Syntax

Basics

Biggest heading

New chapter.

Bigger heading

New section.

Big heading

New sub-section.

Text breaks

By entering two consecutive backslashes, you can force to break lines
without starting a new paragraph.

For an horizontal line, insert at least 5 dashes: this is some text above an horizontal rule


and some text below it.

Numbered headings

You can create numbered headings up to a certain level by setting an option:

#+OPTIONS: H:4

Lists

Org markup allows you to create bulleted or numbered lists. It allows any combination of the two list types.

Unordered lists

Itemized lists are marked with bullets. They are convenient to:

  • organize data, and
  • make the document
    • prettier, and
    • easier to read.

Create them with a minus or a plus sign.

Ordered lists

Enumerated lists are marked with numbers or letters:

  1. First element
    1. First sub-item
    2. Last sub-item
  2. Second element

You can have ordered lists with jumping numbers:

  1. First
  2. Second
  3. Jump to 5th

Definition lists

Definition list
List containing definitions.
Term to define
Explication of the term.

Checkboxes

  • First item not checked
  • Second item half done
    • Another first
    • Another second
  • Third item checked

Miscellaneous effects

Include Org files

You can include another Org file and skip its title by using the :lines argument to #+INCLUDE:

#+INCLUDE: chapter1.org :lines "2-"

File inclusion, through INCLUDE keywords, is an export-only feature.

Inline HTML

You can include raw HTML in your Org documents and it will get kept as HTML when it's exported. XXX

Text can be preformatted (in a fixed-width font).

#+begin_info
*Info example* \\
Did you know...
#+end_info

Inline LaTeX

You can also use raw LaTeX. XXX

Text can be preformatted (in a fixed-width font).

Centered text

This text is centered!

Code blocks

/*
 * Application that displays a "Hello" message to the standard output.
 */
int main(int arc, char **argv)
{
  printf("Hello, %s!\n", (argc>1) ? argv[1] : "World");
  return 0;
}

Formatting text

Quotations

Use the quote block to typeset quoted text.

Everything should be made as simple as possible, but not any simpler – Albert Einstein

In a verse environment, there is an implicit line break at the end of each line, and indentation and vertical space are preserved:

Everything should be made as simple as possible,
but not any simpler – Albert Einstein

Mathematical formulae

You can embed LaTeX math formatting in Org mode files using the following syntax:

  • For inline math expressions, use \(...\): \(x^2\) or \(1 < 2\).

    It's not advised to use the constructs $...$ (both for Org and MathJax).

  • Centered display equation (the Euler theorem):

    \[ \int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}} \]

    The use of \[...\] is for mathematical expressions which you want to make stand out, on their own lines.

    LaTeX allows to inline such \[...\] constructs (quadratic formula): \[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \]

    Double dollar signs ($$) should not be used.

Comments

It's possible to add comments in the document.

Tables

Table 1: An example of table
Header 1 Header 2 Header 3
Top left Top middle  
    Right
Bottom left Bottom middle  
Table 2: Table with alignment
1 2 3
right center left
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx

Images

affine_and_perspective_transformation.jpg
Figure 1: Affine and perspective transformation

Org miscellaneous

Dates

Timestamps: [2014-01-16 Thu] and <2014-01-16 Thu>.

DONE [A] Buy GTD book   online

By default, DONE actions will be collapsed.

TODO [A] Read GTD book

TODO [B] Apply GTD methodoloy

Org macros

This text is colored in blue.

This other text is in red.

Find more macros on GitHub.

Footnotes:

1

Extensively used in large documents.

2

footnotes 2