%Title
%Author
#Header 1
Lots of words.
#Header 2
More words.
##Level 2 header
The above text can be turned into an EPUB file for e-readers with pandoc -o output.epub input.mkd, and it can be converted to PDF with pandoc -o output.pdf input.mkd. The latter requires a latex engine to be installed, which may be relevant to answering the question.
With the EPUB, each level 1 header is automatically set at the top of a new page (lesser headers aren't). With the PDF, this isn't the case - and I wouldn't expect it to be by default, since that would be contrary to the main goals of markdown. However, I'm having trouble finding a pandoc option to enable this behaviour.
Does anyone know of a way to enable this behaviour with pandoc? Editing a config file would be an acceptable solution, but if the syntax is latex-based I would appreciate an explanation of it (of the meaning of what is in the config file, not a comprehensive explanation of latex!).
pandoc's --chapters option seems like it should do what I want... but it
- Makes chapters only appear on odd-numbered pages, inserting blank pages as necessary (interesting, but not what I want -- I'm looking to print this off on A4 paper, and it's not going to be layed out book-style, so any aesthetic positive here is offset by a waste of paper)
- Inserts
Chapter xbefore the actual header, which leads to some ridiculous stuff like:
Chapter 1
Prologue
If it is possible to tame the --chapters option, that would be a suitable answer.