From f9b01f595dba96044c725a97ecb4972bec7d57ed Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 9 Jul 2025 13:08:49 +0000 Subject: Move math styling to codex and add `math.scr` (#6309) --- tests/ref/math-style-fallback.png | Bin 0 -> 935 bytes tests/ref/math-style-hebrew-exceptions.png | Bin 296 -> 489 bytes tests/ref/math-style-script.png | Bin 0 -> 585 bytes tests/suite/math/style.typ | 21 +++++++++++++++++++-- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/ref/math-style-fallback.png create mode 100644 tests/ref/math-style-script.png (limited to 'tests') diff --git a/tests/ref/math-style-fallback.png b/tests/ref/math-style-fallback.png new file mode 100644 index 00000000..de028376 Binary files /dev/null and b/tests/ref/math-style-fallback.png differ diff --git a/tests/ref/math-style-hebrew-exceptions.png b/tests/ref/math-style-hebrew-exceptions.png index 723466e8..a6f511e0 100644 Binary files a/tests/ref/math-style-hebrew-exceptions.png and b/tests/ref/math-style-hebrew-exceptions.png differ diff --git a/tests/ref/math-style-script.png b/tests/ref/math-style-script.png new file mode 100644 index 00000000..379d270e Binary files /dev/null and b/tests/ref/math-style-script.png differ diff --git a/tests/suite/math/style.typ b/tests/suite/math/style.typ index 1fa2695e..3ecf856b 100644 --- a/tests/suite/math/style.typ +++ b/tests/suite/math/style.typ @@ -12,6 +12,15 @@ $A, italic(A), upright(A), bold(A), bold(upright(A)), \ bb("hello") + bold(cal("world")), \ mono("SQRT")(x) wreath mono(123 + 456)$ +--- math-style-fallback --- +// Test how math styles fallback. +$upright(frak(bold(alpha))) = upright(bold(alpha)) \ +bold(mono(ϝ)) = bold(ϝ) \ +sans(Theta) = bold(sans(Theta)) \ +bold(upright(planck)) != planck \ +bb(e) != italic(bb(e)) \ +serif(sans(A)) != serif(A)$ + --- math-style-dotless --- // Test styling dotless i and j. $ dotless.i dotless.j, @@ -21,7 +30,7 @@ $ dotless.i dotless.j, bb(dotless.i) bb(dotless.j), cal(dotless.i) cal(dotless.j), frak(dotless.i) frak(dotless.j), - mono(dotless.i) mono(dotless.j), + mono(dotless.i) mono(dotless.j), bold(frak(dotless.i)) upright(sans(dotless.j)), italic(bb(dotless.i)) frak(sans(dotless.j)) $ @@ -38,7 +47,15 @@ $bb(Gamma) , bb(gamma), bb(Pi), bb(pi), bb(sum)$ --- math-style-hebrew-exceptions --- // Test hebrew exceptions. -$aleph, beth, gimel, daleth$ +$aleph, beth, gimel, daleth$ \ +$upright(aleph), upright(beth), upright(gimel), upright(daleth)$ + +--- math-style-script --- +// Test variation selectors for scr and cal. +$cal(A) scr(A) bold(cal(O)) scr(bold(O))$ + +#show math.equation: set text(font: "Noto Sans Math") +$scr(E) cal(E) bold(scr(Y)) cal(bold(Y))$ --- issue-3650-italic-equation --- _abc $sin(x) "abc"$_ \ -- cgit v1.2.3