osolmaz
osolmaz

Reputation: 1923

Pandoc EPUB Page Break

Take the following MWE

% My Book 
% J. Doe

Content

\newpage

Content that should be on a new page

When I run

$ pandoc book.txt -o book.epub

I don't get the second content in a separate page. How can I do this with the EPUB format?

Upvotes: 1

Views: 2502

Answers (1)

mb21
mb21

Reputation: 39528

\newpage is a LaTeX command and only works when generating a PDF with LaTeX.

For ePUB, you either need to start a new chapter (using a # level 1 header), or you could try to insert the following:

<div style="page-break-before:always;"></div>

Note that there is an open issue on the pandoc issue tracker about supporting page-breaks across output formats.

Upvotes: 2

Related Questions