Is this for me?
If you use latex (and like the concept compared to wysiwyg) then these are some reasons you might better like typst:
- you feel latex (and online solutions) are slow (and expensive) to compile,
- you feel latex is too verbose for simple things, e.g. compared to markdown for lists,
- you think latex math syntax is amazing… but actually don’t know it can be better,
- you feel that customizing things require to find/select the right packages, work around quirks, etc,
- you feel it is difficult to start “programming” in latex, i.e. to create your own abstractions to write cleaner documents.
Typst
Here are some explanations that I would have liked to read to better start with typst.
NB: things styled are rendered with typst.
- Typst is like latex but rebuilt from scratch to be simpler and more modern.
- You can use it online at https://typst.app/ or install it locally from https://typst.app/open-source/#download and use integrated tools e.g. the vscode “tinymist” plugin.
- It uses a markdown-like syntax (but-not-exactly) for very common things, like paragraphs, lists, and headers.
- It has modes
- by default, it is in “text mode”, where you can write text, lists, headers, etc.
- example:
*bold* and _italic_ text and `monospace` text. - yields:
- example:
- you can enter code mode using
#and use functions, variables, etc.- example computation
#(1 + 1)yields . - example function call
#text(orange, "hello")yields (which appears blue with the dark mode of this page). - you can switch back to text mode within code mode using square brackets
[], e.g.,#text(blue, [*1*+_1_])yields .
- example computation
- you can enter “math mode” by using
$...$for inline math,- the syntax is different from latex (for good reasons)
- a way to learn can be to convert latex to typst, using e.g.
https://qwinsi.github.io/tex2typst-webapp/. - inline math
$E=m c^2$gives . - block math
$ E=m c^2 $with spaces after/before dollars - fractions and groups made simpler
$4 / 3 pi R^3 = (4 pi R^3) / 3$yields . - in math mode, one can use variables (like any of the greek letters) or symbols, potentially with modifiers… e.g.
$ EE_(x tilde q) [f(x)] eq.def integral_x f(x) q(x) d x $ - you can use quotes to insert text in math mode, e.g.,
$E = "mass" times c^2$gives - you can also call functions, and in math mode the parameters are passed “raw”, so
$sqrt(x)$yields as it does not consider x as a variable but rather as raw input - you can switch back to code mode if needed, e.g.,
$sqrt(#(str(1 + 1)))$gives (needing an explicit cast).
- by default, it is in “text mode”, where you can write text, lists, headers, etc.
- And much more including custom functions, show rules, set rules, diagrams/plots with cetz, loading data from yaml files…