Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.09k stars 958 forks source link

New page before each h1 heading. #145

Open amaridev opened 4 years ago

amaridev commented 4 years ago

Maybe I oversee something. But I'd like to have each first level heading on a new page. With default settings new chapters start in between.

Is it possible to add an option for that?

daamien commented 4 years ago

@amaridev : you can try the book parameter. It will activate the scrbook class, which starst each chapter on a new page :

You can simply pass the variable from the command line

$ pandoc -V book --top-level-division=chapter ......

or add it a the top of your document

---
title: 'My document
date: '10/12/2019'
titlepage: true
titlepage-color: "3B668F"
titlepage-text-color: "FFFFFF"
titlepage-rule-color: "FFFFFF"
toc-own-page: true
header-right: " "
book: true
---

More details here: https://github.com/Wandmalfarbe/pandoc-latex-template#typesetting-a-book

microraptor commented 4 years ago

Wandmalfarbe gives a pretty good answer for this also in issue #81

Wandmalfarbe commented 4 years ago

This looks like a duplicate of Issue #81. @amaridev Please see the linked issue for a solution. As this seems to be a common question I'm going to leave this issue open as a reminder to update the docs.