Markdown reference

Everything you publish on LibreTimes – lectures, problem sets, expositions, essays – is written in LibreTimes Markdown. It is standard Markdown at the core, extended for academic writing: mathematics, theorem-style blocks, diagrams, and media.

The flavor is built in three layers, and this guide follows them in order:

  1. CommonMark – the standard core. Headings, emphasis, lists, links, quotes, code. If you have written Markdown anywhere, you already know this layer.
  2. GFM (GitHub Flavored Markdown) – widely adopted extensions: tables, footnotes, task lists, strikethrough, autolinks. Covered alongside the basics.
  3. LibreTimes extensions – what makes the flavor academic: mathematics with KaTeX, highlighted code, and the directive blocks – theorems and proofs, callouts, collapsible sections, tabs, TikZ diagrams, video embeds, mentions, and attachments.

Anything valid in a lower layer stays valid in the ones above it: a plain CommonMark document is already a valid LibreTimes document.

Quick example

## Pythagorean theorem
 
:::theorem[Pythagoras]
For a right triangle with legs $a$, $b$ and hypotenuse $c$:
 
$$
a^2 + b^2 = c^2
$$
:::
 
:::proof
Drop the altitude from the right angle and compare similar triangles.
:::

renders as:

Pythagorean theorem

Theorem (Pythagoras). For a right triangle with legs , and hypotenuse :

Proof. Drop the altitude from the right angle and compare similar triangles. 

Sections

GuideWhat it covers
BasicsCommonMark + GFM: text, headings, lists, links, images, quotes, tables, footnotes
MathematicsKaTeX: inline and display math, delimiters, common commands
Code blocksSyntax highlighting, titles, inline code
ExtensionsThe directive syntax and every LibreTimes block: statements, admonitions, figures, spoilers, tabs, TikZ, video, mentions, attachments
CommentsThe reduced flavor used in comments
HTML and securityWhich raw HTML is allowed, and how content is sanitized
CheatsheetEverything on one page

Where it applies

Publications use the full flavor. Comments use a reduced set – the same text syntax, but no media and no block extensions. The editor writes this syntax for you; this guide is the reference for what the syntax is, whether you type it directly in source mode or import documents written elsewhere.

One rule worth knowing up front

The page title is not part of the document body. The title you enter when publishing renders as the page's only top-level heading, so headings in the body start at the second level. If your document does contain a top-level heading (# Title), the whole heading tree is shifted down one rank to keep the hierarchy – see Headings.