Skip to main content

Pandoc filter for docx output to insert pagebreak at will

Project description

pandoc-docx-pagebreak-py

Pandoc filter to insert page break or table-of-contents in docx file

install

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
# Try the filter with this file like this:
pandoc -f markdown -t docx -o docx.docx --filter=pandoc-docx-pagebreakpy README.md

Sample

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandoc-docx-helper-0.0.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page