Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set pagebreak for each Heading 1 #81

Closed
mertbakir opened this issue Mar 13, 2019 · 2 comments
Closed

How to set pagebreak for each Heading 1 #81

mertbakir opened this issue Mar 13, 2019 · 2 comments
Labels

Comments

@mertbakir
Copy link

Is there a way to add \newpage for each Heading 1?

Regards.

@Wandmalfarbe
Copy link
Owner

For large documents I recommend using the option book: true together with chapter headings. Chapters automatically start on a new page so \newpage isn't necessary. Please see the readme on how to compile a book.

If you really want to have every top level heading on a new page without using book: true you can add the following two commands with header-includes.

---
title: "Example PDF"
author: [Author]
date: "2017-02-20"
subject: "Markdown"
keywords: [Markdown, Example]
lang: "en"
header-includes: |
    \usepackage{sectsty}
    \sectionfont{\clearpage}
...

# Vinaque sanguine metuenti cuiquam Alcyone fixus

Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
hamos ire arceor mandere spicula, in licet aliquando.

# Aesculeae domus vincemur et Veneris adsuetus lapsum

Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
hamos ire arceor mandere spicula, in licet aliquando.

@ddunlap2005
Copy link

The sectsty package conflicts with other packages. You are already using KOMO Script. A better solution is to add the following to your header-includes metadata:

\addtokomafont{section}{\clearpage}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants