diff options
| author | damaxwell <damaxwell@alaska.edu> | 2023-07-18 00:26:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-18 10:26:20 +0200 |
| commit | e43903d625f1009befe4f2341e52a720d657ad05 (patch) | |
| tree | c9f970c07cfc4c89055251795d9cb105e5f007fd | |
| parent | 7a1cd362aa150045371cc85578ef50bef2951be2 (diff) | |
split attach test (#1744)
| -rw-r--r-- | tests/ref/math/attach-p1.png | bin | 0 -> 13740 bytes | |||
| -rw-r--r-- | tests/ref/math/attach-p2.png | bin | 0 -> 11071 bytes | |||
| -rw-r--r-- | tests/ref/math/attach-p3.png | bin | 0 -> 5860 bytes | |||
| -rw-r--r-- | tests/ref/math/attach.png | bin | 30373 -> 0 bytes | |||
| -rw-r--r-- | tests/typ/math/attach-p1.typ (renamed from tests/typ/math/attach.typ) | 53 | ||||
| -rw-r--r-- | tests/typ/math/attach-p2.typ | 27 | ||||
| -rw-r--r-- | tests/typ/math/attach-p3.typ | 24 |
7 files changed, 53 insertions, 51 deletions
diff --git a/tests/ref/math/attach-p1.png b/tests/ref/math/attach-p1.png Binary files differnew file mode 100644 index 00000000..0b9b8f34 --- /dev/null +++ b/tests/ref/math/attach-p1.png diff --git a/tests/ref/math/attach-p2.png b/tests/ref/math/attach-p2.png Binary files differnew file mode 100644 index 00000000..242be908 --- /dev/null +++ b/tests/ref/math/attach-p2.png diff --git a/tests/ref/math/attach-p3.png b/tests/ref/math/attach-p3.png Binary files differnew file mode 100644 index 00000000..ac3c3895 --- /dev/null +++ b/tests/ref/math/attach-p3.png diff --git a/tests/ref/math/attach.png b/tests/ref/math/attach.png Binary files differdeleted file mode 100644 index 370a2ba7..00000000 --- a/tests/ref/math/attach.png +++ /dev/null diff --git a/tests/typ/math/attach.typ b/tests/typ/math/attach-p1.typ index d471551a..94dc48ea 100644 --- a/tests/typ/math/attach.typ +++ b/tests/typ/math/attach-p1.typ @@ -1,4 +1,4 @@ -// Test t and b attachments. +// Test t and b attachments, part 1. --- // Test basics, postscripts. @@ -56,53 +56,4 @@ $ 1/(V^2^3^4^5), bl: attach(2, bl: attach(3, bl: attach(4, bl: 5))), br: attach(2, br: attach(3, br: attach(4, br: 5))), ) -$ - ---- -// Test high subscript and superscript. -$ sqrt(a_(1/2)^zeta), sqrt(a_alpha^(1/2)), sqrt(a_(1/2)^(3/4)) \ - sqrt(attach(a, tl: 1/2, bl: 3/4)), - sqrt(attach(a, tl: 1/2, bl: 3/4, tr: 1/2, br: 3/4)) $ - ---- -// Test for no collisions between descenders/ascenders and attachments - -$ sup_(x in P_i) quad inf_(x in P_i) $ -$ op("fff",limits: #true)^(y) quad op("yyy", limits:#true)_(f) $ - ---- -// Test frame base. -$ (-1)^n + (1/2 + 3)^(-1/2) $ - ---- -#set text(size: 8pt) - -// Test that the attachments are aligned horizontally. -$ x_1 p_1 frak(p)_1 2_1 dot_1 lg_1 !_1 \\_1 ]_1 "ip"_1 op("iq")_1 \ - x^1 b^1 frak(b)^1 2^1 dot^1 lg^1 !^1 \\^1 ]^1 "ib"^1 op("id")^1 \ - x_1 y_1 "_"_1 x^1 l^1 "`"^1 attach(I,tl:1,bl:1,tr:1,br:1) - scripts(sum)_1^1 integral_1^1 |1/2|_1^1 \ - x^1_1, "("b y")"^1_1 != (b y)^1_1, "[∫]"_1 [integral]_1 $ - ---- -// Test limit. -$ lim_(n->oo \ n "grows") sum_(k=0 \ k in NN)^n k $ - ---- -// Test forcing scripts and limits. -$ limits(A)_1^2 != A_1^2 $ -$ scripts(sum)_1^2 != sum_1^2 $ -$ limits(integral)_a^b != integral_a^b $ - ---- -// Error: 30-34 unknown variable: oops -$ attach(A, t: #locate(it => oops)) $ - ---- -// Show and let rules for limits and scripts -#let eq = $ ∫_a^b iota_a^b $ -#eq -#show "∫": math.limits -#show math.iota: math.limits.with(inline: false) -#eq -$iota_a^b$ +$
\ No newline at end of file diff --git a/tests/typ/math/attach-p2.typ b/tests/typ/math/attach-p2.typ new file mode 100644 index 00000000..f618f21a --- /dev/null +++ b/tests/typ/math/attach-p2.typ @@ -0,0 +1,27 @@ +// Test t and b attachments, part 2. + +--- +// Test high subscript and superscript. +$ sqrt(a_(1/2)^zeta), sqrt(a_alpha^(1/2)), sqrt(a_(1/2)^(3/4)) \ + sqrt(attach(a, tl: 1/2, bl: 3/4)), + sqrt(attach(a, tl: 1/2, bl: 3/4, tr: 1/2, br: 3/4)) $ + +--- +// Test for no collisions between descenders/ascenders and attachments + +$ sup_(x in P_i) quad inf_(x in P_i) $ +$ op("fff",limits: #true)^(y) quad op("yyy", limits:#true)_(f) $ + +--- +// Test frame base. +$ (-1)^n + (1/2 + 3)^(-1/2) $ + +--- +#set text(size: 8pt) + +// Test that the attachments are aligned horizontally. +$ x_1 p_1 frak(p)_1 2_1 dot_1 lg_1 !_1 \\_1 ]_1 "ip"_1 op("iq")_1 \ + x^1 b^1 frak(b)^1 2^1 dot^1 lg^1 !^1 \\^1 ]^1 "ib"^1 op("id")^1 \ + x_1 y_1 "_"_1 x^1 l^1 "`"^1 attach(I,tl:1,bl:1,tr:1,br:1) + scripts(sum)_1^1 integral_1^1 |1/2|_1^1 \ + x^1_1, "("b y")"^1_1 != (b y)^1_1, "[∫]"_1 [integral]_1 $ diff --git a/tests/typ/math/attach-p3.typ b/tests/typ/math/attach-p3.typ new file mode 100644 index 00000000..0fc25d63 --- /dev/null +++ b/tests/typ/math/attach-p3.typ @@ -0,0 +1,24 @@ +// Test t and b attachments, part 3. + +--- +// Test limit. +$ lim_(n->oo \ n "grows") sum_(k=0 \ k in NN)^n k $ + +--- +// Test forcing scripts and limits. +$ limits(A)_1^2 != A_1^2 $ +$ scripts(sum)_1^2 != sum_1^2 $ +$ limits(integral)_a^b != integral_a^b $ + +--- +// Error: 30-34 unknown variable: oops +$ attach(A, t: #locate(it => oops)) $ + +--- +// Show and let rules for limits and scripts +#let eq = $ ∫_a^b iota_a^b $ +#eq +#show "∫": math.limits +#show math.iota: math.limits.with(inline: false) +#eq +$iota_a^b$ |
