Skip to content

Instantly share code, notes, and snippets.

View hugoroy's full-sized avatar

Hugo Roy hugoroy

View GitHub Profile
@infotroph
infotroph / pandoc-word-sectionbreak.hs
Last active June 6, 2018 05:42
Pandoc filter: convert horizontal rules into section breaks for Word output
#!/usr/bin/env runhaskell
{-
Pandoc filter to replace horizontal rules with hard section breaks when output is in Word format.
Credits: This is a very lightly adapted version of a `\newpage` filter
previously described on pandoc-discuss:
https://groups.google.com/forum/#!topic/pandoc-discuss/FzLrhk0vVbU