blob: 46f4621f50b5e6eda4c014bb261ad9b5165f4f91 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
// Test bullet lists.
--- list-basic ---
_Shopping list_
#list[Apples][Potatoes][Juice]
--- list-nested ---
- First level.
- Second level.
There are multiple paragraphs.
- Third level.
Still the same bullet point.
- Still level 2.
- At the top.
--- list-content-block ---
- Level 1
- Level #[
2 through content block
]
--- list-top-level-indent ---
- Top-level indent
- is fine.
--- list-indent-specifics ---
- A
- B
- C
- D
--- list-tabs ---
// This works because tabs are used consistently.
- A with 1 tab
- B with 2 tabs
--- list-mixed-tabs-and-spaces ---
// This doesn't work because of mixed tabs and spaces.
- A with 2 spaces
- B with 2 tabs
--- list-syntax-edge-cases ---
// Edge cases.
-
Not in list
-Nope
--- list-marker-align-unaffected ---
// Alignment shouldn't affect marker
#set align(horizon)
- ABCDEF\ GHIJKL\ MNOPQR
--- list-marker-dash ---
// Test en-dash.
#set list(marker: [--])
- A
- B
--- list-marker-cycle ---
// Test that items are cycled.
#set list(marker: ([--], [•]))
- A
- B
- C
--- list-marker-closure ---
// Test function.
#set list(marker: n => if n == 1 [--] else [•])
- A
- B
- C
- D
- E
- F
--- list-marker-bare-hyphen ---
// Test that bare hyphen doesn't lead to cycles and crashes.
#set list(marker: [-])
- Bare hyphen is
- a bad marker
--- list-marker-array-empty ---
// Error: 19-21 array must contain at least one marker
#set list(marker: ())
--- list-attached ---
// Test basic attached list.
Attached to:
- the bottom
- of the paragraph
Next paragraph.
--- list-attached-above-spacing ---
// Test that attached list isn't affected by block spacing.
#show list: set block(above: 100pt)
Hello
- A
World
- B
--- list-non-attached-followed-by-attached ---
// Test non-attached list followed by attached list,
// separated by only word.
Hello
- A
World
- B
--- list-tight-non-attached-tight ---
// Test non-attached tight list.
#set block(spacing: 15pt)
Hello
- A
World
- B
- C
More.
--- list-wide-cannot-attach ---
// Test that wide lists cannot be ...
#set par(spacing: 15pt)
Hello
- A
- B
World
--- list-wide-really-cannot-attach ---
// ... even if forced to.
Hello
#list(tight: false)[A][B]
World
--- list-items-context ---
#context [+ A]
#context [+ B]
#context [+ C]
--- list-item-styling ---
- Hello
#text(red)[- World]
#text(green)[- What up?]
--- issue-2530-list-item-panic ---
// List item (pre-emptive)
#list.item[Hello]
--- issue-1850-list-attach-spacing ---
// List attachment should only work with paragraphs, not other blocks.
#set page(width: auto)
#let part = box.with(stroke: 1pt, inset: 3pt)
#{
part[
$ x $
- A
]
part($ x $ + list[A])
part($ x $ + list[ A ])
part[
$ x $
- A
]
part($ x $ + parbreak() + list[A])
part($ x $ + parbreak() + parbreak() + list[A])
}
|