Currently there are only a few named spaces in math mode, namely: “thin
(1/6 em), med
(2/9 em), thick
(5/18 em), quad
(1 em), wide
(2 em)”. There is no variant between ~0.27em and 1em, which can be quite frustrating to layout sometimes. While additional spacings can be composed of the smaller units, I believe they should be provided by Typst by default, e.g. around 0.5em and 0.75em.
Hello @my4ng ,
It seems the named spacing defined reflect the Latex spacing:
as in:
\quad
=quad
\,
=thin
\:
=med
\;
=thick
\
=space
\qquad
=wide
What exactly do you wish to solve using the additional spaces (0.5em, 0.75em)?
Do you have an example, where you wish to use these spacings?
Also, don’t forget to write the title as a question, since its the category’s guidelines (How to post in the Questions category - Questions - Typst Forum)!
You can always define variants in your document! If you would like to discuss whether more named spaces should be added by default, then you should probably reach out on Discord (maths forge), or open an issue directly on https://github.com/typst/typst/issues/.
#let double = h(0.5em)
#let triple = h(0.75em)
#table(
columns: 3,
align: left,
"thin", "3/18em~0.16em", $a thin b$,
"med", "4/18em~0.22em", $a med b$,
"thick", "5/18em~0.27em", $a thick b$,
"double", "0.5em", $a double b$,
"triple", "0.75em", $a triple b$,
"quad", "1em", $a quad b$,
"wide", "2em", $a wide b$,
)
Here is a source file for all space variants available, in case you were wondering:
Thanks for the detailed table. It just seemed odd that thin/med/thick are visually very similar and yet larger spaces are not available in maths mode. As @Andrew pointed out, it seems en would be half an em (quad), third being 1/3 and quarter being (1/4), etc, but they are not available in math mode which is strange. I think I will ask around on discord first then. Thanks again!
$space.third space.quarter$
I guess they are not as common to put them in the global scope in math mode.
Uh huh! I did not know that, thank you!