List
A list of items, each marked with a bullet or a number that the engine writes. A list holds li items, an item holds what a layout holds, and a list inside an item is a list under it. Nothing is numbered by hand: add an item and the numbers after it change.
<list> <li><text>Rinse the rice until the water runs clear.</text></li> <li><text>Cover it with twice its volume of water.</text></li> <li><text>Cook it for fifteen minutes, then let it stand.</text></li></list>L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['Rinse the rice until the water runs clear.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Cover it with twice its volume of water.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Cook it for fifteen minutes, then let it stand.']), ]),])L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['Rinse the rice until the water runs clear.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Cover it with twice its volume of water.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Cook it for fifteen minutes, then let it stand.']) ])])L.list(NoAttr, List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Rinse the rice until the water runs clear.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Cover it with twice its volume of water.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Cook it for fifteen minutes, then let it stand.")) ))))L.List(NoAttr, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Rinse the rice until the water runs clear."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Cover it with twice its volume of water."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Cook it for fifteen minutes, then let it stand."]), ]),])L::list(NoAttr, [ L::li(NoAttr, [ L::text(NoAttr, ['Rinse the rice until the water runs clear.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Cover it with twice its volume of water.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Cook it for fifteen minutes, then let it stand.']), ]),])The words of an item go in a text. A long item wraps under its own words, not under the marker, and splits across pages like any text: the marker stays with the first part, and the lines after the break stand under the words. A list splits between its items, and inside an item as the text in it does.
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
type |
string | bullet |
bullet marks each item with a shape, number with a number |
bullet |
string | by depth | The shape of a bullet list: disc circle square dash. See Bullets |
format |
string | decimal |
How a number list writes its numbers: decimal lower-alpha upper-alpha lower-roman upper-roman. See Numbers |
start |
integer | 1 |
The number of a number list’s first item |
prefix |
string | — | Text before each number: ( |
suffix |
string | . |
Text after each number: ) |
indent |
token/length | 24pt |
The width of the marker’s column. See Indent |
gap |
token/length | — | Space between the items |
font, font-size, color |
inherit | Set the text inside and the markers, as on a box | |
padding, background, border, radius, opacity, shadow, width, height |
As on a box | ||
paginate, debug |
As on a box | ||
bulk |
boolean | false |
true lays out the items of its li with data-source a page at a time, straight from the data, for lists of tens of thousands of items. See Bulk Records |
data-source, data-if, data-if-not, data-color, data-background |
string | — | As on a box |
ocg |
string | — | print or screen: shown only in print, or only on screen. See Print and screen content |
An li takes the attributes of a box too, other than width: padding, background, border and radius go around the marker and the words together, and gap goes between the children of the item: the gap of the list, so a text and the list under it are spaced like two items, unless the item sets its own. Its data-source repeats the item once for each entry of the data.
Bullets
Section titled “Bullets”A bullet is drawn as a shape, so it looks the same in every font, and takes the color and size of the first text of its item. Without a bullet a list uses a disc, a list inside a bullet list a circle, and one inside that a square, then the three again. A number list between them is not a level.
<list> <li> <text>A disc at the top level.</text> <list> <li> <text>A circle one level down.</text> <list> <li><text>A square one level further.</text></li> </list> </li> </list> </li></list>L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A disc at the top level.']), L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A circle one level down.']), L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A square one level further.']), ]), ]), ]), ]), ]),])L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A disc at the top level.']), L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A circle one level down.']), L.list(NoAttr, [ L.li(NoAttr, [ L.text(NoAttr, ['A square one level further.']) ]) ]) ]) ]) ])])L.list(NoAttr, List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("A disc at the top level.")), L.list(NoAttr, List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("A circle one level down.")), L.list(NoAttr, List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("A square one level further.")) )) )) )) )) ))))L.List(NoAttr, [ L.Li(NoAttr, [ L.Text(NoAttr, ["A disc at the top level."]), L.List(NoAttr, [ L.Li(NoAttr, [ L.Text(NoAttr, ["A circle one level down."]), L.List(NoAttr, [ L.Li(NoAttr, [ L.Text(NoAttr, ["A square one level further."]), ]), ]), ]), ]), ]),])L::list(NoAttr, [ L::li(NoAttr, [ L::text(NoAttr, ['A disc at the top level.']), L::list(NoAttr, [ L::li(NoAttr, [ L::text(NoAttr, ['A circle one level down.']), L::list(NoAttr, [ L::li(NoAttr, [ L::text(NoAttr, ['A square one level further.']), ]), ]), ]), ]), ]),])bullet sets the shape of a list, whatever its depth. A dash is a bullet like the others.
<list bullet="dash"> <li><text>Notes under an invoice</text></li> <li><text>Release notes</text></li></list>L.list({ bullet: 'dash' }, [ L.li(NoAttr, [ L.text(NoAttr, ['Notes under an invoice']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Release notes']), ]),])L.list(ListAttr(bullet='dash'), [ L.li(NoAttr, [ L.text(NoAttr, ['Notes under an invoice']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Release notes']) ])])L.list(new ListAttr().bullet("dash"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Notes under an invoice")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Release notes")) ))))L.List(new() { Bullet = "dash" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Notes under an invoice"]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Release notes"]), ]),])L::list(new ListAttr(bullet: 'dash'), [ L::li(NoAttr, [ L::text(NoAttr, ['Notes under an invoice']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Release notes']), ]),])Numbers
Section titled “Numbers”type="number" numbers the items from 1. The format is how a number is written, and start is where a list begins, which is how a list that something cut in two goes on.
format |
Writes |
|---|---|
decimal |
1, 2, 3 |
lower-alpha |
a, b, c, then aa, ab |
upper-alpha |
A, B, C |
lower-roman |
i, ii, iii |
upper-roman |
I, II, III |
A number that a letter or a numeral cannot write, one below 1, and one above 3999 for a numeral, is written in decimal.
<column gap="m"> <list type="number"> <li><text>Decimal, which is the default.</text></li> <li><text>The second item.</text></li> </list> <list type="number" format="lower-roman" start="3"> <li><text>Numerals, from three.</text></li> <li><text>Four.</text></li> </list></column>L.column({ gap: 'm' }, [ L.list({ type: 'number' }, [ L.li(NoAttr, [ L.text(NoAttr, ['Decimal, which is the default.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['The second item.']), ]), ]), L.list({ type: 'number', format: 'lower-roman', start: 3 }, [ L.li(NoAttr, [ L.text(NoAttr, ['Numerals, from three.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Four.']), ]), ]),])L.column(ColumnAttr(gap='m'), [ L.list(ListAttr(type='number'), [ L.li(NoAttr, [ L.text(NoAttr, ['Decimal, which is the default.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['The second item.']) ]) ]), L.list(ListAttr(type='number', format='lower-roman', start=3), [ L.li(NoAttr, [ L.text(NoAttr, ['Numerals, from three.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Four.']) ]) ])])L.column(new ColumnAttr().gap("m"), List.of( L.list(new ListAttr().type("number"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Decimal, which is the default.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("The second item.")) )) )), L.list(new ListAttr().type("number").format("lower-roman").start(3), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Numerals, from three.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Four.")) )) ))))L.Column(new() { Gap = "m" }, [ L.List(new() { Type = "number" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Decimal, which is the default."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["The second item."]), ]), ]), L.List(new() { Type = "number", Format = "lower-roman", Start = 3 }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Numerals, from three."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Four."]), ]), ]),])L::column(new ColumnAttr(gap: 'm'), [ L::list(new ListAttr(type: 'number'), [ L::li(NoAttr, [ L::text(NoAttr, ['Decimal, which is the default.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['The second item.']), ]), ]), L::list(new ListAttr(type: 'number', format: 'lower-roman', start: 3), [ L::li(NoAttr, [ L::text(NoAttr, ['Numerals, from three.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Four.']), ]), ]),])prefix and suffix write what stands around a number. A full stop follows it unless suffix says otherwise, so suffix=")" writes a), and with prefix="(" too, (a).
<list type="number" format="lower-alpha" prefix="(" suffix=")"> <li><text>The first part of the clause.</text></li> <li><text>The second part.</text></li></list>L.list({ type: 'number', format: 'lower-alpha', prefix: '(', suffix: ')' }, [ L.li(NoAttr, [ L.text(NoAttr, ['The first part of the clause.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['The second part.']), ]),])L.list(ListAttr(type='number', format='lower-alpha', prefix='(', suffix=')'), [ L.li(NoAttr, [ L.text(NoAttr, ['The first part of the clause.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['The second part.']) ])])L.list(new ListAttr().type("number").format("lower-alpha").prefix("(").suffix(")"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("The first part of the clause.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("The second part.")) ))))L.List(new() { Type = "number", Format = "lower-alpha", Prefix = "(", Suffix = ")" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["The first part of the clause."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["The second part."]), ]),])L::list(new ListAttr(type: 'number', format: 'lower-alpha', prefix: '(', suffix: ')'), [ L::li(NoAttr, [ L::text(NoAttr, ['The first part of the clause.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['The second part.']), ]),])A number is set at the right of its column, so 9. and 10. end together. The numbers follow the items that are there once the data is in: an item that data-if leaves out takes no number.
Nested lists
Section titled “Nested lists”A list inside an item starts where the words of the item start, and its numbers start over. Each level takes indent from the width of the page. Lists nest 47 deep at most in a layout: each level is a list and an li, and a document nests 100 levels (see XML Schema).
<list type="number"> <li> <text>The supplier delivers the goods to the address in the order.</text> <list type="number" format="lower-alpha" prefix="(" suffix=")"> <li><text>Delivery takes place on a weekday between nine and five.</text></li> <li> <text>The buyer signs for the goods, and the supplier may refuse delivery when:</text> <list type="number" format="lower-roman" prefix="(" suffix=")"> <li><text>nobody is at the address to sign, or</text></li> <li><text>the person who signs is not of age.</text></li> </list> </li> </list> </li> <li><text>Risk passes to the buyer on delivery.</text></li></list>L.list({ type: 'number' }, [ L.li(NoAttr, [ L.text(NoAttr, ['The supplier delivers the goods to the address in the order.']), L.list({ type: 'number', format: 'lower-alpha', prefix: '(', suffix: ')' }, [ L.li(NoAttr, [ L.text(NoAttr, ['Delivery takes place on a weekday between nine and five.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['The buyer signs for the goods, and the supplier may refuse delivery when:']), L.list({ type: 'number', format: 'lower-roman', prefix: '(', suffix: ')' }, [ L.li(NoAttr, [ L.text(NoAttr, ['nobody is at the address to sign, or']), ]), L.li(NoAttr, [ L.text(NoAttr, ['the person who signs is not of age.']), ]), ]), ]), ]), ]), L.li(NoAttr, [ L.text(NoAttr, ['Risk passes to the buyer on delivery.']), ]),])L.list(ListAttr(type='number'), [ L.li(NoAttr, [ L.text(NoAttr, ['The supplier delivers the goods to the address in the order.']), L.list(ListAttr(type='number', format='lower-alpha', prefix='(', suffix=')'), [ L.li(NoAttr, [ L.text(NoAttr, ['Delivery takes place on a weekday between nine and five.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['The buyer signs for the goods, and the supplier may refuse delivery when:']), L.list(ListAttr(type='number', format='lower-roman', prefix='(', suffix=')'), [ L.li(NoAttr, [ L.text(NoAttr, ['nobody is at the address to sign, or']) ]), L.li(NoAttr, [ L.text(NoAttr, ['the person who signs is not of age.']) ]) ]) ]) ]) ]), L.li(NoAttr, [ L.text(NoAttr, ['Risk passes to the buyer on delivery.']) ])])L.list(new ListAttr().type("number"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("The supplier delivers the goods to the address in the order.")), L.list(new ListAttr().type("number").format("lower-alpha").prefix("(").suffix(")"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Delivery takes place on a weekday between nine and five.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("The buyer signs for the goods, and the supplier may refuse delivery when:")), L.list(new ListAttr().type("number").format("lower-roman").prefix("(").suffix(")"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("nobody is at the address to sign, or")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("the person who signs is not of age.")) )) )) )) )) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Risk passes to the buyer on delivery.")) ))))L.List(new() { Type = "number" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["The supplier delivers the goods to the address in the order."]), L.List(new() { Type = "number", Format = "lower-alpha", Prefix = "(", Suffix = ")" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Delivery takes place on a weekday between nine and five."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["The buyer signs for the goods, and the supplier may refuse delivery when:"]), L.List(new() { Type = "number", Format = "lower-roman", Prefix = "(", Suffix = ")" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["nobody is at the address to sign, or"]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["the person who signs is not of age."]), ]), ]), ]), ]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Risk passes to the buyer on delivery."]), ]),])L::list(new ListAttr(type: 'number'), [ L::li(NoAttr, [ L::text(NoAttr, ['The supplier delivers the goods to the address in the order.']), L::list(new ListAttr(type: 'number', format: 'lower-alpha', prefix: '(', suffix: ')'), [ L::li(NoAttr, [ L::text(NoAttr, ['Delivery takes place on a weekday between nine and five.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['The buyer signs for the goods, and the supplier may refuse delivery when:']), L::list(new ListAttr(type: 'number', format: 'lower-roman', prefix: '(', suffix: ')'), [ L::li(NoAttr, [ L::text(NoAttr, ['nobody is at the address to sign, or']), ]), L::li(NoAttr, [ L::text(NoAttr, ['the person who signs is not of age.']), ]), ]), ]), ]), ]), L::li(NoAttr, [ L::text(NoAttr, ['Risk passes to the buyer on delivery.']), ]),])Indent
Section titled “Indent”indent is the width of the marker’s column, and so how far the words of an item stand from the left edge of the list. A list inside an item starts there, so every level takes the same. A marker that is wider than the column, such as VIII., is not made to fit: give the list an indent that has room for it.
<list type="number" format="upper-roman" start="8" indent="32pt"> <li><text>Eight</text></li> <li><text>Nine</text></li> <li><text>Ten</text></li></list>L.list({ type: 'number', format: 'upper-roman', start: 8, indent: '32pt' }, [ L.li(NoAttr, [ L.text(NoAttr, ['Eight']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Nine']), ]), L.li(NoAttr, [ L.text(NoAttr, ['Ten']), ]),])L.list(ListAttr(type='number', format='upper-roman', start=8, indent='32pt'), [ L.li(NoAttr, [ L.text(NoAttr, ['Eight']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Nine']) ]), L.li(NoAttr, [ L.text(NoAttr, ['Ten']) ])])L.list(new ListAttr().type("number").format("upper-roman").start(8).indent("32pt"), List.of( L.li(NoAttr, List.of( L.text(NoAttr, List.of("Eight")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Nine")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("Ten")) ))))L.List(new() { Type = "number", Format = "upper-roman", Start = 8, Indent = "32pt" }, [ L.Li(NoAttr, [ L.Text(NoAttr, ["Eight"]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Nine"]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["Ten"]), ]),])L::list(new ListAttr(type: 'number', format: 'upper-roman', start: 8, indent: '32pt'), [ L::li(NoAttr, [ L::text(NoAttr, ['Eight']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Nine']), ]), L::li(NoAttr, [ L::text(NoAttr, ['Ten']), ]),])An item that is a box
Section titled “An item that is a box”An li takes the box attributes, so an item can be a card.
<list gap="s"> <li background="#eef3fc" padding="8pt" radius="4pt"> <text font="Helvetica-Bold">A tinted item.</text> <text>A second paragraph in the same item, under the first, with the marker beside the first line only.</text> </li> <li><text>An item with no box.</text></li></list>L.list({ gap: 's' }, [ L.li({ background: '#eef3fc', padding: '8pt', radius: '4pt' }, [ L.text({ font: 'Helvetica-Bold' }, ['A tinted item.']), L.text(NoAttr, ['A second paragraph in the same item, under the first, with the marker beside the first line only.']), ]), L.li(NoAttr, [ L.text(NoAttr, ['An item with no box.']), ]),])L.list(ListAttr(gap='s'), [ L.li(LiAttr(background='#eef3fc', padding='8pt', radius='4pt'), [ L.text(TextAttr(font='Helvetica-Bold'), ['A tinted item.']), L.text(NoAttr, ['A second paragraph in the same item, under the first, with the marker beside the first line only.']) ]), L.li(NoAttr, [ L.text(NoAttr, ['An item with no box.']) ])])L.list(new ListAttr().gap("s"), List.of( L.li(new LiAttr().background("#eef3fc").padding("8pt").radius("4pt"), List.of( L.text(new TextAttr().font("Helvetica-Bold"), List.of("A tinted item.")), L.text(NoAttr, List.of("A second paragraph in the same item, under the first, with the marker beside the first line only.")) )), L.li(NoAttr, List.of( L.text(NoAttr, List.of("An item with no box.")) ))))L.List(new() { Gap = "s" }, [ L.Li(new() { Background = "#eef3fc", Padding = "8pt", Radius = "4pt" }, [ L.Text(new() { Font = "Helvetica-Bold" }, ["A tinted item."]), L.Text(NoAttr, ["A second paragraph in the same item, under the first, with the marker beside the first line only."]), ]), L.Li(NoAttr, [ L.Text(NoAttr, ["An item with no box."]), ]),])L::list(new ListAttr(gap: 's'), [ L::li(new LiAttr(background: '#eef3fc', padding: '8pt', radius: '4pt'), [ L::text(new TextAttr(font: 'Helvetica-Bold'), ['A tinted item.']), L::text(NoAttr, ['A second paragraph in the same item, under the first, with the marker beside the first line only.']), ]), L::li(NoAttr, [ L::text(NoAttr, ['An item with no box.']), ]),])Items from data
Section titled “Items from data”data-source on an li makes one item for each entry of a list in the data, and the numbers of a number list follow what it makes. For tens of thousands of items, see Bulk Records.
<list type="number"> <li data-source="clauses"><text data-value="text">A clause</text></li></list>