diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tests/suite/math/spacing.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/suite/math/spacing.typ')
| -rw-r--r-- | tests/suite/math/spacing.typ | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/suite/math/spacing.typ b/tests/suite/math/spacing.typ new file mode 100644 index 00000000..2a387f92 --- /dev/null +++ b/tests/suite/math/spacing.typ @@ -0,0 +1,59 @@ +// Test spacing in math formulas. + +--- math-spacing-basic --- +// Test spacing cases. +$ä, +, c, (, )$ \ +$=), (+), {times}$ \ +$⟧<⟦, abs(-), [=$ \ +$a=b, a==b$ \ +$-a, +a$ \ +$a not b$ \ +$a+b, a*b$ \ +$sum x, sum(x)$ \ +$sum product x$ \ +$f(x), zeta(x), "frac"(x)$ \ +$a+dots.c+b$ +$f(x) sin(y)$ + +--- math-spacing-kept-spaces --- +// Test ignored vs non-ignored spaces. +$f (x), f(x)$ \ +$[a|b], [a | b]$ \ +$a"is"b, a "is" b$ + +--- math-spacing-predefined --- +// Test predefined spacings. +$a thin b, a med b, a thick b, a quad b$ \ +$a = thin b$ \ +$a - b equiv c quad (mod 2)$ + +--- math-spacing-set-comprehension --- +// Test spacing for set comprehension. +#set page(width: auto) +$ { x in RR | x "is natural" and x < 10 } $ + +--- math-spacing-decorated --- +// Test spacing for operators with decorations and modifiers on them +#set page(width: auto) +$a equiv b + c - d => e log 5 op("ln") 6$ \ +$a cancel(equiv) b overline(+) c arrow(-) d hat(=>) e cancel(log) 5 dot(op("ln")) 6$ \ +$a overbrace(equiv) b underline(+) c grave(-) d underbracket(=>) e circle(log) 5 caron(op("ln")) 6$ \ +\ +$a attach(equiv, tl: a, tr: b) b attach(limits(+), t: a, b: b) c tilde(-) d breve(=>) e attach(limits(log), t: a, b: b) 5 attach(op("ln"), tr: a, bl: b) 6$ + +--- math-spacing-weak --- +// Test weak spacing +$integral f(x) dif x$, +// Not weak +$integral f(x) thin dif x$, +// Both are weak, collide +$integral f(x) #h(0.166em, weak: true)dif x$ + +--- issue-1052-math-number-spacing --- +// Test spacing after numbers in math. +$ +10degree \ +10 degree \ +10.1degree \ +10.1 degree +$ |
