View Full Version : Seeking Layout Advice


GrannyGrump
12-10-2012, 07:16 AM
I've been converting ebooks for a number of months now, and sorry to say I have not read any ebooks which are presented like my current project. (I'm sure there are hundreds out there, but I haven't stumbled over them)

I have approximately 450 short pieces I'm placing in 4 volumes, and they range from a single paragraph up to about 7500 words. Usually when I've done short stories, I make a separate xhtml file for each piece. But this would feel pretty awkward for this project. Dozens and dozens of single paragraph "chapters"???

I have never used the "page-break-before" to start new chapters, because on a few reading apps for PC (older version of CoolReader, Calibre viewer, and a couple others I can't recall at the moment), the page break wasn't honored. I decided not to chance it on previous books I've converted.

Can I rely on the CSS-styled page-breaks being displayed?
Or should I physically split the files?
:blink:

DSpider
12-10-2012, 08:54 AM
Splitting them is the only guaranteed way that they start from the top of the page. But would they still start from the top of the page if it was a printed version? Probably not, or else you'd have a lot of pages with some huge blank spaces.

Group them together. 450 stories, 10 stories per chapter (or per file), means 45 chapters.

Then with 4 volumes, you'd have ~11 chapters per volume. That's much more manageable, I think.

GrannyGrump
12-11-2012, 01:58 AM
Sounds like a good way to go. Thank you for very sensible advice.

I guess I let the trees obscure the forest.

:)

AlexBell
12-11-2012, 02:15 AM
For reasons lost in time I always use page-break-after, and I know it works. The Woman in White by Wilkie Collins in the MR Library has a quite idiosyncratic structure, and I've used internal page-break-after to start new pages without needing new files.

If you put a page-break-after within a single file most ePub readers that I've tried will just use one of the other (the CSS or the file ending) to make a new page and have the next file follow on immediately. Apple iBooks in their ineffable wisdom will put a blank page between the two files if you have a CSS page-break, so I suggest that you don't end an html file with a CSS page break if you want it to work in iBooks.

I don't know of any desktop ePub reader which honours pagination. Only the stand alone ePub reading devices do.

GrannyGrump
12-11-2012, 04:59 AM
Ah. page-break-after. So I could make the multi-story chapters as suggested by DSpider, with "page-break-after" between the individual stories. Kewl.

I don't know of any desktop ePub reader which honours pagination.

Well, ADE seems to, so I (perhaps unreasonably) expected that other software would do so as well. As I'm sure has been said thousands of times, would be nice if all software and devices strictly followed the same standard!

Thank you, Alex. I'm off to experiment.

AlexBell
12-12-2012, 01:25 AM
Ah. page-break-after. So I could make the multi-story chapters as suggested by DSpider, with "page-break-after" between the individual stories. Kewl.



Well, ADE seems to, so I (perhaps unreasonably) expected that other software would do so as well. As I'm sure has been said thousands of times, would be nice if all software and devices strictly followed the same standard!

Thank you, Alex. I'm off to experiment.

I don't think desktop ADE honours pagination, grannyGrumpy, or at least it doesn't on my desktop. Perhaps I'm setting the 'reading area' the wrong size.

I've found ADE very unreliable to know whether pages are breaking where I want them to, and showing the top margins I want.

Anyone else finds it works?

GrannyGrump
12-12-2012, 11:44 PM
Odd. :blink: I was checking an epub a few days ago, and ADE did honor a page-break-before, but now I need a sanity check. I can't double-check till I get home, but my curiosity bump is itching furiously.


========

I was able to get ADE working from my portable drive.
Divs with Page-break-after are indeed working. This is V 1.8 on XP Pro SP3.

I don't know that top-margin displays are "pixel-perfect", but it definitely shows a difference between small and large margin settings.

Weird.

mrmikel
12-13-2012, 06:57 AM
I think it is important to not push your luck on page content inside one logical unit. I know I get spillover of an image onto the following page if it is too tall, including any text that is within the paragraph.

Perhaps something similar can occur with text if it is blocked together.

GMcG
12-13-2012, 10:03 AM
I had the same problems with not honoured page breaks and so I made each story a separate file. But after doing some trial and error with Calibre preferences and when studying the MR forums I found:

<div style="page-break-before:always"></div>

You can insert this line in your html file wherever you want a page break. If you use Calibre don't opt for:
'Do not split on page breaks' in 'EPUB Output'. I think similar preferences are in other programs too.
Your original file will be split into as many separate files during the conversion process as it has page breaks, so each chapter will be an individual file as it was recommended by DSpider. The original file will not be imported into your Epub. The Calibre viewer shows the text correctly with page breaks and I think this will work for any device because of the splitting of the file into many sub-files.

George