summaryrefslogtreecommitdiff
path: root/tests/typ/layout/enum-align.typ
diff options
context:
space:
mode:
authorPg Biel <9021226+PgBiel@users.noreply.github.com>2023-05-11 11:36:41 -0300
committerGitHub <noreply@github.com>2023-05-11 16:36:41 +0200
commit1a6224f566ab76a4456f1245b7bc76b4661572b1 (patch)
tree15ac3910c92eca781e5537564d6fa16f72468efd /tests/typ/layout/enum-align.typ
parentb5ad2468adafca40448035c80fdabab4b5f75a0f (diff)
Default enum number alignment to 'end' (#1042)
Diffstat (limited to 'tests/typ/layout/enum-align.typ')
-rw-r--r--tests/typ/layout/enum-align.typ41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/typ/layout/enum-align.typ b/tests/typ/layout/enum-align.typ
new file mode 100644
index 00000000..9d11235c
--- /dev/null
+++ b/tests/typ/layout/enum-align.typ
@@ -0,0 +1,41 @@
+// Test the alignment of enum numbers.
+
+---
+// Alignment shouldn't affect number
+#set align(horizon)
+
++ ABCDEF\ GHIJKL\ MNOPQR
+ + INNER\ INNER\ INNER
++ BACK\ HERE
+
+---
+// Enum number alignment should be 'end' by default
+1. a
+10. b
+100. c
+
+#set enum(number-align: start)
+1. a
+8. b
+16. c
+
+---
+// Number align option should not be affected by the context
+#set align(center)
+#set enum(number-align: start)
+
+4. c
+8. d
+16. e\ f
+ 2. f\ g
+ 32. g
+ 64. h
+
+---
+// Test valid number align values (horizontal)
+#set enum(number-align: start)
+#set enum(number-align: end)
+#set enum(number-align: left)
+#set enum(number-align: right)
+// Error: 25-28 alignment must be horizontal
+#set enum(number-align: top)