diff options
| author | LU Jialin <luxxxlucy@gmail.com> | 2023-10-22 20:07:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-22 14:07:30 +0200 |
| commit | f81a8d00e3c26e5080f3f32ce775c9f7f04db53c (patch) | |
| tree | 59793431e82c66e0e85d3db47e249a3cc9b5c598 /tests | |
| parent | b97ee93b8f8c3554d583e467a32494d78fde3f99 (diff) | |
Refactor `cancel`, now able to take absolute angle or functions (#2466)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/math/cancel.png | bin | 24765 -> 24825 bytes | |||
| -rw-r--r-- | tests/ref/math/spacing.png | bin | 21090 -> 20645 bytes | |||
| -rw-r--r-- | tests/typ/math/cancel.typ | 14 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tests/ref/math/cancel.png b/tests/ref/math/cancel.png Binary files differindex 146bb855..b39d8d2d 100644 --- a/tests/ref/math/cancel.png +++ b/tests/ref/math/cancel.png diff --git a/tests/ref/math/spacing.png b/tests/ref/math/spacing.png Binary files differindex c9522b36..20faf665 100644 --- a/tests/ref/math/spacing.png +++ b/tests/ref/math/spacing.png diff --git a/tests/typ/math/cancel.typ b/tests/typ/math/cancel.typ index 315cc7d4..ac715154 100644 --- a/tests/typ/math/cancel.typ +++ b/tests/typ/math/cancel.typ @@ -25,10 +25,14 @@ $ 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}) $ +$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) $ +// Specifying cancel line angle with an absolute angle +$cancel(x, angle: #0deg) + cancel(x, angle: #45deg) + cancel(x, angle: #90deg) + cancel(x, angle: #135deg)$ + +--- +// Specifying cancel line angle with a function +$x + cancel(y, angle: #{angle => angle + 90deg}) - cancel(z, angle: #(angle => angle + 135deg))$ +$ e + cancel((j + e)/(f + e)) - cancel((j + e)/(f + e), angle: #(angle => angle + 30deg)) $ |
