feat: change note for filter update
This commit is contained in:
19
pandoc/latex_docx_pagebreak.lua
Normal file
19
pandoc/latex_docx_pagebreak.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local function is_pagebreak(text)
|
||||
return text:find('\\newpage') or text:find('\\clearpage')
|
||||
end
|
||||
|
||||
function RawBlock(el)
|
||||
if el.format:match('tex$') then
|
||||
if is_pagebreak(el.text) then
|
||||
return pandoc.RawBlock('openxml', '<w:p><w:r><w:br w:type="page"/></w:r></w:p>')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function RawInline(el)
|
||||
if el.format:match('tex$') then
|
||||
if is_pagebreak(el.text) then
|
||||
return pandoc.RawInline('openxml', '<w:r><w:br w:type="page"/></w:r>')
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user