Symbolist is a Typst package that helps generate an organized list of mathematical symbols for your document. Pass any math formula directly — including symbols with subscripts, superscripts, and other notation like $E_k$, $v_"max"$, or $hat(x)$ — and Symbolist extracts the base letter to sort everything alphabetically. Latin and Greek symbols are separated into their own tables automatically.
Getting Started
Import the package and start defining symbols throughout your document. At the end, generate a formatted table of all symbols with their descriptions and units.
#import "@preview/symbolist:0.1.0": *
// Define symbols as you use them
#def-symbol($F$, "Force", unit: "N")
#def-symbol($m$, "Mass", unit: "kg")
#def-symbol($alpha$, "Angular acceleration", unit: "rad/s²")
// Print the symbol list
#print-symbols()
Installation
To use this package in your Typst document, simply import it from the Typst package repository:
#import "@preview/symbolist:0.1.0": *
For local development:
- Clone this repository to your local machine
- Place the package files in your Typst local packages directory:
- Linux/macOS:
~/.local/share/typst/packages/local/symbolist/0.1.0/ - Windows:
%APPDATA%\typst\packages\local\symbolist\0.1.0\
- Linux/macOS:
- Import using the local namespace:
#import "@local/symbolist:0.1.0": *
For more information on local packages, see the Typst package documentation.
Usage
Basic Usage
Define symbols anywhere in your document using def-symbol():
#import "@preview/symbolist:0.1.0": *
= Introduction
The force $F$ acting on a mass $m$ produces acceleration $a$.
#def-symbol($F$, "Force", unit: "N")
#def-symbol($m$, "Mass", unit: "kg")
#def-symbol($a$, "Acceleration", unit: "m/s²")
Function Reference
def-symbol(symbol, description, unit: none)
Defines a symbol with its description and optional unit.
Parameters:
symbol(content): The mathematical symbol (e.g.,$F$,$alpha$)description(string): Description of what the symbol representsunit(string, optional): Physical unit for the symbol (e.g., “m/s”, “kg”)
Example:
#def-symbol($v$, "Velocity", unit: "m/s")
#def-symbol($theta$, "Angle", unit: "rad")
#def-symbol($n$, "Number of samples") // No unit
print-symbols(print-units: true, print-header: true, ..table-args)
Generates formatted tables of all defined symbols. Symbols are automatically:
- Separated into Latin and Greek categories
- Sorted alphabetically (Greek symbols sorted by Latin equivalent)
- Displayed with their descriptions and units
Sections with no symbols are omitted entirely.
Parameters:
print-units(boolean, default:true): Whether to include the units column in the tableprint-header(boolean, default:true): Whether to include table headers (Symbol, Description, Unit)..table-args: Any additional named arguments are forwarded to the underlyingtableelements, letting you override defaults likefill,align,inset,column-gutter, etc.
Examples:
// Default: show units and headers
#print-symbols()
// Hide the units column
#print-symbols(print-units: false)
// Hide table headers
#print-symbols(print-header: false)
// Custom formatting: no units, no headers
#print-symbols(print-units: false, print-header: false)
// Custom table styling via forwarded table arguments
#print-symbols(
fill: (_, row) => if calc.odd(row) { luma(240) },
align: (col, _) => if col == 0 { center } else { left },
inset: 6pt,
)
Complete Example
#import "@preview/symbolist:0.1.0": *
= Physics Problem
The kinetic energy $E_k$ of an object with mass $m$ moving at velocity $v$ is:
$ E_k = 1/2 m v^2 $
#def-symbol($E_k$, "Kinetic energy", unit: "J")
#def-symbol($m$, "Mass", unit: "kg")
#def-symbol($v$, "Velocity", unit: "m/s")
The angular momentum $L$ is given by:
$ L = I omega $
where $I$ is the moment of inertia and $omega$ is the angular velocity.
#def-symbol($L$, "Angular momentum", unit: "kg·m²/s")
#def-symbol($I$, "Moment of inertia", unit: "kg·m²")
#def-symbol($omega$, "Angular velocity", unit: "rad/s")
We also consider the coefficient $mu$ and angle $theta$.
#def-symbol($mu$, "Friction coefficient")
#def-symbol($theta$, "Angle", unit: "rad")
#pagebreak()
= List of Symbols
#print-symbols()
Customization Examples
Without Units Column
If your symbols don’t have physical units or you want a more compact table:
#def-symbol($n$, "Sample size")
#def-symbol($p$, "Probability")
#def-symbol($mu$, "Population mean")
#print-symbols(print-units: false)
Without Table Headers
For a cleaner look without column labels:
#print-symbols(print-header: false)
Advanced Usage
Design your own list of symbols using the functions get-latin-symbols() and get-greek-symbols(). These functions return the sorted symbol list directly, giving you full control over the layout. Each entry is a (sym_math, description, unit) tuple where sym_math is content and unit is either a string or none.
Because they read from Typst state, they must be called inside a context block.
Custom table with an extra Notes column:
#context {
let symbols = get-latin-symbols()
table(
columns: 4,
[Symbol], [Description], [Unit], [Notes],
..for (sym, desc, unit) in symbols {
(math.upright(sym), desc, if unit != none { math.upright(unit) } else { [] }, [])
}
)
}
Render as a definition list instead of a table:
#context {
for (sym, desc, unit) in get-greek-symbols() {
grid(
columns: (2em, 1fr),
math.upright(sym),
if unit != none [#desc (#math.upright(unit))] else [#desc],
)
}
}
Tips
- Define symbols close to where they’re first used for better document organization
- Units are optional - omit them for dimensionless quantities or mathematical indices
- Use
print-units: falsewhen working with purely mathematical symbols without physical dimensions - The symbol list is generated at the point where you call
#print-symbols(), typically near the start or end of your document - Symbols are automatically formatted in upright style in the list for consistency
License
This project is licensed under the MIT License - see the LICENSE file for details.