Skip to content

Commit 0cc4fe7

Browse files
avermstarleb
authored andcommitted
Add groff ms format support to pagebreak.lua.
1 parent f09e333 commit 0cc4fe7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pagebreak/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Usage
2020
Fully supported output formats are:
2121

2222
- Docx,
23+
- groff ms,
2324
- LaTeX,
2425
- HTML, and
2526
- EPUB.

pagebreak/pagebreak.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ local pagebreak = {
2626
epub = '<p style="page-break-after: always;"> </p>',
2727
html = '<div style="page-break-after: always;"></div>',
2828
latex = '\\newpage{}',
29+
ms = '.bp',
2930
ooxml = '<w:p><w:r><w:br w:type="page"/></w:r></w:p>',
3031
odt = '<text:p text:style-name="Pagebreak"/>'
3132
}
@@ -58,6 +59,8 @@ local function newpage(format)
5859
return pandoc.RawBlock('html', pagebreak.html)
5960
elseif format:match 'epub' then
6061
return pandoc.RawBlock('html', pagebreak.epub)
62+
elseif format:match 'ms' then
63+
return pandoc.RawBlock('ms', pagebreak.ms)
6164
else
6265
-- fall back to insert a form feed character
6366
return pandoc.Para{pandoc.Str '\f'}

0 commit comments

Comments
 (0)