|
24 | 24 | --- configs – these are populated in the Meta filter.
|
25 | 25 | local pagebreak = {
|
26 | 26 | asciidoc = '<<<\n\n',
|
| 27 | + context = '\\page', |
27 | 28 | epub = '<p style="page-break-after: always;"> </p>',
|
28 | 29 | html = '<div style="page-break-after: always;"></div>',
|
29 | 30 | latex = '\\newpage{}',
|
|
50 | 51 |
|
51 | 52 | --- Return a block element causing a page break in the given format.
|
52 | 53 | local function newpage(format)
|
53 |
| - if format == 'docx' then |
| 54 | + if format:match 'asciidoc' then |
| 55 | + return pandoc.RawBlock('asciidoc', pagebreak.asciidoc) |
| 56 | + elseif format == 'context' then |
| 57 | + return pandoc.RawBlock('context', pagebreak.context) |
| 58 | + elseif format == 'docx' then |
54 | 59 | return pandoc.RawBlock('openxml', pagebreak.ooxml)
|
55 |
| - elseif format:match 'latex' then |
56 |
| - return pandoc.RawBlock('tex', pagebreak.latex) |
57 |
| - elseif format:match 'odt' then |
58 |
| - return pandoc.RawBlock('opendocument', pagebreak.odt) |
59 |
| - elseif format:match 'html.*' then |
60 |
| - return pandoc.RawBlock('html', pagebreak.html) |
61 | 60 | elseif format:match 'epub' then
|
62 | 61 | return pandoc.RawBlock('html', pagebreak.epub)
|
| 62 | + elseif format:match 'html.*' then |
| 63 | + return pandoc.RawBlock('html', pagebreak.html) |
| 64 | + elseif format:match 'latex' then |
| 65 | + return pandoc.RawBlock('tex', pagebreak.latex) |
63 | 66 | elseif format:match 'ms' then
|
64 | 67 | return pandoc.RawBlock('ms', pagebreak.ms)
|
65 |
| - elseif format:match 'asciidoc' then |
66 |
| - return pandoc.RawBlock('asciidoc', pagebreak.asciidoc) |
| 68 | + elseif format:match 'odt' then |
| 69 | + return pandoc.RawBlock('opendocument', pagebreak.odt) |
67 | 70 | else
|
68 | 71 | -- fall back to insert a form feed character
|
69 | 72 | return pandoc.Para{pandoc.Str '\f'}
|
|
0 commit comments