Impossible if the ebook is badly formatted.
If the Calibre TOC tool is not automatic then the headings HTML etc is rubbish and you may not have file/page breaks where you want them.
I've seen Chapter heading that are just <p> and some style maybe even with a span and div too. You only need an "h" tag, example using two lines
<h2 class="chapter">Chapter 2<br/>A New Hope</h2>
(This allows h1 for parts, sections, books etc. The Title should just be a p tag, unless there are multiple books in the ebook, then it's h1.
if one click doesn't make a decent TOC, then the ebook is sort of broken anyway.
In LO Writer Leveln in paragraph style translates to <hln class="whatever">
Then the CSS .whatever will have the font size, face, weight, indent, padding, margins, alignment. You need padding-top for space at top of a new page. margin-top only works if there is a prior paragraph. In LO Writer style "padding" is under borders and you set "none", untick Syncronise and then can set Padding top for a heading that does a page break.
Some formats/platforms ignore page break directives. The trick is to have Calibre do a file break at those headings (which can be automatic).
Last edited by Quoth; 07-13-2022 at 11:02 AM.
|