# pandoc-docx-pagebreak-py
Pandoc filter to insert page break or table-of-contents in docx file
### install
```bash
pip3 install git+https://github.com/pmamico/pandoc-docx-helper.git
```
### Usage
- Add `\newpage` where preferred to insert a page break
- Expecting to work like native pandoc behavior for latex output
- Add `\toc` where preferred to insert TOC(Table of Contents)
- unable to use with `--toc` otherwise TOC appears on head of document also
<!--
- Add `\newsection` where preferred to insert a section break
- Only works for docx output
- It resets page header/footer style to _portrait, US-letter_ sized pages with whatever reference file you used,
except the last section in the file. **_You will have to fix them to your preference._**
-->
```bash
# Try the filter with this file like this:
pandoc -f markdown -t docx -o docx.docx --filter=pandoc-docx-pagebreakpy README.md
```
### Sample
```markdown
Table of contents appears after this line
\toc
Contents before pagebreak
\newpage
Contents after _Page Break_
```
Table of contents appears after this line
\toc
Contents before pagebreak
\newpage
Contents after _Page Break_
Raw data
{
"_id": null,
"home_page": "",
"name": "pandoc-docx-helper",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "pandoc filter docx",
"author": "Mico Papp based on Kazuki Yamamotos work",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/d0/80/045e903d28a5677631fd7b512a8afe29fdb920baef936f2206a628735e25/pandoc-docx-helper-0.0.1.tar.gz",
"platform": null,
"description": "# pandoc-docx-pagebreak-py\n\nPandoc filter to insert page break or table-of-contents in docx file\n\n### install\n\n```bash\npip3 install git+https://github.com/pmamico/pandoc-docx-helper.git\n```\n\n### Usage\n\n- Add `\\newpage` where preferred to insert a page break\n - Expecting to work like native pandoc behavior for latex output\n- Add `\\toc` where preferred to insert TOC(Table of Contents)\n - unable to use with `--toc` otherwise TOC appears on head of document also\n<!--\n- Add `\\newsection` where preferred to insert a section break\n - Only works for docx output\n - It resets page header/footer style to _portrait, US-letter_ sized pages with whatever reference file you used,\n except the last section in the file. **_You will have to fix them to your preference._**\n-->\n\n```bash\n# Try the filter with this file like this:\npandoc -f markdown -t docx -o docx.docx --filter=pandoc-docx-pagebreakpy README.md\n```\n\n### Sample\n\n```markdown\nTable of contents appears after this line\n\n\\toc\n\nContents before pagebreak\n\n\\newpage\n\nContents after _Page Break_\n```\n\nTable of contents appears after this line\n\n\\toc\n\nContents before pagebreak\n\n\\newpage\n\nContents after _Page Break_\n",
"bugtrack_url": null,
"license": "",
"summary": "Pandoc filter for docx output to insert pagebreak at will",
"version": "0.0.1",
"project_urls": null,
"split_keywords": [
"pandoc",
"filter",
"docx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d080045e903d28a5677631fd7b512a8afe29fdb920baef936f2206a628735e25",
"md5": "dce503c8569f63bae9dcd9fbbaa97b2c",
"sha256": "72deda2e4db0914860e314fb5b6d18fa53069d223c8a2583bafcd5c30ec50a4b"
},
"downloads": -1,
"filename": "pandoc-docx-helper-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "dce503c8569f63bae9dcd9fbbaa97b2c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6932,
"upload_time": "2023-06-23T08:40:47",
"upload_time_iso_8601": "2023-06-23T08:40:47.562857Z",
"url": "https://files.pythonhosted.org/packages/d0/80/045e903d28a5677631fd7b512a8afe29fdb920baef936f2206a628735e25/pandoc-docx-helper-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-23 08:40:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pandoc-docx-helper"
}