From d5086e7bd77e62dbdb6256c7586c7aed0c614d38 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Mon, 13 Mar 2017 21:48:00 +0100 Subject: [PATCH] Docx writer: Support 9 levels of headers. Closes #1642. --- MANUAL.txt | 11 +++---- data/docx/word/styles.xml | 60 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index e74ca9ad7..7f4081327 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -790,11 +790,12 @@ Options affecting specific writers than modifying the styles used by pandoc: [paragraph] Normal, Body Text, First Paragraph, Compact, Title, Subtitle, Author, Date, Abstract, Bibliography, Heading 1, - Heading 2, Heading 3, Heading 4, Heading 5, Heading 6, Block - Text, Footnote Text, Definition Term, Definition, Caption, - Table Caption, Image Caption, Figure, Figure With Caption, - TOC Heading; [character] Default Paragraph Font, Body Text - Char, Verbatim Char, Footnote Reference, Hyperlink; [table] + Heading 2, Heading 3, Heading 4, Heading 5, Heading 6, + Heading 7, Heading 8, Heading 9, Block Text, Footnote Text, + Definition Term, Definition, Caption, Table Caption, + Image Caption, Figure, Figure With Caption, TOC Heading; + [character] Default Paragraph Font, Body Text Char, + Verbatim Char, Footnote Reference, Hyperlink; [table] Normal Table. ODT: For best results, the reference ODT should be a modified diff --git a/data/docx/word/styles.xml b/data/docx/word/styles.xml index d19c4c7fb..5d09a67b0 100644 --- a/data/docx/word/styles.xml +++ b/data/docx/word/styles.xml @@ -251,6 +251,66 @@ <w:szCs w:val="24" /> </w:rPr> </w:style> + <w:style w:type="paragraph" w:styleId="Heading7"> + <w:name w:val="Heading 7" /> + <w:basedOn w:val="Normal" /> + <w:next w:val="BodyText" /> + <w:uiPriority w:val="9" /> + <w:unhideWhenUsed /> + <w:qFormat /> + <w:pPr> + <w:keepNext /> + <w:keepLines /> + <w:spacing w:before="200" w:after="0" /> + <w:outlineLvl w:val="6" /> + </w:pPr> + <w:rPr> + <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" /> + <w:color w:val="4F81BD" w:themeColor="accent1" /> + <w:sz w:val="24" /> + <w:szCs w:val="24" /> + </w:rPr> + </w:style> + <w:style w:type="paragraph" w:styleId="Heading8"> + <w:name w:val="Heading 8" /> + <w:basedOn w:val="Normal" /> + <w:next w:val="BodyText" /> + <w:uiPriority w:val="9" /> + <w:unhideWhenUsed /> + <w:qFormat /> + <w:pPr> + <w:keepNext /> + <w:keepLines /> + <w:spacing w:before="200" w:after="0" /> + <w:outlineLvl w:val="7" /> + </w:pPr> + <w:rPr> + <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" /> + <w:color w:val="4F81BD" w:themeColor="accent1" /> + <w:sz w:val="24" /> + <w:szCs w:val="24" /> + </w:rPr> + </w:style> + <w:style w:type="paragraph" w:styleId="Heading9"> + <w:name w:val="Heading 9" /> + <w:basedOn w:val="Normal" /> + <w:next w:val="BodyText" /> + <w:uiPriority w:val="9" /> + <w:unhideWhenUsed /> + <w:qFormat /> + <w:pPr> + <w:keepNext /> + <w:keepLines /> + <w:spacing w:before="200" w:after="0" /> + <w:outlineLvl w:val="8" /> + </w:pPr> + <w:rPr> + <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" /> + <w:color w:val="4F81BD" w:themeColor="accent1" /> + <w:sz w:val="24" /> + <w:szCs w:val="24" /> + </w:rPr> + </w:style> <w:style w:type="paragraph" w:styleId="BlockText"> <w:name w:val="Block Text" /> <w:basedOn w:val="BodyText" />