Do it in MS Word (or LO Writer edit odt with extra Save As docx) with styles. Set width of images as a % of the current paragraph style. Anchor images as character, each as a paragraph, no text on the same line.
Import docx to Calibre and convert using Tablet in "Page Setup", which will leave the image as formatted in the wordprocessor.
If the wordprocessor is used correctly and there are not tables or formula, then no need to edit CSS and HTML at all, the epub2 (and Amazon's conversion of it from KDP upload) will look almost identical to the wordprocessor. I use a default page of 420 pt by 560 pt for ease of edit and a good idea of what the eBook will look like. Chapter headings are Level 1 or Level 2 with "Insert page break before", without a named page style. This results in an html file per chapter, which is the only way that page breaks work on some ereaders. Also I "bookmark" the start of every heading wanted in the ToC (i.e. ch1, ch2, appendix etc) and then create a contents page where each line is a hyperlink (i.e. enter #ch1, #ch2, #appendix as the URL). I get the Wordprocesser to insert an index, copy that to a text file and delete the index. Then paste back the plain text putting desired paragraph style prior to adding the links. You CAN use the Wordprocessor generated Contents page, but my method is more reliable.
No headers or footers.
You CAN flow text around images, but the only 100% reliable method is the image on its own on a line "as character". There are two styles with an image:
1) The paragraph style of the line it's on, even though there is no text.
2) The graphics style (margins/padding, % size etc)
Some conversions won't keep graphics margins/padding, so use the enclosing text paragraph style for reliability. Note that Top Margin might be ignored on a heading with Insert Page break Before, so use top padding and uncheck sync instead. A box seems to work on a paragraph style on all ereaders as long as it's square corners.
No coloured backgrounds and only black (or at worst mid grey text so darkmode works).
No transparency or animation (usually not supported).
Last edited by Quoth; 01-29-2022 at 09:30 AM.
|