summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ')
-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.typ27
-rw-r--r--tests/typ/math/attach-p3.typ24
3 files changed, 53 insertions, 51 deletions
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$