diff options
author | Emily Bourke <undergroundquizscene@protonmail.com> | 2021-09-17 16:05:06 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-10-17 17:24:30 -0700 |
commit | 8af15ab345bb0790cc3442722673d9da9f23a79c (patch) | |
tree | 573a438aa9d684178aabc3666e755862cd031beb /test/pptx/list-level | |
parent | 3f489bcb5897898d453bef549d6eba5f5d2120bf (diff) | |
download | pandoc-8af15ab345bb0790cc3442722673d9da9f23a79c.tar.gz |
pptx: Fix list level numbering
In PowerPoint, the content of a top-level list is at the same level as
the content of a top-level paragraph – the only difference is that a
list style has been applied.
At the moment, the pptx writer increments the paragraph level on each
list, turning what should be top-level lists into second-level lists.
This commit changes that logic, only incrementing the paragraph level on
continuation paragraphs of lists.
- Fixes https://github.com/jgm/pandoc/issues/4828
- Fixes https://github.com/jgm/pandoc/issues/4663
Diffstat (limited to 'test/pptx/list-level')
-rw-r--r-- | test/pptx/list-level/input.native | 20 | ||||
-rw-r--r-- | test/pptx/list-level/output.pptx | bin | 0 -> 28635 bytes | |||
-rw-r--r-- | test/pptx/list-level/templated.pptx | bin | 0 -> 41701 bytes |
3 files changed, 20 insertions, 0 deletions
diff --git a/test/pptx/list-level/input.native b/test/pptx/list-level/input.native new file mode 100644 index 000000000..e0b36b8e5 --- /dev/null +++ b/test/pptx/list-level/input.native @@ -0,0 +1,20 @@ +[Header 1 ("slide",[],[]) [Str "Slide"] +,BulletList + [[Para [Str "Top-level"] + ,Para [Str "With",Space,Str "continuation",Space,Str "paragraph"]] + ,[Para [Str "Then:"] + ,BulletList + [[Plain [Str "nested"]] + ,[Plain [Str "list"]] + ,[Plain [Str "items"]]]]] +,Header 1 ("slide-1",[],[]) [Str "Slide"] +,Para [Str "Paragraph."] +,OrderedList (1,Decimal,Period) + [[Para [Str "Top-level"] + ,Para [Str "Continuation"] + ,OrderedList (1,Decimal,Period) + [[Para [Str "Sub-list"] + ,Para [Str "With",Space,Str "Continuation"]] + ,[Para [Str "(still",Space,Str "sub-list)"]]]] + ,[Para [Str "(back",Space,Str "to",Space,Str "top-level)"]]] +,Para [Str "Paragraph."]] diff --git a/test/pptx/list-level/output.pptx b/test/pptx/list-level/output.pptx Binary files differnew file mode 100644 index 000000000..5e3506958 --- /dev/null +++ b/test/pptx/list-level/output.pptx diff --git a/test/pptx/list-level/templated.pptx b/test/pptx/list-level/templated.pptx Binary files differnew file mode 100644 index 000000000..8853a3082 --- /dev/null +++ b/test/pptx/list-level/templated.pptx |