Syntax recognized by mlorg

Tienson Qin2018/09/21

1 Directives

Directives are a way to put metadata into your document, for instance the title and the author: #+BEGINEXAMPLE #+TITLE: Test #+AUTHOR: Testman #+ENDEXAMPLE There is no list of directive name, you can do whatever it is (as long as it is not a keyword). You can refer to them after in the document by a macro {{{DIRECTIVE_NAME()}}}.

Moreover the special directive MACRO is used to define a new macro. Its syntax is : #+MACRO: macro-name Contents which can refer to argument using \(1, ..., \)k

Example: : #+MACRO: test Some $1 $2 : gives #+MACRO: test Some $1 $2

Macro management is case-insensitive.

2 Keywords

Keywords are a way to attach metadata to blocks (such as name). They follow the same syntax as directives and should be placed before a block.

: #+NAME: Some name : This paragraph is named. Isn't it nice ?

Exporters ignore all keywords at the moment and they may be used to retrieve special blocks in the document.

List of accepted keywords: ATTR_ASCII, ATTR_DOCBOOK, ATTR_HTML, ATTR_LATEX, ATTR_ODT, CAPTION, DATA, HEADER, HEADERS, LABEL, NAME, PLOT, RESNAME, RESULT, RESULTS, SOURCE, SRCNAME and TBLNAME.

On top of that, one has the following translation (if you enter a keyword on the left, it will be as if you typed the corresponding keyword): - DATA -> NAME - LABEL -> NAME - RESNAME -> NAME - SOURCE -> NAME - SRCNAME -> NAME - TBLNAME -> NAME - RESULT -> RESULTS - HEADERS -> HEADER

3 Drawers

Drawers a way to hide information in org-mode. The syntax is: : :DRAWERNAME: : Contents of the drawer (socks for instance) : :END:

There is a special kind of drawer that mlorg recognizes, it is the PROPERTY drawer, which look like: : :PROPERTIES: : :KEY: Value : :KEY: Value : :KEY: Value : :END: They are used to store information about a heading and can be used to filter on them. (Exporters don't use them as of today)

4 LaTeX

You can insert LaTeX blocks by:

: \(\)Your big formulas\(\)

eg,

$$\sum_{k=1}^{+\infty} \frac 1 {k^2} = \frac{\pi^2} 6$$

or you can insert plain LaTeX environment

: options : Contents :

Whenever possible, you should use custom blocks, that get exported to latex environment in LaTeX-based outputs, and are more portable (in HTML, they are exported as div that you can style or script).

5 Conclusion

Most syntactical constructs of org-mode should be documented here. However org-mode is very complex and evolves rapidly. If you think that there is a missing construct or that a construct is not handled the way it should, please send an email.

0