Skip to content

Introduction

General Syntax

Expressions use a simple asciimath-like notation. Plain text is rendered as-is; mathematical content is introduced with keywords followed by curly braces.

Options

All keywords can receive values and options. A pipe (|) separates options from values. If a keyword requires or allows several values, then they must be separated by semicolons (;). Example: frac{2; 3 | color=#3b7d25}

font_size

Every keyword accepts a font_size option: a size multiplier applied to the whole rendered element (and, cascading, to its children). It is relative to the surrounding size — 0.9 is 90 %, 1.2 is 120 %.

text{Coefficient ? | font_size=0.9}
math{2x + 1 | font_size=1.2}
table{1; 2; 3; 4 | bubble=×Q{} | font_size=0.8}

Text mode

The default mode is text mode: anything that is not a keyword is rendered as plain text, as is. The keywords (math{}, frac{}, angle{}, unit{}, table{}, barmodel{}, barchart{}, rect{}, poly{}, grid{}, axis{}, stack{}) are still interpreted wherever they appear — except inside text{}.

Parentheses are part of that plain text: they are written as they come (Aire (unit{cm^2}) ? draws the unit inside them, with no space added against them), and a sentence never has to match them — 3) Suite and :-( are ordinary text. They only group a sub-expression inside math{}, where a formula gives them their meaning.

text{} renders its content verbatim as plain text: the content is not scanned for keywords. For instance text{frac{2/3}} prints the literal characters frac{2/3} rather than drawing the fraction. This is typically used inside math{} to insert ordinary text.

The one exception is line breaks: a literal \n (backslash + n) or a real newline inside text{} stacks the content over several centred lines, e.g. text{Prix moyen\nd'un ticket ?}. Combined with a chart's baseline=middle, this gives a multi-line caption vertically centred beside the chart.

stack{} stacks several independent elements (separated by ;) into one centred block, each a full atmxg expression — unlike text{}'s lines, they can be anything: stack{text{Prix moyen\nd'un ticket ?} ; A{}} puts a silent answer placeholder (A{}) on its own line under a caption. Options: align (left/center/right) and font_size.