File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ line option.
4646### Quarto / R Markdown
4747
4848The 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
5050extension. Use those instead.
5151
5252Note also that Quarto allows to use the [ ` {{ pagebreak }} `
Original file line number Diff line number Diff line change @@ -72,13 +72,16 @@ local function newpage(format, pagebreak)
7272 end
7373end
7474
75+ --- Checkes whether a the given string contains a LaTeX pagebreak or
76+ --- newpage command.
7577local function is_newpage_command (command )
7678 return command :match ' ^\\ newpage%{?%}?$'
7779 or command :match ' ^\\ pagebreak%{?%}?$'
7880end
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.
8285local 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
108111end
109112
113+ --- Filter function; this is the entrypoint when used as a filter.
110114function Pandoc (doc )
111115 local config = doc .meta .pagebreak or {}
112116 local break_on = config [' break-on' ] or {}
You can’t perform that action at this time.
0 commit comments