From dd95f7d59474800a83a4d397dd13e34de35d56be Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 3 Jun 2025 14:08:18 +0000 Subject: Fix bottom accent positioning in math (#6187) --- tests/ref/math-accent-bottom-high-base.png | Bin 0 -> 572 bytes tests/ref/math-accent-bottom-sized.png | Bin 0 -> 382 bytes tests/ref/math-accent-bottom-subscript.png | Bin 0 -> 417 bytes tests/ref/math-accent-bottom-wide-base.png | Bin 0 -> 359 bytes tests/ref/math-accent-bottom.png | Bin 0 -> 622 bytes tests/ref/math-accent-nested.png | Bin 0 -> 537 bytes tests/suite/math/accent.typ | 28 ++++++++++++++++++++++++++++ 7 files changed, 28 insertions(+) create mode 100644 tests/ref/math-accent-bottom-high-base.png create mode 100644 tests/ref/math-accent-bottom-sized.png create mode 100644 tests/ref/math-accent-bottom-subscript.png create mode 100644 tests/ref/math-accent-bottom-wide-base.png create mode 100644 tests/ref/math-accent-bottom.png create mode 100644 tests/ref/math-accent-nested.png (limited to 'tests') diff --git a/tests/ref/math-accent-bottom-high-base.png b/tests/ref/math-accent-bottom-high-base.png new file mode 100644 index 00000000..23b14467 Binary files /dev/null and b/tests/ref/math-accent-bottom-high-base.png differ diff --git a/tests/ref/math-accent-bottom-sized.png b/tests/ref/math-accent-bottom-sized.png new file mode 100644 index 00000000..5455b2f5 Binary files /dev/null and b/tests/ref/math-accent-bottom-sized.png differ diff --git a/tests/ref/math-accent-bottom-subscript.png b/tests/ref/math-accent-bottom-subscript.png new file mode 100644 index 00000000..81854444 Binary files /dev/null and b/tests/ref/math-accent-bottom-subscript.png differ diff --git a/tests/ref/math-accent-bottom-wide-base.png b/tests/ref/math-accent-bottom-wide-base.png new file mode 100644 index 00000000..0475b485 Binary files /dev/null and b/tests/ref/math-accent-bottom-wide-base.png differ diff --git a/tests/ref/math-accent-bottom.png b/tests/ref/math-accent-bottom.png new file mode 100644 index 00000000..bd1b9214 Binary files /dev/null and b/tests/ref/math-accent-bottom.png differ diff --git a/tests/ref/math-accent-nested.png b/tests/ref/math-accent-nested.png new file mode 100644 index 00000000..4b3d58f3 Binary files /dev/null and b/tests/ref/math-accent-nested.png differ diff --git a/tests/suite/math/accent.typ b/tests/suite/math/accent.typ index ecc0588c..2239d897 100644 --- a/tests/suite/math/accent.typ +++ b/tests/suite/math/accent.typ @@ -58,3 +58,31 @@ $hat(a) hat(A)$ $tilde(w) tilde(W)$ $grave(i) grave(j)$ $grave(I) grave(J)$ + +--- math-accent-bottom --- +// Test bottom accents. +$accent(a, \u{20EE}), accent(T, \u{0323}), accent(xi, \u{0332}), + accent(f, \u{20ED}), accent(F, \u{20E8}), accent(y, \u{032E}), + accent(!, \u{032F}), accent(J, \u{0333}), accent(p, \u{0331})$ + +--- math-accent-bottom-wide-base --- +// Test wide base with bottom accents. +$accent(x + y, \u{20EF}), accent(sum, \u{032D})$ + +--- math-accent-bottom-subscript --- +// Test effect of bottom accent on subscript. +$q_x != accent(q, \u{032C})_x != accent(accent(q, \u{032C}), \u{032C})_x$ + +--- math-accent-bottom-high-base --- +// Test high base with bottom accents. +$ accent(integral, \u{20EC}), accent(integral, \u{20EC})_a^b, accent(integral_a^b, \u{20EC}) $ + +--- math-accent-bottom-sized --- +// Test bottom accent size. +$accent(sum, \u{0330}), accent(sum, \u{0330}, size: #50%), accent(H, \u{032D}, size: #200%)$ + +--- math-accent-nested --- +// Test nested top and bottom accents. +$hat(accent(L, \u{0330})), accent(circle(p), \u{0323}), + macron(accent(caron(accent(A, \u{20ED})), \u{0333})) \ + breve(accent(eta, \u{032E})) = accent(breve(eta), \u{032E})$ -- cgit v1.2.3