summaryrefslogtreecommitdiff
path: root/tests/typ/insert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/insert')
-rw-r--r--tests/typ/insert/circle.typ23
-rw-r--r--tests/typ/insert/ellipse.typ14
-rw-r--r--tests/typ/insert/image.typ8
-rw-r--r--tests/typ/insert/rect.typ2
-rw-r--r--tests/typ/insert/square.typ11
5 files changed, 32 insertions, 26 deletions
diff --git a/tests/typ/insert/circle.typ b/tests/typ/insert/circle.typ
index 41e0c40d..c46d37e4 100644
--- a/tests/typ/insert/circle.typ
+++ b/tests/typ/insert/circle.typ
@@ -5,23 +5,24 @@
Auto-sized circle. \
#circle(fill: rgb("eb5278"))[
- #align!(center, center)
+ #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)
- But, soft! what light through yonder window breaks?
-]
+#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]
@@ -29,8 +30,8 @@ Expanded by height.
---
// Test relative sizing.
#rect(width: 100%, height: 50pt, fill: rgb("aaa"))[
- #align!(center, center)
- #font!(fill: white)
+ #align(center, center)
+ #font(fill: white)
#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 5044219d..33ba727f 100644
--- a/tests/typ/insert/ellipse.typ
+++ b/tests/typ/insert/ellipse.typ
@@ -2,12 +2,14 @@
---
100% rect in 100% ellipse in fixed rect. \
-#rect(width: 3cm, height: 2cm, fill: rgb("2a631a"))[
- #ellipse!(width: 100%, height: 100%, fill: forest)
- #rect!(width: 100%, height: 100%, fill: conifer)
- #align!(center, center)
- Stuff inside an ellipse!
-]
+#rect(width: 3cm, height: 2cm, fill: rgb("2a631a"),
+ ellipse(width: 100%, height: 100%, fill: forest,
+ rect(width: 100%, height: 100%, fill: conifer)[
+ #align(center, center)
+ Stuff inside an ellipse!
+ ]
+ )
+)
Auto-sized ellipse. \
#ellipse(fill: conifer)[
diff --git a/tests/typ/insert/image.typ b/tests/typ/insert/image.typ
index 9d9c6d46..6359c4bb 100644
--- a/tests/typ/insert/image.typ
+++ b/tests/typ/insert/image.typ
@@ -17,7 +17,10 @@
#image("../../res/rhino.png")
// Fit to height of page.
-#page(height: 40pt, image("../../res/rhino.png"))
+[
+ #page(height: 40pt)
+ #image("../../res/rhino.png")
+]
// Set width explicitly.
#image("../../res/rhino.png", width: 50pt)
@@ -29,7 +32,8 @@
#image("../../res/rhino.png", width: 25pt, height: 50pt)
// Make sure the bounding-box of the image is correct.
-#align(bottom, right, image("../../res/tiger.jpg", width: 60pt))
+#align(bottom, right)
+#image("../../res/tiger.jpg", width: 60pt)
---
// Error: 8-29 file not found
diff --git a/tests/typ/insert/rect.typ b/tests/typ/insert/rect.typ
index 7f6bb899..4824095a 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 dd20ca62..1c856d4f 100644
--- a/tests/typ/insert/square.typ
+++ b/tests/typ/insert/square.typ
@@ -3,22 +3,21 @@
---
Auto-sized square. \
#square(fill: eastern)[
- #align!(center)
- #pad!(5pt)
- #font!(fill: white, weight: bold)
- Typst
+ #font(fill: white, weight: bold)
+ #align(center)
+ #pad(5pt)[Typst]
]
---
// 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?
]