From 72823ad947face43ef45eaeb7e611979531abed6 Mon Sep 17 00:00:00 2001 From: Emily Bourke Date: Tue, 10 Aug 2021 17:20:53 +0100 Subject: pptx: Select layouts from reference doc by name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now, users had to make sure that their reference doc contains layouts in a specific order: the first four layouts in the file had to have a specific structure, or else pandoc would error (or sometimes successfully produce a pptx file, which PowerPoint would then fail to open). This commit changes the layout selection to use the layout names rather than order: users must make sure their reference doc contains four layouts with specific names, and if a layout with the right name isn’t found pandoc will output a warning and use the corresponding layout from the default reference doc as a fallback. I believe the use of names rather than order will be clearer to users, and the clearer errors will help them troubleshoot when things go wrong. - Add tests for moved layouts - Add tests for deleted layouts - Add newly included layouts to slideMaster1.xml to fix tests --- MANUAL.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'MANUAL.txt') diff --git a/MANUAL.txt b/MANUAL.txt index bed3b2009..0b1424d47 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1165,13 +1165,18 @@ header when requesting a document from a URL: `.pptx` or `.potx` extension) are known to work, as are most templates derived from these. - The specific requirement is that the template should begin with - the following first four layouts: - - 1. Title Slide - 2. Title and Content - 3. Section Header - 4. Two Content + The specific requirement is that the template should contain layouts + with the following names (as seen within PowerPoint): + + - Title Slide + - Title and Content + - Section Header + - Two Content + + For each name, the first layout found with that name will be used. + If no layout is found with one of the names, pandoc will output a + warning and use the layout with that name from the default reference + doc instead. All templates included with a recent version of MS PowerPoint will fit these criteria. (You can click on `Layout` under the -- cgit v1.2.3