Coder Social home page Coder Social logo

Comments (7)

Wandmalfarbe avatar Wandmalfarbe commented on May 9, 2024 10

Just a quick note for everyone having the same problem. You can insert two commands into the template with header-includes to create a pagebreak for every top level heading (see also #81):

---
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.

from pandoc-latex-template.

Wandmalfarbe avatar Wandmalfarbe commented on May 9, 2024 4

I'm glad you like it! This really means a lot to me.

First of all I used the KOMA-Script class scrartcl as the document class because it has some advantages over the default article class. For typesetting a book I recommend the corresponding KOMA-Script class scrbook instead of the default book. All the examples should work with 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 # to chapters with the command --top-level-division=chapter (-> Manual).

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 onesided which can be done by supplying a template variable -V classoption=oneside (-> Manual).

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.

from pandoc-latex-template.

martinlarsson avatar martinlarsson commented on May 9, 2024 1

Yeah, I think that would do the trick. But \newpage instead of \newline :)

from pandoc-latex-template.

martinlarsson avatar martinlarsson commented on May 9, 2024

I too struggled with this a while back and couldnt get it to work. Ended up with entering \newpage at the top of each markdown file (ie top level heading).

from pandoc-latex-template.

eben-roux avatar eben-roux commented on May 9, 2024

Thanks a stack for the feedback. I'll give it a go.

from pandoc-latex-template.

eben-roux avatar eben-roux commented on May 9, 2024

@martinlarsson: my brain only really registered your message now :)

My entire document is in one markdown file. Would one add that \newline before each # Heading then?

from pandoc-latex-template.

eben-roux avatar eben-roux commented on May 9, 2024

lol: goodness... thanks!

from pandoc-latex-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.