summaryrefslogtreecommitdiff
path: root/tests/typ/insert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/insert')
-rw-r--r--tests/typ/insert/circle.typ20
-rw-r--r--tests/typ/insert/ellipse.typ9
-rw-r--r--tests/typ/insert/rect.typ2
-rw-r--r--tests/typ/insert/square.typ13
4 files changed, 24 insertions, 20 deletions
diff --git a/tests/typ/insert/circle.typ b/tests/typ/insert/circle.typ
index d2fa928e..1c8808a4 100644
--- a/tests/typ/insert/circle.typ
+++ b/tests/typ/insert/circle.typ
@@ -4,18 +4,24 @@
// Test auto sizing.
Auto-sized circle. \
-#circle(fill: #eb5278, align(center, center, [But, soft!]))
+#circle(fill: #eb5278)[
+ #align!(center, center)
+ But, soft!
+]
Center-aligned rect in auto-sized circle.
#circle(fill: forest)[
- #align(center, center)
- #rect(fill: conifer, pad(5pt)[But, soft!])
+ #align!(center, center)
+ #rect!(fill: conifer)
+ #pad!(5pt)
+ But, soft!
]
100%-width rect in auto-sized circle. \
-#circle(fill: forest, rect(width: 100%, fill: conifer)[
+#circle(fill: forest)[
+ #rect!(width: 100%, fill: conifer)
But, soft! what light through yonder window breaks?
-])
+]
Expanded by height.
#circle(fill: conifer)[A \ B \ C]
@@ -23,8 +29,8 @@ Expanded by height.
---
// Test relative sizing.
#rect(width: 100%, height: 50pt, fill: #aaa)[
- #align(center, center)
- #font(color: #fff)
+ #align!(center, center)
+ #font!(color: #fff)
#circle(radius: 10pt, fill: eastern)[A]
#circle(height: 60%, fill: eastern)[B]
#circle(width: 20% + 20pt, fill: eastern)[C]
diff --git a/tests/typ/insert/ellipse.typ b/tests/typ/insert/ellipse.typ
index 9b10eded..a086ab74 100644
--- a/tests/typ/insert/ellipse.typ
+++ b/tests/typ/insert/ellipse.typ
@@ -3,11 +3,10 @@
---
100% rect in 100% ellipse in fixed rect. \
#rect(width: 3cm, height: 2cm, fill: #2a631a)[
- #ellipse(width: 100%, height: 100%, fill: forest)[
- #rect(width: 100%, height: 100%, fill: conifer)[
- #align(center, center)[Stuff inside an ellipse!]
- ]
- ]
+ #ellipse!(width: 100%, height: 100%, fill: forest)
+ #rect!(width: 100%, height: 100%, fill: conifer)
+ #align!(center, center)
+ Stuff inside an ellipse!
]
Auto-sized ellipse. \
diff --git a/tests/typ/insert/rect.typ b/tests/typ/insert/rect.typ
index f450064a..93df071b 100644
--- a/tests/typ/insert/rect.typ
+++ b/tests/typ/insert/rect.typ
@@ -3,7 +3,7 @@
---
// Test the `rect` function.
-#page(width: 150pt)
+#page!(width: 150pt)
// Fit to text.
#rect(fill: conifer)[Textbox]
diff --git a/tests/typ/insert/square.typ b/tests/typ/insert/square.typ
index 649d31c0..4dd8964f 100644
--- a/tests/typ/insert/square.typ
+++ b/tests/typ/insert/square.typ
@@ -3,11 +3,10 @@
---
Auto-sized square. \
#square(fill: eastern)[
- #align(center)
- #pad(5pt)[
- #font(color: #fff, weight: bold)
- Typst
- ]
+ #align!(center)
+ #pad!(5pt)
+ #font!(color: #fff, weight: bold)
+ Typst
]
---
@@ -18,14 +17,14 @@ Auto-sized square. \
---
// Test height overflow.
-#page(width: 75pt, height: 100pt)
+#page!(width: 75pt, height: 100pt)
#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]
---
// Test width overflow.
-#page(width: 100pt, height: 75pt)
+#page!(width: 100pt, height: 75pt)
#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]