Next: , Previous: Index entries, Up: Markup

11.6 Macro replacement

You can define text snippets with

     #+MACRO: name   replacement text $1, $2 are arguments

which can be referenced anywhere in the document (even in code examples) with {{{name(arg1,arg2)}}}. In addition to defined macros, {{{title}}}, {{{author}}}, etc., will reference information set by the #+TITLE:, #+AUTHOR:, and similar lines. Also, {{{date(FORMAT)}}} and {{{modification-time(FORMAT)}}} refer to current date time and to the modification time of the file being exported, respectively. FORMAT should be a format string understood by format-time-string.

Macro expansion takes place during export, and some people use it to construct complex HTML code.