You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
1.9 KiB
90 lines
1.9 KiB
4 years ago
|
////
|
||
|
Included in:
|
||
|
|
||
|
- user-manual: Ordered lists: Numbering styles
|
||
|
////
|
||
|
|
||
|
For ordered lists, Asciidoctor supports the numeration styles such as lowergreek and decimal-leading-zero.
|
||
|
|
||
|
The full list of numeration styles that can be applied to an ordered list are as follows:
|
||
|
|
||
|
[cols="2,3", width="50%"]
|
||
|
.Asciidoctor ordered list numeration styles
|
||
|
|===
|
||
|
|Block style |CSS list-style-type
|
||
|
|
||
|
|arabic
|
||
|
|decimal
|
||
|
|
||
|
|decimal{ast}
|
||
|
|decimal-leading-zero
|
||
|
|
||
|
|loweralpha
|
||
|
|lower-alpha
|
||
|
|
||
|
|upperalpha
|
||
|
|upper-alpha
|
||
|
|
||
|
|lowerroman
|
||
|
|lower-roman
|
||
|
|
||
|
|upperroman
|
||
|
|upper-roman
|
||
|
|
||
|
|lowergreek{ast}
|
||
|
|lower-greek
|
||
|
|===
|
||
|
{ast} These styles are only supported by the HTML converters.
|
||
|
|
||
|
Here are a few examples showing various numeration styles as defined by the block style shown in the header row:
|
||
|
|
||
|
|===
|
||
|
|[arabic]{ast} |[decimal] |[loweralpha] |[lowergreek]
|
||
|
|
||
|
a|
|
||
|
. one
|
||
|
. two
|
||
|
. three
|
||
|
|
||
|
a|
|
||
|
[decimal]
|
||
|
. one
|
||
|
. two
|
||
|
. three
|
||
|
|
||
|
a|
|
||
|
[loweralpha]
|
||
|
. one
|
||
|
. two
|
||
|
. three
|
||
|
|
||
|
a|
|
||
|
[lowergreek]
|
||
|
. one
|
||
|
. two
|
||
|
. three
|
||
|
|===
|
||
|
|
||
|
{ast} Default numeration if block style is not specified
|
||
|
|
||
|
TIP: Custom numeration styles can be implemented using a custom role.
|
||
|
Define a new class selector (e.g., `.custom`) in your stylesheet that sets the `list-style-type` property to the value of your choice.
|
||
|
Then, assign the name of that class as a role on any list to which you want that numeration applied.
|
||
|
|
||
|
When the role shorthand (`.custom`) is used on an ordered list, the numeration style is no longer omitted.
|
||
|
|
||
|
You can override the number scheme for any level by setting its style (the first positional entry in a block attribute list).
|
||
|
You can also set the starting number using the `start` attribute:
|
||
|
|
||
|
[source]
|
||
|
----
|
||
|
include::ex-o-list.adoc[tag=num]
|
||
|
----
|
||
|
|
||
|
====
|
||
|
include::ex-o-list.adoc[tag=num]
|
||
|
====
|
||
|
|
||
|
IMPORTANT: The start attribute must be a number, even when using a different numeration style.
|
||
|
For instance, to start an alphabetic list at letter "c", set the numeration style to loweralpha and the start attribute to 3.
|