Rewrite alexstoick/pandoc-docx-pagebreak into python.
See Differences between "???breaks"
pip install git+https://github.com/AClon314/pandoc-sectionBreak.gitIf you want new page have different page-number like:
Ⅰ,Ⅱ,Ⅲ for Abstract, 1,2,3 for Body, then:
---
template: reference-doc.docx
---
摘要
<!-- 分页符: https://github.com/pandoc-ext/pagebreak
会跟随同一节的页边距、页码等格式 -->
\newpage
Abstract end
<!-- 分节符: 独立的页边距、页码等格式 -->
<br section>
Body start
<br continue> <!-- 连续分节符 -->
<br odd> <!-- 奇数页 -->
<br even> <!-- 偶数页 -->
<br col> <!-- 分列符 -->Assign template for using the section format in <w:sectPr>...<w:sectPr /> block
If you have multiple <w:sectPr> in reference.docx, you can assign section: 5 to use the 5th <w:sectPr> format. See test.md for more.
If you encounter error, assign environment DEBUG=1 variable to show debug message:
DEBUG=1 pandoc --filter pandoc-sectionBreak ...Apply:
.html: css@media print.docx: tag<w:sectPr>