Bookshelf | Reports | Community | KDP Select

Home » Amazon KDP Support » Ask the Community » Formatting

Thread: KPreviewer shows H1 headings on pages by themselves (blank)


This question is answered.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 14 - Pages: 1 - Last Post: May 19, 2017 4:27 AM Last Post By: William Thompson
Remmian Taylor

Posts: 17
Registered: 04/29/17
KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 2:35 PM
 
Click to report abuse...   Click to reply to this thread Reply
Hello,

Using the latest Kindle Previewer. Made book in Sigil. After converting to mobi with Kindle Previewer, it inserts the proper page break to start a new page for each H1 heading, and the heading shows at the top as it should, but the entire page is blank, so the actual chapter doesn't start until the next page. It's like it inserted page breaks after each H1 ?

There is no page break code following H1's in the original epub to account for this??

Thanks for any guidance....
William Thompson

Posts: 956
Registered: 07/06/14
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 3:27 PM   in response to: Remmian Taylor in response to: Remmian Taylor
Correct
Click to report abuse...   Click to reply to this thread Reply
Not enough information I'm afraid. Some questions for you.

Did you code your ebook yourself in html using an imported html doc in Sigil(epub editor) as your start point?

Or did you just convert your html doc directly to epub using a converter such as Writer2Epub or eLAIX?

I'm stabbing in the dark here(due to lack of information) -- Writer2Epub is well known for creating blank pages below main chapter headings. This will happen if you have main headings as well as chapter descriptors that both use heading styles in your ebook.

More information please.

Why not try my free Sigil plugin now available on MobileRead?

OpenDocHTMLImport

This plugin gives a full OpenDoc HTML(Writer) conversion to epub format.

Remmian Taylor

Posts: 17
Registered: 04/29/17
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 3:56 PM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
Book was written in Word long ago now :), converted to clean HTML using the Toxaris plugin for Word that is specifically for Sigil... then exported into Sigil, polished and coded further in Sigil.

I have been working with it in Sigil for months now, and a conversion to Kindle Previewer a couple weeks back did not have this anomaly.

To try and correct it, I just now merged all the xhtml files within Sigil back into one, then manually entered the code for a chapter break at the end of each chapter to make sure they were before the H1 headings... then executed F6 to break the file up into separate xhtml's... renamed them, re-validated through Flightcrew and epubchecker with no errors... and into Kindle Preview it went.

... with the same result of all H1 headings on their own bank page.

I am using the latest beta of KP, and the time I converted a couple weeks back and did not have this problem I might have been using the previous version of KP.

Thanks for responding.
William Thompson

Posts: 956
Registered: 07/06/14
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:23 PM   in response to: Remmian Taylor in response to: Remmian Taylor
Helpful
Click to report abuse...   Click to reply to this thread Reply
It seems obvious to me that there is something causing the page to break after the main chapter heading. This can be caused by spurious mobi breaks being inserted for some reason. Generally, the page-break-after: always property in your CSS will have no effect in an epub. In an epub section/chapter breaks are all denoted as separate files in the Book Browser, manifest and spine in Sigil.

To perhaps get a better handle on your problem and to see what happens when your epub is converted to mobi, I would download and use the KindleImport plugin for Sigil from MobileRead. This will let you see your mobi code back-engineered to an epub again and should show you more clearly what is causing your pagebreak problem with your chapter headings. First convert you epub to the problematic mobi then convert it back to an epub again using the KindleImport plugin by DiapDealer. Then inspect the html to see the problem itself in the code.

Why not try my free Sigil plugin now available on MobileRead?

OpenDocHTMLImport

This plugin gives a full OpenDoc HTML(Writer) conversion to epub format.

Notjohn

Posts: 21,506
Registered: 02/27/13
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:24 PM   in response to: Remmian Taylor in response to: Remmian Taylor
Helpful
Click to report abuse...   Click to reply to this thread Reply
It's like it inserted page breaks after each H1 ?

Only if you elected that.

Here's my style for a heading (I use H2, but you can call it H1 if you like):

h2 {
margin-top:1em;
font-size: 150%;
text-indent: 0em;
font-style: italic;
text-align:center;
}

There will be no page break unless you actually insert one.

You are welcome to borrow or adapt my style sheet (on my blog) as your own.

Good luck! -- NJ

The book: Notjohn's Guide to E-Book Formatting (and print as well!)

The blog: http://notjohnkdp.blogspot.com
William Thompson

Posts: 956
Registered: 07/06/14
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:40 PM   in response to: Notjohn in response to: Notjohn
 
Click to report abuse...   Click to reply to this thread Reply
NotJohn...The style property such as page-break-before: always will have no effect in an epub or a mobi file. Hitch has also stated this many times. It's only when you convert a Word doc to mobi that doc page-breaks are used by the converter to create separate chapter files or sections in the mobi. But, as stated above, page-break styling will have no effect because separate sections and chapters are only ever created and denoted as separate files in epubs and Kindle mobi.

So whenever you split a file at the cursor in Sigil == pagebreak

That's why the page-break styling family in both Kindle mobi and epubs are completely irrelevant.

Why not try my free Sigil plugin now available on MobileRead?

OpenDocHTMLImport

This plugin gives a full OpenDoc HTML(Writer) conversion to epub format.

Remmian Taylor

Posts: 17
Registered: 04/29/17
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:44 PM   in response to: Remmian Taylor in response to: Remmian Taylor
 
Click to report abuse...   Click to reply to this thread Reply
Thanks to both William and notJohn.... I never thought to look in the CSS, I just kept looking at the book code. There was no reason to have the "pagebreak always" line in the CSS h1 code, but there it was! I know I didn't put it there but I can guess how it got there...

...every time I add something to CSS I validate it with W3C... and the last time I did that I had copied in some CSS code from a forum (had nothing to do with H1 but with bolding text) where the poster figured the reader would know how to format it correctly for CSS, but I didn't, so I let the W3C validator pop up an error, then it shows how the CSS should look below, (in total, meaning it displays your entire CSS, not just the part it corrected).... so I copy/pasted the entire CSS sheet from there into Sigil, overwriting mine and W3C must have added that line to the H1 code.

Thanks so much to both of you. I am new at this and still learning, obviously!
Remmian Taylor

Posts: 17
Registered: 04/29/17
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:49 PM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
@William.... it had an effect in this case, though. Soon as I deleted that line from the CSS H1 code and saved in Sigil, then loaded the epub into Kindle Previewer for conversion, it came out perfect again. ?? I can't say why, I know nothing. Except that it's right now, thanks to both of you. (You mentioned the pagebreak always line, and notJohn mentioned the CSS code... so together you both made me look at the CSS and find the problematic line.) I would like to mark both your answers as correct but don't know how to do a second "correct answer" ... can't see the button on notJohn's post.
Remmian Taylor

Posts: 17
Registered: 04/29/17
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:54 PM   in response to: Remmian Taylor in response to: Remmian Taylor
 
Click to report abuse...   Click to reply to this thread Reply
Marked the wrong post as the correct answer... moving to mark William's other post!
Remmian Taylor

Posts: 17
Registered: 04/29/17
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 4:55 PM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
I give up trying to navigate this forum to put the correct star in the right place... but for anyone who follows, both William and notJohn were correct!
booknookbiz

Posts: 3,748
Registered: 03/04/10
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 10:26 PM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
William Thompson wrote:
NotJohn...The style property such as page-break-before: always will have no effect in an epub or a mobi file. Hitch has also stated this many times. It's only when you convert a Word doc to mobi that doc page-breaks are used by the converter to create separate chapter files or sections in the mobi. But, as stated above, page-break styling will have no effect because separate sections and chapters are only ever created and denoted as separate files in epubs and Kindle mobi.

So whenever you split a file at the cursor in Sigil == pagebreak

That's why the page-break styling family in both Kindle mobi and epubs are completely irrelevant.


William:

Just a little clarification: that's not actually what I've said. I've frequently said that this codswallop about making a TOC, using the page-breaks yadda--that's, well, codswallop. BUT, the page-break-before: always and after actually does work, in the HTML (of a Word file exported to HTML, to cause page-breaks prior to headings, or after, as in this case). If you export the HTML, from a Word file with this styling, you'll see that. And while folks like you and we don't use that, that way, because we break out individual sections and segments into HTML, it does work for Word file uploaders.

I just wanted to be clear about which "page break" stuff I say doesn't work. It's the stuff about making TOC's that way. Not the page-breaks in headings.

Good luck, everybody.

Hitch
We produce eBooks
An Amazon Professional Conversion Service : http://amzn.to/29pWZSg
www.Booknook.biz
William Thompson

Posts: 956
Registered: 07/06/14
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 10:49 PM   in response to: booknookbiz in response to: booknookbiz
 
Click to report abuse...   Click to reply to this thread Reply
Hitch...I guess I expressed it badly but I did say in my original post that page-breaks were used in the conversion of the Word doc or Word html to Kindle mobi. But doc page-breaks(from the doc html) really have no real function once they have been completely transformed into an epub or a Kindle mobi. That's all I was trying to say. As far as I know, the best way to create a separate chapter or section in an epub or Kindle mobi(I'm not referring to a single html file here) is to split the original file into separate files as described above in my original post. But if I've confused anyone then I apologize.

Why not try my new Sigil plugin now available on MobileRead?

OpenDocHTMLImport

This plugin gives a full OpenDoc HTML(Writer) conversion to epub format.

booknookbiz

Posts: 3,748
Registered: 03/04/10
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 18, 2017 11:02 PM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
William Thompson wrote:
Hitch...I guess I expressed it badly but I did say in my original post that page-breaks were used in the conversion of the Word doc or Word html to Kindle mobi. But doc page-breaks(from the doc html) really have no real function once they have been completely transformed into an epub or a Kindle mobi. That's all I was trying to say. As far as I know, the best way to create a separate chapter or section in an epub or Kindle mobi(I'm not referring to a single html file here) is to split the original file into separate files as described above in my original post. But if I've confused anyone then I apologize.

No problem. I just like to be clear, because of all the newbs that we get here.

I agree, 100%--the best way to handle that issue is to put each chapter or section (e.g., copyright page, acknowledgements, TOC, etc.) in its own HTML/XHTML file, in the ePUB/zipped HTML/MOBI file. It gives you many more options than the page-break-before/after. :-)

Hitch
We produce eBooks
An Amazon Professional Conversion Service : http://amzn.to/29pWZSg
www.Booknook.Biz
Notjohn

Posts: 21,506
Registered: 02/27/13
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 19, 2017 2:34 AM   in response to: William Thompson in response to: William Thompson
 
Click to report abuse...   Click to reply to this thread Reply
The style property such as page-break-before: always will have no effect in an epub or a mobi file.

William, you do go off on tangents! Where did I say anything about page-break-before? (Or after, for that matter!)

Good luck! -- NJ

The book: Notjohn's Guide to E-Book Formatting (and print as well!)

The blog: http://notjohnkdp.blogspot.com
William Thompson

Posts: 956
Registered: 07/06/14
Re: KPreviewer shows H1 headings on pages by themselves (blank)
Posted: May 19, 2017 4:14 AM   in response to: Notjohn in response to: Notjohn
 
Click to report abuse...   Click to reply to this thread Reply
Notjohn...You mentioned page-breaks in your very first post. Have you forgotten already?

Here's the excerpt.

Notjohn said
There will be no page break unless you actually insert one.

And in that comment above, were you referring to doc html or epub xhtml? You weren't very clear on this.

If you still don't understand what I'm talking about then perhaps a quick re-read of my posts and Hitch's posts might help to enlighten you.

I confess that I do worry about your memory Notjohn because you seem to possess quite a short memory span these days.
Legend
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums