Extensions
Beyond CommonMark, GFM, math, and code, LibreTimes adds a family of block extensions: theorem-style statements, callout boxes, figures with captions, collapsible sections, tabs, TikZ diagrams, video embeds, mentions, and attachment links. Almost all of them share one syntax, so learn it once and every block on the following pages is a vocabulary lookup.
The directive syntax
A block directive is a fenced region opened by three (or more) colons and a name, and closed by a matching line of colons:
:::name[label]{attributes}
Any Markdown content.
:::Three parts, two of them optional:
name– which block this is:theorem,note,figure,spoiler,tabs,tikz, ...[label]– optional text in square brackets on the opening line. What it means depends on the block: the theorem's name, the spoiler's summary.{attributes}– optional{key=value}or{#id}pairs. Used by figures ({#fig1}) and tabs ({name="Python"}).
The body is ordinary Markdown – paragraphs, math, lists, code, even other directives.
Nesting
To nest one directive inside another, give the outer fence more colons than the inner:
::::proof
The map factors as shown:
:::tikz
\begin{tikzpicture} ... \end{tikzpicture}
:::
::::(Equal-depth nesting written by the LibreTimes editor is also repaired automatically at render time, but when writing by hand, more colons outside is the rule.)
Unknown names
A directive whose name is not in the vocabulary renders as a plain container:
its content shows, with no styling. Nothing breaks – but check the spelling,
because :::theorm will not look like a theorem. To display literal
directive syntax (as this page does), put it in a code block.
The vocabulary
| Block | Names | Page |
|---|---|---|
| Statements | theorem, lemma, corollary, definition, proof, example, remark | Statements |
| Admonitions | note, tip, important, warning, caution, callout | Admonitions |
| Figures | figure | Figures |
| Collapsible | spoiler | Collapsible sections |
| Tabs | tabs, tab | Tabs |
| TikZ diagrams | tikz | TikZ |
Three inline extensions use their own syntax rather than directives:
video embeds (@[youtube](...)),
mentions
(@handle), and
attachment links
(:attach[...]{#id}).