Mobileread
internal image size: fixed versus reflow
#1  grNadpa 01-28-2022, 10:02 AM
This is a new adventure for me.

Currently, I am manually rendering my hardcopy book into XHTML and CSS with the intention of generating through Calibre. What I've done looks great in the Calibre's right column panel in the edit page. But what the view page shows is quite different.

I'm not sure whether this is an image size/resolution issue or a fixed vs reflow issue. I can't seem to make any sense of direction from my Google search results. And I am apparently not using the proper keywords in my search in this forum.

My hardcopy book, Games on Horses, contains mostly graphics of arena layouts (I created through paint.net) and game materials (photographs) along with text describing how to use them in the games.

Should I choose fixed or reflow? Is there a preferred ratio or dimension for the graphics? Each arena image is best described a portrait on its own page. The materials photos are primarily square, "floated left", with text on the right. I've reduced the images to 96px/inch.
Reply 

#2  Quoth 01-29-2022, 09:21 AM
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).
Reply 

#3  Hitch 01-29-2022, 12:24 PM
Quote Quoth
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).
I wanted to kibitz just a bit here.

Quoth, you know what you're doing, so you can troubleshoot, but for eBook manuscripts or source files--like what you're directing this poster to do--for Amazon/Kindle, the old TOC bookmarking method no longer works to provide full TOC functionality vis the NCX.

To get an HTML TOC and an NCX, you must (MUST) build a TOC, in something like Word or LO, etc. using heading styles and an auto-built TOC. If you use para styles for the TOCs, it won't work.

It must be heading styles and an automatically-built TOC. I've recently had two (2) customers come along with this very issue in their Word files and I've had to instruct them as to how to address it.

Hitch
Reply 

#4  Quoth 01-29-2022, 12:42 PM
I use heading styles. Perhaps I didn't explain clear enough what I'm doing in LO Writer.
My system works 100% with Calibre's Automatic TOC generation. I don't send docx to anyone, it's only for Calibre.

Our epub2 files from Calibre work perfect with Amazon's KDP. We've checked their retail kf7, kf8 and KFX from our uploads.

Indeed for the proofing of drafts we just use the wordprocessor autogenerated contents page and the heading levels.

Anything not to appear in a ToC is set as "Text Body" in the paragraph style. The names and menus etc in styles are not quite the same in MS Word & LO Writer, but functionally the same and LO Writer exports to docx properly.

Quote
If you use para styles for the TOCs, it won't work.
Everything in LO is a "para style". But in Paragraph Style and "Outline and Numbering" tab you set Outline: Outline Level to "Level 1", "Level 2" etc (or "Text Body" if it's NOT a heading). Obviously "Numbering Style" is set to none. Never ever use built-in list numbering styles for ebooks, heading or not. Explicitly add numbers to list items.
Using up to only two levels is recommended.



So there is nothing to kibitz, I'm doing exactly what you are writing, it's just the terminology is LO Writer, not MS Word. Exactly the same.

I've forgotten what the MS Word equivalent is as I stopped using Word about 7 years ago!
Reply 

#5  Hitch 01-29-2022, 01:02 PM
Quote Quoth
I use heading styles. Perhaps I didn't explain clear enough what I'm doing in LO Writer.
My system works 100% with Calibre's Automatic TOC generation. I don't send docx to anyone, it's only for Calibre.

Our epub2 files from Calibre work perfect with Amazon's KDP. We've checked their retail kf7, kf8 and KFX from our uploads.

Indeed for the proofing of drafts we just use the wordprocessor autogenerated contents page and the heading levels.

Anything not to appear in a ToC is set as "Text Body" in the paragraph style. The names and menus etc in styles are not quite the same in MS Word & LO Writer, but functionally the same and LO Writer exports to docx properly.


Everything in LO is a "para style". But in Paragraph Style and "Outline and Numbering" tab you set Outline: Outline Level to "Level 1", "Level 2" etc (or "Text Body" if it's NOT a heading). Obviously "Numbering Style" is set to none. Never ever use built-in list numbering styles for ebooks, heading or not. Explicitly add numbers to list items.
Using up to only two levels is recommended.



So there is nothing to kibitz, I'm doing exactly what you are writing, it's just the terminology is LO Writer, not MS Word. Exactly the same.

I've forgotten what the MS Word equivalent is as I stopped using Word about 7 years ago!
If you're creating an ePUB2, sure, of course they work.

You were talking about the old bookmark method for TOC building. YES, if you're building an ePUB in Calibre, that works. But if, as I think I said, someone follows that old method and uses it to direct-upload a Word file to KDP, it won't create the NCX. That's my sole comment here.

I'm not talking about an ePUB upload. Any ePUB, made pretty much any way, that validates, will already have either an NCX (ePUB2) or a NAV (ePUB3) so the discussion there is moot. I'm simply talking about bookmarking and word files, period and building an internal toc using those bookmarks, rather than auto-generating one--and then uploading that self-same Word file to KDP. NOT an ePUB generated therefrom. Right?

Hitch
Reply 

#6  Quoth 01-29-2022, 02:35 PM
Uploading a word doc direct to KDP stopped being a good idea some years ago. Amazon themselves told me to use epub2 instead.
We run the 2 epub checks available in Calibre Editor plug-in & look at ToC in the ToC editor as a sanity check. Then we check all links & Index in the Calibre Viewer.
Then eink ereaders.
Reply 

#7  gmw 01-29-2022, 05:59 PM
grNadpa, if I might paraphrase Quoth to answer your question: use reflow. If you need help doing that, try their solution if it suits you (eg: if you use Word) but there are other ways.

Fixed layout needs epub3 and is going to significantly reduce the number of devices on which the book can be viewed ... but this may be effectively true for your book anyway. If it is graphics heavy and those graphics need to be shown at a certain minimum size to be useful then perhaps you are already limited to larger tablets?

Do you have a 6" e-ink reader on which to experiment? Put a few of your images in a reflow epub (epub2 file) and load it up to see if it's useful/useable. If so, go with reflow to maximise where the book can be viewed. If not ... you could alter you book layout to better suit reflow, but if that doesn't suit I don't have the experience to help much. I'd normally go with pdf for fixed layout because of its almost universal support (even most e-readers will view pdf albeit awkward to use that way) but pdf would limit where/how you could sell the result.

In short: reflow is going to be the most flexible option if you can get it to work for your book.
Reply 

#8  grNadpa 02-01-2022, 01:15 PM
Apologize for not responding. I mistakenly expected any replies to alert me through my email. Silly me.
@Quoth saving my word document as html results in garbage. I suspect because of how "cute" I get with tables and other formatting. And I do flow around my images. So I have resorted to writing in xhtml and css. But I don't have confidence in how it will look as I do not have an e-reader of any kind.
Speaking of which, you suggest a default page of 420pt x 560pt (by my calculation that works out to be 5.8 inches x 7.7 inches.) Would setting a css maxwidth of 5.8 inches (or pixel equivalent) be a suitable workaround for my laptop Chrome or Edge browser?
@hitch Like I mentioned, my Word 2016 document creates some very bizarre code and graphics files quite beyond my the graphics I specify. Hence I am creating XHTML and css from scratch. My plan is to use Calibre to load my XHTML and CSS to generate the epub files (and kindle) including the toc.
@GMW thank you for the reflow recommendation. I do not have an 6 inch e-ink reader. My wife has an I-pad. But I have no idea how to arrange a test.
Reply 

#9  gmw 02-01-2022, 06:20 PM
Quote grNadpa
[...] Would setting a css maxwidth of 5.8 inches (or pixel equivalent) be a suitable workaround for my laptop Chrome or Edge browser?
[...]
@GMW thank you for the reflow recommendation. I do not have an 6 inch e-ink reader. My wife has an I-pad. But I have no idea how to arrange a test.
You cannot effectively emulate an e-reader using a browser. Different technologies and different expectations. It's been some years since I last went through the process, but Amazon used to have software that allowed you to emulate various Kindle displays in a program on your desktop. (Which means building your epub then converting to mobi - for which Amazon had another utility.)

If this is a commercial enterprise, and if you do want the book to be readable on e-ink readers, then I strongly suggest you invest in a cheaper Kobo (or similar) so you can see for yourself. e-readers are different and it's best to see it for yourself to really understand.

Alternatively, you can find one of the various services out there that can help you out - for a price.
Reply 

#10  Hitch 02-01-2022, 08:38 PM
Quote gmw
You cannot effectively emulate an e-reader using a browser. Different technologies and different expectations. It's been some years since I last went through the process, but Amazon used to have software that allowed you to emulate various Kindle displays in a program on your desktop. (Which means building your epub then converting to mobi - for which Amazon had another utility.)

If this is a commercial enterprise, and if you do want the book to be readable on e-ink readers, then I strongly suggest you invest in a cheaper Kobo (or similar) so you can see for yourself. e-readers are different and it's best to see it for yourself to really understand.

Alternatively, you can find one of the various services out there that can help you out - for a price.
Kindle Previewer 3 does a decent-enough job. Not as good as seeing the file on a bonafide small device--KP3 has the book emulators about 1.5x the actual size of a real Paperwhite, etc.--but it's a sh*t-ton better than using a browser.

Hitch
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register