diff options
| author | Eric Biedert <github@ericbiedert.de> | 2023-07-10 11:00:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 11:00:12 +0200 |
| commit | be0f8fe6d70bc5919e4351b73a2835e89001b000 (patch) | |
| tree | eb7c9ad54fcc1a53171f1e0b9ea67663a64fe596 /tests | |
| parent | 7404f85a02450c291ee408700e7874cb85a06e42 (diff) | |
Customizable math classes (#1681)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/math/class.png | bin | 0 -> 5308 bytes | |||
| -rw-r--r-- | tests/typ/math/class.typ | 33 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/ref/math/class.png b/tests/ref/math/class.png Binary files differnew file mode 100644 index 00000000..dffb6f7a --- /dev/null +++ b/tests/ref/math/class.png diff --git a/tests/typ/math/class.typ b/tests/typ/math/class.typ new file mode 100644 index 00000000..188e7d90 --- /dev/null +++ b/tests/typ/math/class.typ @@ -0,0 +1,33 @@ +// Test math classes. + +--- +// Test characters. +$ a class("normal", +) b \ + a class("binary", .) b \ + lr(class("opening", \/) a/b class("closing", \\)) \ + { x class("fence", \;) x > 0} \ + a class("large", \/) b \ + a class("punctuation", :) b \ + a class("relation", ~) b \ + a + class("unary", times) b \ + class("vary", :) a class("vary", :) b $ + +--- +// Test custom content. +#let dotsq = square( + size: 0.7em, + stroke: 0.5pt, + align(center+horizon, circle(radius: 0.15em, fill: black)) +) + +$ a dotsq b \ + a class("normal", dotsq) b \ + a class("vary", dotsq) b \ + a + class("vary", dotsq) b \ + a class("punctuation", dotsq) b $ + +--- +// Test nested. +#let normal = math.class.with("normal") +#let pluseq = $class("binary", normal(+) normal(=))$ +$ a pluseq 5 $ |
