aboutsummaryrefslogtreecommitdiff
path: root/test/pptx
diff options
context:
space:
mode:
authorEmily Bourke <undergroundquizscene@protonmail.com>2021-09-13 18:16:19 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-16 19:45:53 -0700
commit7c22c0202e8ed706d33f301e65f0aa1a847b4ec4 (patch)
tree0638c5c0d3bab230af62097fd73c3a41c7dd5a19 /test/pptx
parentc6cd92a0a34603c949b115f041fb30b1806b200e (diff)
downloadpandoc-7c22c0202e8ed706d33f301e65f0aa1a847b4ec4.tar.gz
pptx: Support specifying slide background images
In the reveal-js output, it’s possible to use reveal’s `data-background-image` class on a slide’s title to specify a background image for the slide. With this commit, it’s possible to use `background-image` in the same way for pptx output. Only the “stretch” mode is supported, and the background image is centred around the slide in the image’s larger axis, matching the observed default behaviour of PowerPoint. - Support `background-image` per slide. - Add tests. - Update manual.
Diffstat (limited to 'test/pptx')
-rw-r--r--test/pptx/background-image/deleted-layouts.pptxbin0 -> 56282 bytes
-rw-r--r--test/pptx/background-image/input.native17
-rw-r--r--test/pptx/background-image/moved-layouts.pptxbin0 -> 66987 bytes
-rw-r--r--test/pptx/background-image/output.pptxbin0 -> 53408 bytes
-rw-r--r--test/pptx/background-image/templated.pptxbin0 -> 66487 bytes
5 files changed, 17 insertions, 0 deletions
diff --git a/test/pptx/background-image/deleted-layouts.pptx b/test/pptx/background-image/deleted-layouts.pptx
new file mode 100644
index 000000000..05d4104b7
--- /dev/null
+++ b/test/pptx/background-image/deleted-layouts.pptx
Binary files differ
diff --git a/test/pptx/background-image/input.native b/test/pptx/background-image/input.native
new file mode 100644
index 000000000..22b089a95
--- /dev/null
+++ b/test/pptx/background-image/input.native
@@ -0,0 +1,17 @@
+[Header 1 ("section-header-with-background-image",[],[("background-image","movie.jpg")]) [Str "Section",Space,Str "Header",Space,Str "(with",Space,Str "background",Space,Str "image)"]
+,Header 2 ("slide-1",[],[("background-image","lalune.jpg")]) [Str "Slide",Space,Str "1"]
+,Para [Str "This",Space,Str "slide",Space,Str "has",Space,Str "a",Space,Str "moon",Space,Str "background."]
+,Header 2 ("slide-2",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "2"]
+,Para [Str "This",Space,Str "slide",Space,Str "has",Space,Str "a",Space,Str "movie",Space,Str "background."]
+,Header 2 ("slide-3",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "3"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Background",Space,Str "images",Space,Str "work",Space,Str "in",Space,Str "two-column",Space,Str "layout."]]
+ ,Div ("",["column"],[])
+ [Para [Str "hello"]]]
+,Header 2 ("slide-4",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "4"]
+,Para [Str "You",Space,Str "can",Space,Str "have",Space,Str "images",Space,Str "on",Space,Str "slides",Space,Str "that",Space,Str "have",Space,Str "background",Space,Str "images:"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]
+,Header 2 ("section",[],[("background-image","lalune.jpg")]) []
+,Div ("",["notes"],[])
+ [Para [Str "Blank",Space,Str "slides",Space,Str "can",Space,Str "have",Space,Str "background",Space,Str "images."]]]
diff --git a/test/pptx/background-image/moved-layouts.pptx b/test/pptx/background-image/moved-layouts.pptx
new file mode 100644
index 000000000..73b69e1d6
--- /dev/null
+++ b/test/pptx/background-image/moved-layouts.pptx
Binary files differ
diff --git a/test/pptx/background-image/output.pptx b/test/pptx/background-image/output.pptx
new file mode 100644
index 000000000..9738eefb8
--- /dev/null
+++ b/test/pptx/background-image/output.pptx
Binary files differ
diff --git a/test/pptx/background-image/templated.pptx b/test/pptx/background-image/templated.pptx
new file mode 100644
index 000000000..52d304957
--- /dev/null
+++ b/test/pptx/background-image/templated.pptx
Binary files differ