jgm/pandoc-templates — pull request #69 by maybegeek (2014-09-02 08:18:28+00:00)
Title: \frontmatter, \mainmatter and \backmatter in default.latex template

Adding options for semantically section parts of a document:
* frontmatter
* mainmatter
* backmatter
For book/scrbook this allows addressing of pagenumbering (default: frontmatter in roman, mainmatter in arabic, backmatter with no change, thus arabic pagenumbering).
For article/scrartcl this can be an convenient possibility of addressing pagenumbering too!

The options would be used by commandline switch or in the yaml-section

* --frontmater or frontmatter: TRUE
* --mainmater or mainmatter: TRUE
* --backmater or backmatter: TRUE

so no specific latex macro is needed.

Those non-book-users (like me) who want \frontmatter and \mainmatter just add some lines in their yaml section and can then use this too.

```yaml
header-includes:
# declare \front- \main- \backmatter
- '\makeatletter'
- '\newcommand\frontmatter{\pagenumbering{roman}}'
- '\newcommand\mainmatter{\pagenumbering{arabic}}'
- '\newcommand\backmatter{\cleardoublepage}'
- '\makeatother'
```