{"id":44533175,"url":"https://github.com/pandoc-ext/pagebreak","last_synced_at":"2026-02-13T18:41:29.847Z","repository":{"id":153645109,"uuid":"626887058","full_name":"pandoc-ext/pagebreak","owner":"pandoc-ext","description":"Manual page breaks","archived":false,"fork":false,"pushed_at":"2025-05-20T09:00:56.000Z","size":53,"stargazers_count":43,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-20T09:46:10.494Z","etag":null,"topics":["lua","pandoc","pandoc-filter"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pandoc-ext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["tarleb"]}},"created_at":"2023-04-12T11:05:46.000Z","updated_at":"2025-05-20T09:00:59.000Z","dependencies_parsed_at":"2025-05-20T09:38:18.809Z","dependency_job_id":null,"html_url":"https://github.com/pandoc-ext/pagebreak","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pandoc-ext/pagebreak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fpagebreak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fpagebreak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fpagebreak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fpagebreak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pandoc-ext","download_url":"https://codeload.github.com/pandoc-ext/pagebreak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandoc-ext%2Fpagebreak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","pandoc","pandoc-filter"],"created_at":"2026-02-13T18:41:29.169Z","updated_at":"2026-02-13T18:41:29.839Z","avatar_url":"https://github.com/pandoc-ext.png","language":"Lua","funding_links":["https://github.com/sponsors/tarleb"],"categories":[],"sub_categories":[],"readme":"pagebreak\n=========\n\nThis filter converts paragraps containing only the LaTeX\n`\\newpage` or `\\pagebreak` command into appropriate pagebreak\nmarkup for other formats. The command must be the only contents\nof a raw TeX block in order to be recognized. I.e., for Markdown\nthe following is sufficient:\n\n    Paragraph before page break\n\n    \\newpage\n\n    Paragraph after page break\n\nFully supported output formats are:\n\n- AsciiDoc / Asciidoctor\n- ConTeXt\n- Docx\n- EPUB\n- groff ms\n- Typst\n- HTML\n- LaTeX\n\nODT is supported, but requires additional settings in the\nreference document (Configuration).\n\nIn all other formats, the page break is represented using the\nform feed character.\n\nNote that not all input formats support the `raw_tex` format\nextension, which is required to use the filter in the default\nconfiguration. Enable the `break-on.plaintext-command` option to\nuse this filter with if `raw_tex` is unavailable.\n\nUsage\n-----\n\nThe filter modifies the internal document representation; it can\nbe used with many publishing systems that are based on pandoc.\n\n### Plain pandoc\n\nPass the filter to pandoc via the `--lua-filter` (or `-L`) command\nline option.\n\n    pandoc --lua-filter pagebreak.lua ...\n\n### Quarto / R Markdown\n\nThe use of this filter with either Quarto or R Markdown is\n*discouraged*, as both systems ship with their own fork of this\nextension. Use those instead.\n\nNote also that Quarto allows to use the [`{{ pagebreak }}`\nshort-code][shortcode] to insert page breaks.\n\n[shortcode]: https://quarto.org/docs/authoring/markdown-basics.html#page-breaks\n\nConfiguration\n-------------\n\nThe filter can be configured through the `pagebreak` metadata\nfield.\n\nExample config in YAML frontmatter:\n\n``` yaml\n---\npagebreak:\n  break-on:\n    # Treat paragraphs that contain just a form feed\n    # character as pagebreak markers.\n    form-feed: true\n    # Allow plaintext commands, i.e., respect LaTeX newpage\n    # commands even if they are not in a raw TeX block.\n    plaintext-command: true\n\n  # Use a div with this class instead of hard-coded CSS\n  html-class: 'page-break'\n\n  # ODT style used for pagebreak paragraphs\n  odt-style: 'Pagebreak'\n---\n```\n\nCurrently supported options:\n\n- `break-on.form-feed`: boolean value indicating whether\n  the filter should replace paragraphs that contains nothing but\n  form feed characters with page breaks. Enabling option can have\n  a significant performance impact for large documents and is\n  therefore *disabled by default*.\n\n- `break-on.plaintext-command`: boolean value that controls\n  whether paragraphs with LaTeX commands should be interpreted as\n  pagebreak markers. Enabling this option may impact performance,\n  so it is *disabled* by default.\n\n- `html-class`: If you want to use an HTML class rather than an\n  inline style set the value of the metadata key `html-class` or\n  the environment variable `PANDOC_PAGEBREAK_HTML_CLASS` (the\n  metadata 'wins' if both are defined) to the name of the class\n  and use CSS like this:\n\n  ``` css\n  @media all {\n    .page-break\t{ display: none; }\n  }\n  @media print {\n    .page-break\t{ display: block; page-break-after: always; }\n  }\n  ```\n\n  Note that this will also be used for EPUB output.\n\n- `odt-style`: To use with ODT you must create a reference ODT\n  with a named paragraph style called `Pagebreak` (or whatever you\n  set the metadata field `odt-style` or the environment variable\n  `PANDOC_PAGEBREAK_ODT_STYLE` to) and define it as having no\n  extra space before or after but set it to have a pagebreak after\n  it \u003chttps://help.libreoffice.org/Writer/Text_Flow\u003e.\n\n  (There will be an empty placeholder paragraph, which means some\n  extra vertical space, and you probably want that space to go at\n  the bottom of the page before the break rather than at the top\n  of the page after the break!)\n\nAlternative syntax\n------------------\n\nThe form feed character as the only element in a paragraph is\nsupported as an alternative to the LaTeX syntax described above.\nSee [Configuration](#configuration) for info on how to enable this\nfeature.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Fpagebreak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandoc-ext%2Fpagebreak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandoc-ext%2Fpagebreak/lists"}