Macro Support

Last modified by Vincent Massol on 2026/08/30 19:43

Reference

These macros are given a LaTeX equivalent of their own when a page is exported. Any other macro is exported as the content it renders to, unless an extension supplies a LaTeX template for it — see Add Support for a Macro.

MacroWhat the export produces
tocA table of contents. With scope="local", the table of contents of the section it sits in.
codeA syntax-coloured code block, typeset with the minted LaTeX package.
info, warning, error, successA coloured box carrying the macro's title parameter, one colour per macro. Used inline, the four produce styled text instead of a box.
formulaA LaTeX formula, provided the LaTeX Template for the Formula macro extension is installed. The LaTeX extension itself does not carry that template.
idA LaTeX label, which a cross-reference elsewhere in the document can point to.
footnoteA LaTeX footnote. LaTeX places the footnotes itself, so the putFootnotes macro that goes with it produces nothing.
containerA multiple-column layout, for layoutStyle="columns". A container with any other layout style exports as its plain content.

Table of Contents

= Heading1 =

{{toc scope=local/}}

== Heading2 ==

=== Heading3 ===

{{toc/}}

toc-macro-output.png

Code

{{code language='java'}}
public class HelloWorld
{
 public static void main(String[] args) {
  System.out.println("Hello World!");
 }
}
{{/code}}

code-macro-output.png

Message Boxes

{{info}}info{{/info}}

{{warning}}info{{/warning}}

{{error}}info{{/error}}

{{success}}info{{/success}}

message-macros-output.png

Multiple Columns

Each group of the container becomes a column. The paragraphs are cut short here; the compiled result below is the one the full paragraphs produce.

Hello world

{{container layoutStyle="columns"}}
(((
Lorem ipsum dolor sit amet, consectetur adipiscing elit. [...]
)))
(((
Lorem ipsum dolor sit amet, consectetur adipiscing elit. [...]
)))
{{/container}}

container-macro-output.png

Related

Get Connected