diff --git a/src/units.typ b/src/units.typ index 9d6c2ad..da8fed1 100644 --- a/src/units.typ +++ b/src/units.typ @@ -252,7 +252,9 @@ if num-state.math { separator = $separator$ } - if unit.numerator.first().at(0) in ("°", "′", "″", sym.degree, sym.prime, sym.prime.double) { + + let angles = ("°", "′", "″", sym.degree, sym.prime, sym.prime.double) + if unit.numerator.len() > 0 and unit.numerator.at(0).at(0) in angles { separator = none } diff --git a/tests/zi/basic/ref/1.png b/tests/zi/basic/ref/1.png index 5b21b2c..f4785ae 100644 Binary files a/tests/zi/basic/ref/1.png and b/tests/zi/basic/ref/1.png differ diff --git a/tests/zi/basic/test.typ b/tests/zi/basic/test.typ index 4015b40..48c3766 100644 --- a/tests/zi/basic/test.typ +++ b/tests/zi/basic/test.typ @@ -12,6 +12,7 @@ #zi.arcsecond[23] \ #zi.kN[23] \ #zi.degree[45] \ +#zi.declare("1/s")([2]) \ #zi.kN() // later make them types maybe? Then we can just call #zi.kN, that looks much better