1

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?

osolmaz
  • 1,873
  • 2
  • 24
  • 41

1 Answers1

2

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

mb21
  • 34,845
  • 8
  • 116
  • 142