Dissolve basics folder
Before Width: | Height: | Size: 30 KiB |
BIN
tests/ref/layout/enum.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@ -1,69 +0,0 @@
|
||||
// Test enumerations.
|
||||
|
||||
---
|
||||
#enum[Embrace][Extend][Extinguish]
|
||||
|
||||
---
|
||||
1. First.
|
||||
2. Indented
|
||||
|
||||
+ Second
|
||||
|
||||
---
|
||||
// Test automatic numbering in summed content.
|
||||
#for i in range(5) {
|
||||
[+ #numbering("I", 1 + i)]
|
||||
}
|
||||
|
||||
---
|
||||
// Test label pattern.
|
||||
#set enum(numbering: "~ A:")
|
||||
1. First
|
||||
+ Second
|
||||
|
||||
#set enum(numbering: "(*)")
|
||||
+ A
|
||||
+ B
|
||||
+ C
|
||||
|
||||
#set enum(numbering: "i)")
|
||||
+ A
|
||||
+ B
|
||||
|
||||
---
|
||||
// Mix of different lists
|
||||
- Bullet List
|
||||
+ Numbered List
|
||||
/ Term: List
|
||||
|
||||
---
|
||||
// Test numbering with closure.
|
||||
#enum(
|
||||
start: 4,
|
||||
spacing: 0.65em - 3pt,
|
||||
tight: false,
|
||||
numbering: n => text(
|
||||
fill: (red, green, blue).at(calc.mod(n, 3)),
|
||||
numbering("A", n),
|
||||
),
|
||||
[Red], [Green], [Blue],
|
||||
)
|
||||
|
||||
---
|
||||
#set enum(numbering: n => n > 1)
|
||||
+ A
|
||||
+ B
|
||||
|
||||
---
|
||||
// Edge cases.
|
||||
+
|
||||
Empty
|
||||
+Nope
|
||||
|
||||
---
|
||||
// Error: 22-24 invalid numbering pattern
|
||||
#set enum(numbering: "")
|
||||
|
||||
---
|
||||
// Error: 22-28 invalid numbering pattern
|
||||
#set enum(numbering: "(())")
|
28
tests/typ/layout/enum.typ
Normal file
@ -0,0 +1,28 @@
|
||||
// Test enumerations.
|
||||
|
||||
---
|
||||
#enum[Embrace][Extend][Extinguish]
|
||||
|
||||
---
|
||||
1. First.
|
||||
2. Indented
|
||||
|
||||
+ Second
|
||||
|
||||
---
|
||||
// Test automatic numbering in summed content.
|
||||
#for i in range(5) {
|
||||
[+ #numbering("I", 1 + i)]
|
||||
}
|
||||
|
||||
---
|
||||
// Mix of different lists
|
||||
- Bullet List
|
||||
+ Numbered List
|
||||
/ Term: List
|
||||
|
||||
---
|
||||
// Edge cases.
|
||||
+
|
||||
Empty
|
||||
+Nope
|