Docs

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.

WrittenResultNote
**bold**boldStrong emphasis.
*italic*italicEmphasis.
`code`codeInline code; nothing inside it is interpreted.
~~struck~~struckTwo tildes on each side; one tilde is subscript.
==highlighted==highlightedA highlighted run of plain text.
H~2~OH2OA short index below the line.
x^2^x2A short index above the line.
pages 3--7pages 3–7Two hyphens: an en dash, for ranges.
a pause---thena pause—thenThree 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.

WrittenResultNote
$x^2$, inlineInline maths.
\(x^2\), inlineInline maths, as in LaTeX.
$$x^2$$, inlineStill inline: on one line, double dollars do not make a display.
\[x^2\], inlineAlso inline on one line: it is rewritten to double dollars first.
$$
x^2
$$
a display formula, centred on its own lineDisplay maths: the delimiters on their own lines.
\[
x^2
\]
a display formula, centred on its own lineDisplay 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.

ConstructDirectivesFormOwn keysWhat it is
Statements:::theorem :::lemma :::corollary :::conjecture :::definition :::proof :::example :::remark :::problem :::solution :::hint :::statementblocknumber labelTheorem-style blocks with a run-in label.
Admonitions:::callout :::note :::tip :::important :::warning :::cautionblocklabelBoxed callouts with a title bar.
Figures:::figureblock—One image, diagram or gallery with a caption.
Galleries:::galleryblock—Several images shown as one group.
Collapsible sections:::spoilerblock—A section that stays closed until the reader opens it.
Tabs:::tabs :::tabblockgroup nameAlternatives side by side, one shown at a time.
TikZ diagrams:::tikzblockbgA 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 sentenceidA 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.

KindLabelBodyEnds withShownUse it for
theoremTheorem.italicopenA main result of the text.
lemmaLemma.italicopenAn auxiliary result, proved to be used in another proof.
corollaryCorollary.italicopenA result that follows from one just proved.
conjectureConjecture.italicopenA statement believed to be true and not proved.
definitionDefinition.uprightopenIntroduces a term or an object.
proofProof.upright∎openThe argument for the statement above it.
exampleExample.uprightopenA worked case that illustrates the theory.
remarkRemark.uprightopenA comment on the theory that is not itself a result.
problemProblem.uprightopenAn exercise for the reader, the unit of a problem sheet.
solutionSolution.upright∎closed until clickedThe answer to the problem it sits in.
hintHint.uprightclosed until clickedA nudge towards the solution of the problem it sits in.
statementProposition.uprightopenAny 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:

KindEnglish (en)Russian (ru)Spanish (es)French (fr)German (de)Chinese (zh)
theoremTheoremТеоремаTeoremaThéorèmeSatz定理
lemmaLemmaЛеммаLemaLemmeLemma引理
corollaryCorollaryСледствиеCorolarioCorollaireKorollar推论
conjectureConjectureГипотезаConjeturaConjectureVermutung猜想
definitionDefinitionОпределениеDefiniciónDéfinitionDefinition定义
proofProofДоказательствоDemostraciónDémonstrationBeweis证明
exampleExampleПримерEjemploExempleBeispiel例
remarkRemarkЗамечаниеObservaciónRemarqueBemerkung注
problemProblemЗадачаProblemaProblèmeAufgabe问题
solutionSolutionРешениеSoluciónSolutionLösung解答
hintHintПодсказкаPistaIndicationHinweis提示

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="…".

KindTitleUse it when
calloutCalloutNone of the others fits: a neutral box.
noteNoteThe reader may skip it without losing the thread.
tipTipThere is an easier or better way.
importantImportantThe reader needs it to succeed.
warningWarningSomething commonly goes wrong here.
cautionCautionDoing it has a cost that is hard to undo.
KindEnglish (en)Russian (ru)Spanish (es)French (fr)German (de)Chinese (zh)
calloutCalloutВыноскаRecuadroEncadréKasten提示框
noteNoteЗаметкаNotaNoteHinweis注释
tipTipСоветConsejoAstuceTipp提示
importantImportantВажноImportanteImportantWichtig重要
warningWarningПредупреждениеAdvertenciaAvertissementWarnung警告
cautionCautionОсторожноPrecauciónAttentionVorsicht注意

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.

ConstructFormWhat it is
:::verseblockPoetry: every line stays a line, a blank line separates stanzas.
:::epigraphblockA quotation that frames what follows.
:::dedicationblockA dedication.
:::letterblockA letter or a document quoted inside the text.
:sc[…]inside a sentenceSmall capitals inside a sentence.
:pb[…]inside a sentenceWhere 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.

KeyValuesWhereMeans
#id[A-Za-z][A-Za-z0-9_.:-]{0,99}any block: on an attribute line or a directive fenceA stable anchor on the block, so [see](#name) links to it.
alignleft flush left, center centred, right flush right, justify justifiedany block: on an attribute line or a directive fenceHow the lines sit in the measure.
indentnone no first-line indent, first a first-line indent, hanging a hanging indentany block: on an attribute line or a directive fenceThe shape of the left edge.
numbertext, at most 32 characters, one linethe fence of: StatementsThe number the source printed, shown in place of an automatic one.
labeltext, at most 32 characters, one linethe fence of: StatementsThe word the source printed, in place of the kind's label. label="" prints no word.
labeltext, at most 32 characters, one linethe fence of: AdmonitionsThe box's title, in place of the translated one. label="" removes the title bar.
group[A-Za-z0-9_-]{1,40}the fence of: :::tabsTab groups with the same name switch together.
nametextthe fence of: :::tabThe tab's title.
bgset by the editorthe fence of: :::tikzThe background the editor previews the diagram on. The published page does not use it.
idthe attachment's idthe 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.

LimitValuePast it
Length of an attribute list512 charactersthe line stays text
Entries in an attribute list16the line stays text
Length of a printed number= or label=32 charactersthe key is ignored
Spaces per verse indent level2—
Deepest verse indent level3deeper lines use this level