From 75f646c9756634fe6bc7f94349f6496ed0fc5484 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 1 Oct 2024 07:59:31 +0000 Subject: Fix `math.stretch` not working vertically with attachments (#5069) --- tests/ref/issue-4188-lr-corner-brackets.png | Bin 368 -> 364 bytes tests/ref/math-stretch-attach.png | Bin 2245 -> 0 bytes tests/ref/math-stretch-horizontal-attach.png | Bin 0 -> 2245 bytes tests/ref/math-stretch-vertical-attach.png | Bin 0 -> 493 bytes tests/suite/math/stretch.typ | 11 +++++++++-- 5 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 tests/ref/math-stretch-attach.png create mode 100644 tests/ref/math-stretch-horizontal-attach.png create mode 100644 tests/ref/math-stretch-vertical-attach.png (limited to 'tests') diff --git a/tests/ref/issue-4188-lr-corner-brackets.png b/tests/ref/issue-4188-lr-corner-brackets.png index 81e9ecdc..6e247908 100644 Binary files a/tests/ref/issue-4188-lr-corner-brackets.png and b/tests/ref/issue-4188-lr-corner-brackets.png differ diff --git a/tests/ref/math-stretch-attach.png b/tests/ref/math-stretch-attach.png deleted file mode 100644 index 179281a5..00000000 Binary files a/tests/ref/math-stretch-attach.png and /dev/null differ diff --git a/tests/ref/math-stretch-horizontal-attach.png b/tests/ref/math-stretch-horizontal-attach.png new file mode 100644 index 00000000..179281a5 Binary files /dev/null and b/tests/ref/math-stretch-horizontal-attach.png differ diff --git a/tests/ref/math-stretch-vertical-attach.png b/tests/ref/math-stretch-vertical-attach.png new file mode 100644 index 00000000..213ab89b Binary files /dev/null and b/tests/ref/math-stretch-vertical-attach.png differ diff --git a/tests/suite/math/stretch.typ b/tests/suite/math/stretch.typ index e6817ee5..60696746 100644 --- a/tests/suite/math/stretch.typ +++ b/tests/suite/math/stretch.typ @@ -13,8 +13,8 @@ $ H stretch(=)^"define" U + p V \ f : X stretch(arrow.hook, size: #150%)_"injective" Y \ V stretch(->, size: #(100% + 1.5em))^("surjection") ZZ $ ---- math-stretch-attach --- -// Test stretch interactions with attachments. +--- math-stretch-horizontal-attach --- +// Test horizontal stretch interactions with attachments. #set page(width: auto) $stretch(stretch(=, size: #4em))_A$ @@ -28,6 +28,13 @@ $ P = Q U stretch(equiv)^(forall i)_"Chern-Weil" V stretch(equiv, size: #(120% + 2mm))^(forall i)_"Chern-Weil" W $ +--- math-stretch-vertical-attach --- +// Test vertical stretch interactions with attachments. +$arrow.t$ +$stretch(arrow.t)^"map"$ +$stretch(arrow.t, size: #2em)^"map"$ +$stretch(arrow.t, size: #200%)^"map"$ + --- math-stretch-horizontal --- // Test stretching along horizontal axis. #let ext(sym) = math.stretch(sym, size: 2em) -- cgit v1.2.3