-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow OpenXML templates to be used with
docx
.
The `--reference-doc` option allows customization of styles in docx output, but it does not allow one to adjust the content of the output (e.g., changing the order in which metadata, the table of contents, and the body of the document are displayed), or adding boilerplate text before or after the document body. For these changes, one can now use `--template` with an OpenXML template. (See the default `openxml` template for a sample.) This patch also allows `--include-before-body` and `--include-after-body` to be used with `docx` output. The included files must be OpenXML fragments suitable for inclusion in the document body. Closes #8338 (`--include-before-body`, `--include-after-body`). Closes #9069 (a custom template can be used to omit the title page). Closes #7256. Closes #2928.
- Loading branch information
Showing
42 changed files
with
170 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"> | ||
<w:body> | ||
$if(title)$ | ||
<w:p> | ||
<w:pPr> | ||
<w:pStyle w:val="Title" /> | ||
</w:pPr> | ||
$title$ | ||
</w:p> | ||
$endif$ | ||
$if(subtitle)$ | ||
<w:p> | ||
<w:pPr> | ||
<w:pStyle w:val="Subtitle" /> | ||
</w:pPr> | ||
$subtitle$ | ||
</w:p> | ||
$endif$ | ||
$for(author)$ | ||
<w:p> | ||
<w:pPr> | ||
<w:pStyle w:val="Author" /> | ||
</w:pPr> | ||
$author$ | ||
</w:p> | ||
$endfor$ | ||
$if(date)$ | ||
<w:p> | ||
<w:pPr> | ||
<w:pStyle w:val="Date" /> | ||
</w:pPr> | ||
$date$ | ||
</w:p> | ||
$endif$ | ||
$if(abstract)$ | ||
<w:p> | ||
<w:pPr> | ||
<w:pStyle w:val="AbstractTitle" /> | ||
</w:pPr> | ||
$if(abstract-title)$ | ||
$abstract-title$ | ||
$else$ | ||
<w:r> | ||
<w:t xml:space="preserve">Abstract | ||
</w:t> | ||
</w:r> | ||
$endif$ | ||
</w:p> | ||
$abstract$ | ||
$endif$ | ||
$for(include-before)$ | ||
$include-before$ | ||
$endfor$ | ||
$if(toc)$ | ||
$toc$ | ||
$endif$ | ||
$body$ | ||
$for(include-after)$ | ||
$include-after$ | ||
$endfor$ | ||
$-- sectpr will be set to the last sectpr in a reference.docx, if present | ||
$if(sectpr)$ | ||
$sectpr$ | ||
$else$ | ||
<w:sectPr /> | ||
$endif$ | ||
</w:body> | ||
</w:document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.