Typst allows you to display multiple letters verbatim in mathematical formulas using quotes. For example:
$1 "ms"$
The example above will display ms in an upright style to denote millisecond units, as opposed to displaying in italics which would incorrectly denote “m times s”.
Similarly, I would like to display μs to denote microsecond units. However, there does not appear to be a way to use named symbols1 within quotes.
I can think of three ways to achieve this:
-
Search for the symbol online and copy and paste it manually:
$1 "μs"$ -
Use the
upright3 function (this removes the leading space, which is undesirable):$1 upright(mu s)$ -
Define a variable:
#let mus = sym.mu + "s" $1 mus$
Is there a better way to do this that I’m unaware of?
1 https://typst.app/docs/reference/symbols/sym/2
2 New forum accounts are not allowed to include more than 2 links in a single post, so I am using footnotes as a workaround.
3 https://typst.app/docs/reference/math/styles/#functions-upright