Skip to content

Commit 31918c6

Browse files
committed
Improve the docs slightly
1 parent be62e14 commit 31918c6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ line option.
4646
### Quarto / R Markdown
4747

4848
The use of this filter with either Quarto or R Markdown is
49-
discouraged, as both systems ship with their own fork of this
49+
*discouraged*, as both systems ship with their own fork of this
5050
extension. Use those instead.
5151

5252
Note also that Quarto allows to use the [`{{ pagebreak }}`

pagebreak.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,16 @@ local function newpage(format, pagebreak)
7272
end
7373
end
7474

75+
--- Checkes whether a the given string contains a LaTeX pagebreak or
76+
--- newpage command.
7577
local function is_newpage_command(command)
7678
return command:match '^\\newpage%{?%}?$'
7779
or command:match '^\\pagebreak%{?%}?$'
7880
end
7981

8082
-- Returns a filter function for RawBlock elements, checking for LaTeX
81-
-- pagebreak/newpage commands; returns `nil` when the target format is latex.
83+
-- pagebreak/newpage commands; returns `nil` when the target format is
84+
-- latex.
8285
local function latex_pagebreak (pagebreak)
8386
-- Don't do anything if the output is TeX
8487
if FORMAT:match 'tex$' then
@@ -107,6 +110,7 @@ local function ascii_pagebreak (raw_pagebreak)
107110
end
108111
end
109112

113+
--- Filter function; this is the entrypoint when used as a filter.
110114
function Pandoc (doc)
111115
local config = doc.meta.pagebreak or {}
112116
local break_on = config['break-on'] or {}

0 commit comments

Comments
 (0)