Last active
April 2, 2023 16:22
-
-
Save Merovex/05e3216f8f4f6e965cd9d564b1496719 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Converts "* * *" Horizontal Rule to a "#" separator in Word DOCX | |
local hashrule = [[<w:p> | |
<w:pPr> | |
<w:pStyle w:val="HorizontalRule"/> | |
<w:ind w:firstLine="0"/> | |
<w:jc w:val="center"/> | |
</w:pPr> | |
<w:r> | |
<w:t>#</w:t> | |
</w:r> | |
</w:p>]] | |
function HorizontalRule (elem) | |
if FORMAT == 'docx' then | |
return pandoc.RawBlock('openxml', hashrule) | |
end | |
end |
I use this for markdown to docx, but should work for latex to docx. Give it a try
I meant the comment in the first line ;-)
ah, should have cut that. It was part of a larger lua script. I am transpiling Markdown to LaTeX and DOCX. I refer to fancy page breaks because of Memoir class when I convert the Markdown to LaTeX in Pandoc. (I copied the Memoir code into the Pandoc template.)
no worries. Thanks for posting it!
Corrected the comment to reflect what it's doing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the comment: LaTeX -> Docx?