mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 03:36:42 +00:00
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.
70 lines
1.7 KiB
XML
70 lines
1.7 KiB
XML
<?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>
|