Closed alexandre1985 closed 1 year ago
Do you want \clearpage
instead of /clearpage
maybe? Same for \newpage
instead of /newpage
.
There is also \cleardoublepage
you can try (like clear page but makes sure next page is on the right)
Yes, I want that. I sorry for the misspell. In my book I am using \clearpage
, etc.
My problem persists.
In theory, this configuration file should work:
\Preamble{xhtml}
\Configure{newpage}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="newpage"></div>}}
\Css{.newpage{page-break-before:always;}}
\begin{document}
\EndPreamble
I had similar question some time ago, and proposed a special command instead of \newpage
or \clearpage
, because I experienced issues with some commands that use \newpage
internally. But if you don't run into this problems, this configuration should work. For some reason, it doesn't work in Calibre, but it can be a bug in viewer.
\Preamble{xhtml} \Configure{newpage}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="newpage"></div>}} \Css{.newpage{page-break-before:always;}} \begin{document} \EndPreamble
pdflatex doesn't compile with this commands. It gives me
! Undefined control sequence.
l.110 \Preamble
{xhtml}
Where exactly do I paste this lines of code?
Before \begin{document}
? Before \documentclass
? I have tried in a lot of places, and they all give me errors in compiling; either compiling with pdflatex
or compiling with tex4ebook
.
I got it. Thank @michal-h21 , it worked.
I have to put that code in a main.cfg
file and run: tex4ebook -f epub3 -c main.cfg main.tex
I am able to create a epub file.
In the pages after my cover page, I am unable to set a new page. They are all put in sequence, without page breaks. On my pdf the output is correct.
The new page commands that I am using is:
Please help. I have a deadline on my book. Sorry...