Skip to content

TeX formulae

Giorgio Garofalo edited this page Sep 28, 2025 · 1 revision

Quarkdown natively supports TeX math equations and formulae. When rendering to HTML, this feature is powered by KaTeX.

Inline

Inline equations can be created by wrapping text between two $ symbols. Both delimiters must be preceded and followed by a whitespace (or beginning/end of the line).

Let $ \overline v = \frac {\Delta x} {\Delta t} $ be the **average velocity** of an object.
Inline result

 

One-line block

Block equations are usually visually centered and share the same syntax as the inline ones, but need to be isolated from other content:

The following function is a **Fourier Transform**:

$ F(u) = \int^{+\infty}_{-\infty} f(x) e^{-i 2\pi x} dx $
One-line block result

Note

This syntax does not interrupt paragraphs, so make sure to space blocks properly. If the paragraph is not interrupted, the formula is recognized as inline, due to Markdown's lazy lines:

The following function is a **Fourier Transform**:
$ F(u) = \int^{+\infty}_{-\infty} f(x) e^{-i 2\pi x} dx $
Invalid one-line block

 

Multiline block

A block formula can span over multiple lines thanks to a syntax similar to fenced code blocks, though using three $ symbols as delimiters:

$$$
f(x) =
\begin{cases}
    0 & \text{if } x = 0 \\
    1 & \text{if } x \neq 0
\end{cases}
$$$
Multiline block result

 

Macros

Quarkdown supports the creation of TeX macros via the .texmacro function. See TeX macros for more information.

Documentation

CLI tools

Markdown enhancements

Functions

Setting up

Multi-file projects

Layout

Charts & diagrams

Scripting & control flow

Utilities

Slides

I/O

Native content

Value types

Built-in libraries

  • Paper: abstract, definitions, theorems, and more

Extra features

Inside Quarkdown

Clone this wiki locally