I am new to tex4ebooks (which I totally like after my first experiences) and I have some troubles with correct formatting:
Forcing a page break does not work for me, even when using the configuration as suggested here
Nested enumerations do not work correctly, if I use lower levels already for the first item (the lower level currently only starts on the second line, leading to unexpected break within the first sentence that even changes when changing the window-size).
Identation of items is done in an unexpected and not very beautiful way (both when breaking the line within an item and when the numbering gets higher, zb. 10.) When not using enumitem, the identation looks fine, but then you cannot use the enumitem-options...
Some of the enumitem options (e.g. parsep) are ignored, leading to unwanted spacing between items --> large space between 1.2 and 2. but no space between 2. and 3.
Is there a way to solve these issues?
Here my MWE:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\textbf{Title}
\mypagebreak
This text should be on a new page.
Issues with enumerations:
\begin{enumerate}[parsep=0.2cm]
\item
\begin{enumerate}[parsep=0.1cm, label=\arabic*]
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\end{enumerate}
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\item Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.
\end{enumerate}
\end{document}
And here is my config file:
% save the clearpage before it is redefined by tex4ht
\let\oldclearpage\clearpage
% define macro for newpage insertion
\def\mypagebreak{\Configure{newpage}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="newpage"></div>}}}
\Preamble{xhtml}
% define it for \newpage
\mypagebreak
\Css{.newpage{page-break-before:always;}}
% modify \Configure{BODY} so our confiurations work on all extracted pages
\Configure{@BODY}{\def\clearpage{\bgroup\mypagebreak\oldclearpage\egroup}}
\Configure{@/BODY}{\global\let\clearpage\oldclearpage\Configure{newpage}{}}
\begin{document}
\EndPreamble
If I use the the configuration file suggested in the answer below, then the page breaks in Calibre do no longer work accurately, meaning that the page break runs through the text, splitting it on two pages, which obviously does not look nice and makes it rather difficult to read the text, see pictures below:
Page 1:
Page 2:
Moreover, I run into troubles on pages that have a larger table, but I will ask a separate question for that issue, since I have also some problems with tables when using another configuration.