返回 marp
fragmented-list.md
根目录 / website / docs / guide / fragmented-list.md
1 # Fragmented list
2
3 Marp uses some uncommon list markers to denote a **fragmented list** (also known as an incremental list or builds), which allows list content to appear incrementally.
4
5 Fragmented lists are _only available if you export to HTML_. If you export to PDF and PPTX, the fragmented list will be rendered as a normal list.
6
7 > Be careful when using fragmented lists. While fragmented lists can help focus the audience's attention on the last displayed item, they may also create confusion about hidden items. Some articles recommend never using builds (e.g. [Presentation Rules](http://www.jilles.net/perma/2020/06/05/presentation-rules.html)).
8
9 ## For bullet lists
10
11 CommonMark's bullet list markers are `-`, `+`, and `*` (https://spec.commonmark.org/0.29/#bullet-list-marker). If you use `*` as the marker, Marp will parse the list as a fragmented list.
12
13 <!-- prettier-ignore-start -->
14
15 ```markdown
16 # Bullet list
17
18 - One
19 - Two
20 - Three
21
22 ---
23
24 # Fragmented list
25
26 * One
27 * Two
28 * Three
29 ```
30
31 <!-- prettier-ignore-end -->
32
33 ## For ordered list
34
35 CommonMark's [ordered list marker](https://spec.commonmark.org/0.29/#ordered-list-marker) must have `.` or `)` after digits. If you use `)` as the following character, then Marp will parse the ordered list as a fragmented list.
36
37 <!-- prettier-ignore-start -->
38
39 ```markdown
40 # Ordered list
41
42 1. One
43 2. Two
44 3. Three
45
46 ---
47
48 # Fragmented list
49
50 1) One
51 2) Two
52 3) Three
53 ```
54
55 <!-- prettier-ignore-end -->
56
57 > These are inherited from [Marpit framework](https://marpit.marp.app/fragmented-list).
58 >
59 > [This syntax only indicates that the list _should_ be fragmented](https://marpit.marp.app/fragmented-list?id=rendering). If the tools integrated with Marp do nothing with the syntax, this list would be rendered as a normal list. In the official toolset, [Marp CLI](https://github.com/marp-team/marp-cli)'s default HTML template `bespoke` can reproduce a fragmented list as a build animation.
60
60 lines MARKDOWN