It will be disabled at any point in the future. Please post your discussions to any of these alternative available channels:

* GitHub Discussions:
* Zettlr Subreddit:
* Discord:

Exporting with chapters starting on a new page

I feel like it’s something trivial to do yet, shame on me, I didn’t managed to do it.

I want to export a project as a PDF but with each chapter starting on a new page (chapters are, for me, new files starting with header 1. So the cut could be either on each header 1 or on each markdown file).

Is there a way to do it?


  • This looks promising:

    I'm pretty sure Pandoc allows something that takes into account different heading levels – but that's really simple only in Zettlr 2.0 since we have access to defaults files there

  • Hey, I didn’t know you were kneedeep into Zettlr 2.0. I’m impatient :-)

    In the meantime, I try to read the doc about custom templates but it seems I’m missing something quite important : where should the template be ? (I’m using internal Pandoc). Also, it looks a bit overkill to write a full fledget template only for one small customisation (but it might be the only way to go).

  • The template can be anywhere, you just need to point Zettlr to it (in the corresponding PDF/project settings)

    And actually it's not that overkill to write a custom template, since you basically can just take the default one and add the one customisation. The default template is either way just meant for those who don't have anything to complain about that said default template; everyone else can (and should!) copy that default template and customise it as they wish.

  • The way to do this is to put a bit of latex into the start of each chapter:

    \chapter{Title of Chapter}

    you may need to set your document class to 'book'

  • Putting --top-level-division=chapter in pandoc command line and set document class in latex template to 'book' level as @sambostock said.

Sign In or Register to comment.