diff options
| author | Pg Biel <9021226+PgBiel@users.noreply.github.com> | 2023-04-21 06:28:46 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-21 11:28:46 +0200 |
| commit | a4075f8b9b387f4e0aea9cc0ee11ca62c99a648d (patch) | |
| tree | 1090c82c7d7522d5750a6e7d31a91b3f88a3b53b /tests | |
| parent | 4cea7007d0d4f152097d753be3020c736e96cca0 (diff) | |
Implement math `cancel` function (#793)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/math/cancel.png | bin | 0 -> 24698 bytes | |||
| -rw-r--r-- | tests/typ/math/cancel.typ | 34 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/ref/math/cancel.png b/tests/ref/math/cancel.png Binary files differnew file mode 100644 index 00000000..96b29c45 --- /dev/null +++ b/tests/ref/math/cancel.png diff --git a/tests/typ/math/cancel.typ b/tests/typ/math/cancel.typ new file mode 100644 index 00000000..315cc7d4 --- /dev/null +++ b/tests/typ/math/cancel.typ @@ -0,0 +1,34 @@ +// Tests the cancel() function. + +--- +// Inline +$a + 5 + cancel(x) + b - cancel(x)$ + +$c + (a dot.c cancel(b dot.c c))/(cancel(b dot.c c))$ + +--- +// Display +#set page(width: auto) +$ a + b + cancel(b + c) - cancel(b) - cancel(c) - 5 + cancel(6) - cancel(6) $ +$ e + (a dot.c cancel((b + c + d)))/(cancel(b + c + d)) $ + +--- +// Inverted +$a + cancel(x, inverted: #true) - cancel(x, inverted: #true) + 10 + cancel(y) - cancel(y)$ +$ x + cancel("abcdefg", inverted: #true) $ + +--- +// Cross +$a + cancel(b + c + d, cross: #true, stroke: #red) + e$ +$ a + cancel(b + c + d, cross: #true) + e $ + +--- +// Resized and styled +#set page(width: 200pt, height: auto) +$a + cancel(x, length: #200%) - cancel(x, length: #50%, stroke: #{red + 1.1pt})$ +$ b + cancel(x, length: #150%) - cancel(a + b + c, length: #50%, stroke: #{blue + 1.2pt}) $ + +--- +// Rotated +$x + cancel(y, rotation: #90deg) - cancel(z, rotation: #135deg)$ +$ e + cancel((j + e)/(f + e)) - cancel((j + e)/(f + e), rotation: #30deg) $ |
