Syntax reference
Every LibreTimes Markdown construct in one place — inline marks, maths delimiters, directives, statement and admonition labels, block attributes and limits.
This page lists the whole vocabulary of LibreTimes Markdown: every mark, delimiter, directive and attribute, with what it produces. Each table is built from the dialect's own definition every time the site is published, so it cannot fall behind what the renderer accepts. For how to use a construct, follow the link to its page.
Everything here is in addition to standard Markdown (CommonMark and GitHub Flavored Markdown): headings, lists, links, images, quotes, tables, footnotes and code blocks work as they do elsewhere. See Basics.
Inline marks
Marks that change a run of text inside a paragraph. The Result column is the sample itself, rendered.
| Written | Result | Note |
|---|---|---|
**bold** | bold | Strong emphasis. |
*italic* | italic | Emphasis. |
`code` | code | Inline code; nothing inside it is interpreted. |
~~struck~~ | Two tildes on each side; one tilde is subscript. | |
==highlighted== | highlighted | A highlighted run of plain text. |
H~2~O | H2O | A short index below the line. |
x^2^ | x2 | A short index above the line. |
pages 3--7 | pages 3–7 | Two hyphens: an en dash, for ranges. |
a pause---then | a pause—then | Three hyphens: an em dash. |
Quotes and ellipses are left as typed. Details and edge cases are on Text formatting.
Mathematics
Four spellings are accepted. What decides between a formula in the line and a display formula is whether the delimiters stand on their own lines, not which delimiters you use.
| Written | Result | Note |
|---|---|---|
$x^2$ | , inline | Inline maths. |
\(x^2\) | , inline | Inline maths, as in LaTeX. |
$$x^2$$ | , inline | Still inline: on one line, double dollars do not make a display. |
\[x^2\] | , inline | Also inline on one line: it is rewritten to double dollars first. |
$$x^2$$ | a display formula, centred on its own line | Display maths: the delimiters on their own lines. |
\[x^2\] | a display formula, centred on its own line | Display maths, as in LaTeX, also on their own lines. |
More on Mathematics.
Directives
A directive is a named block, :::name … :::, or a named run inside a
sentence, :name[…]. These are all the names the dialect knows; any other
name is shown exactly as typed. The syntax itself is explained on
Extensions.
| Construct | Directives | Form | Own keys | What it is |
|---|---|---|---|---|
| Statements | :::theorem :::lemma :::corollary :::conjecture :::definition :::proof :::example :::remark :::problem :::solution :::hint :::statement | block | number label | Theorem-style blocks with a run-in label. |
| Admonitions | :::callout :::note :::tip :::important :::warning :::caution | block | label | Boxed callouts with a title bar. |
| Figures | :::figure | block | — | One image, diagram or gallery with a caption. |
| Galleries | :::gallery | block | — | Several images shown as one group. |
| Collapsible sections | :::spoiler | block | — | A section that stays closed until the reader opens it. |
| Tabs | :::tabs :::tab | block | group name | Alternatives side by side, one shown at a time. |
| TikZ diagrams | :::tikz | block | bg | A diagram drawn in TikZ, compiled when you save. |
| Book constructs | :::verse :::epigraph :::dedication :::letter :sc[…] :pb[…] | block, inside a sentence | — | Verse, epigraphs, letters, small capitals and printed page numbers. |
| Attachments | :attach[…] | inside a sentence | id | A link to a file attached to the work. |
Statements
The theorem family. Each kind renders with a bold label at the start of its first line, then the body on the same line.
| Kind | Label | Body | Ends with | Shown | Use it for |
|---|---|---|---|---|---|
theorem | Theorem. | italic | open | A main result of the text. | |
lemma | Lemma. | italic | open | An auxiliary result, proved to be used in another proof. | |
corollary | Corollary. | italic | open | A result that follows from one just proved. | |
conjecture | Conjecture. | italic | open | A statement believed to be true and not proved. | |
definition | Definition. | upright | open | Introduces a term or an object. | |
proof | Proof. | upright | ∎ | open | The argument for the statement above it. |
example | Example. | upright | open | A worked case that illustrates the theory. | |
remark | Remark. | upright | open | A comment on the theory that is not itself a result. | |
problem | Problem. | upright | open | An exercise for the reader, the unit of a problem sheet. | |
solution | Solution. | upright | ∎ | closed until clicked | The answer to the problem it sits in. |
hint | Hint. | upright | closed until clicked | A nudge towards the solution of the problem it sits in. | |
statement | Proposition. | upright | open | Any other kind, labelled with your own word: :::statement[Proposition]. |
The Label column shows the label in this page's language. A document gets the label in its own language, whichever language the reader's interface is in:
| Kind | English (en) | Russian (ru) | Spanish (es) | French (fr) | German (de) | Chinese (zh) |
|---|---|---|---|---|---|---|
theorem | Theorem | Теорема | Teorema | Théorème | Satz | 定理 |
lemma | Lemma | Лемма | Lema | Lemme | Lemma | 引理 |
corollary | Corollary | Следствие | Corolario | Corollaire | Korollar | 推论 |
conjecture | Conjecture | Гипотеза | Conjetura | Conjecture | Vermutung | 猜想 |
definition | Definition | Определение | Definición | Définition | Definition | 定义 |
proof | Proof | Доказательство | Demostración | Démonstration | Beweis | 证明 |
example | Example | Пример | Ejemplo | Exemple | Beispiel | 例 |
remark | Remark | Замечание | Observación | Remarque | Bemerkung | 注 |
problem | Problem | Задача | Problema | Problème | Aufgabe | 问题 |
solution | Solution | Решение | Solución | Solution | Lösung | 解答 |
hint | Hint | Подсказка | Pista | Indication | Hinweis | 提示 |
A document in any other language gets the English labels. A custom
:::statement[…] label, and a label="…" you set, are used exactly as
written and never translated. More on
Statements.
Admonitions
Boxed callouts. The title bar shows the kind's title in the document's
language, unless you set your own with label="…".
| Kind | Title | Use it when |
|---|---|---|
callout | Callout | None of the others fits: a neutral box. |
note | Note | The reader may skip it without losing the thread. |
tip | Tip | There is an easier or better way. |
important | Important | The reader needs it to succeed. |
warning | Warning | Something commonly goes wrong here. |
caution | Caution | Doing it has a cost that is hard to undo. |
| Kind | English (en) | Russian (ru) | Spanish (es) | French (fr) | German (de) | Chinese (zh) |
|---|---|---|---|---|---|---|
callout | Callout | Выноска | Recuadro | Encadré | Kasten | 提示框 |
note | Note | Заметка | Nota | Note | Hinweis | 注释 |
tip | Tip | Совет | Consejo | Astuce | Tipp | 提示 |
important | Important | Важно | Importante | Important | Wichtig | 重要 |
warning | Warning | Предупреждение | Advertencia | Avertissement | Warnung | 警告 |
caution | Caution | Осторожно | Precaución | Attention | Vorsicht | 注意 |
More on Admonitions.
Book constructs
For poetry, epigraphs, letters and the features of a printed edition. They work in any document, not only in books.
| Construct | Form | What it is |
|---|---|---|
:::verse | block | Poetry: every line stays a line, a blank line separates stanzas. |
:::epigraph | block | A quotation that frames what follows. |
:::dedication | block | A dedication. |
:::letter | block | A letter or a document quoted inside the text. |
:sc[…] | inside a sentence | Small capitals inside a sentence. |
:pb[…] | inside a sentence | Where a printed page began; an arabic or roman page number. |
More on Verse, epigraphs and letters.
Block attributes
A block's properties, written either on a line of their own directly above the
block ({align=center}) or on a directive's opening fence
(:::theorem{#main number=3.17}). The first three keys work on any block; the
rest belong to the directive named in the Where column.
| Key | Values | Where | Means |
|---|---|---|---|
#id | [A-Za-z][A-Za-z0-9_.:-]{0,99} | any block: on an attribute line or a directive fence | A stable anchor on the block, so [see](#name) links to it. |
align | left flush left, center centred, right flush right, justify justified | any block: on an attribute line or a directive fence | How the lines sit in the measure. |
indent | none no first-line indent, first a first-line indent, hanging a hanging indent | any block: on an attribute line or a directive fence | The shape of the left edge. |
number | text, at most 32 characters, one line | the fence of: Statements | The number the source printed, shown in place of an automatic one. |
label | text, at most 32 characters, one line | the fence of: Statements | The word the source printed, in place of the kind's label. label="" prints no word. |
label | text, at most 32 characters, one line | the fence of: Admonitions | The box's title, in place of the translated one. label="" removes the title bar. |
group | [A-Za-z0-9_-]{1,40} | the fence of: :::tabs | Tab groups with the same name switch together. |
name | text | the fence of: :::tab | The tab's title. |
bg | set by the editor | the fence of: :::tikz | The background the editor previews the diagram on. The published page does not use it. |
id | the attachment's id | the fence of: :attach[…] | The attachment the chip opens. |
A line of attributes that holds anything not in this table is shown as typed, so a typo is visible rather than silently ignored. On a directive fence an unknown key is ignored instead. More on Block attributes.
Limits
The bounds the parser holds to. They exist so that no line of text can make rendering slow or a page unreadable.
| Limit | Value | Past it |
|---|---|---|
| Length of an attribute list | 512 characters | the line stays text |
| Entries in an attribute list | 16 | the line stays text |
Length of a printed number= or label= | 32 characters | the key is ignored |
| Spaces per verse indent level | 2 | — |
| Deepest verse indent level | 3 | deeper lines use this level |