-
Notifications
You must be signed in to change notification settings - Fork 957
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
page breaks on top level heading (h1 / #) #14
Comments
I too struggled with this a while back and couldnt get it to work. Ended up with entering |
I'm glad you like it! This really means a lot to me. First of all I used the KOMA-Script class To get the correct chapter headings (and page breaks before them) you need to tell pandoc that it should convert first level headings There will be one blank page before each chapter because the template is two-sided per default (I think I should change that). So if you plan to publish your book as a PDF and don't need a blank page you should add the class option Unfortunately I never really tested chapters with my template so there are some strange chapter headings. I filed a new Issue (#16) and try to figure out what's wrong. |
Thanks a stack for the feedback. I'll give it a go. |
@martinlarsson: my brain only really registered your message now :) My entire document is in one markdown file. Would one add that |
Yeah, I think that would do the trick. But |
lol: goodness... thanks! |
Just a quick note for everyone having the same problem. You can insert two commands into the template with ---
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. |
I really like this template.
I'm using it for a book I'm self-publishing. As I understand you are not specifically targeting books but since my book show sample C# code I need something to properly format the code and your template does the trick.
Using
documentclass: book
seems to break things so I've removed that.I would like to place page breaks on the top level headings (# in my markdown). For that I've tried the
titlesec
package and include aheader-includes
to atitlesec.tex
file with the following:However, this results in the following error:
This is really my first outing with pandoc so any help would be appreciated. I have been struggling quite a while trying to get a decent output and I feel that I'm almost there :)
The text was updated successfully, but these errors were encountered: