03-11-2024, 02:06 PM | #1 |
Addict
Posts: 224
Karma: 1181422
Join Date: Dec 2017
Location: DFW, TX area
Device: Paperwhite SE, Libra 2, Oasis 3, Boox Note Air 3C, iPad Pro 11
|
Chapter Headings Issue
I have a book I loaded into Calibre from my Amazon library. When i put the book on my kobo using Calibre (KoboTouchExtended installed, set to 'Send books as kepubs') I notice the chapter headers are broken apart onto separate pages in the kobo.
For instance, looking at the book on Kindle the following is centered and bolded: ----------------------------------- 1 A Header another minor header text of the book ----------------------------------- On the Kobo it becomes (where <next page> means swipe to next page on device): 1 <next page> A Header <next page> another minor header text of the book ------------------------------------ I hope my example makes sense, It does this for several that I have noticed. There is a TON of great information here but I tried search and could not find help although I am sure it exists somewhere. I am hoping someone reading this sees it and has a easy answer. |
03-11-2024, 02:29 PM | #2 |
Wizard
Posts: 1,104
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Maybe you can scramble the book and upload it here so we can check the coding.
|
03-11-2024, 02:36 PM | #3 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
In calibre under Preferences > Common options > Structure detection, the Detect chapters XPath is
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter'] In order to fix that, you'll have to edit either the XPath or the Kindle eBook. YOu could delete the XPath code, sent the eBook to your Kobo and then put it back. |
03-11-2024, 02:37 PM | #4 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
03-11-2024, 02:50 PM | #5 | |
Addict
Posts: 224
Karma: 1181422
Join Date: Dec 2017
Location: DFW, TX area
Device: Paperwhite SE, Libra 2, Oasis 3, Boox Note Air 3C, iPad Pro 11
|
Quote:
Isn't this a problem for pretty much any ebook? Do people generally remove the code and leave it at that? I did stumble upon the plug-in KindleUnpack. To use it after I installed it, I had to delete the epub that Calibre created, then click on the menu icon the plugin added, select AZW3 then select 'KF8 to ePub' option. This created a new epub which then when sent to the kobo, it passed through the touchextended which put a kepub on the device that looks proper. I am unsure if this plugin is considered viable. |
|
03-11-2024, 03:07 PM | #6 | |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
03-11-2024, 04:48 PM | #7 |
Grand Sorcerer
Posts: 10,147
Karma: 224760044
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
I've had that code disabled for many years now, precisely because of this problem.
|
03-11-2024, 05:49 PM | #8 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I have not does a conversion from an eBook I have not seen the code in a very long time. So I know that code is not going to be an issue.
|
03-11-2024, 07:14 PM | #9 |
the rook, bossing Never.
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I've seen div, span and p used rather than hx for headings!
I've had each paragraph be a new page due to a either a mad tag used for body text, or every regular body text paragraph starting <p class="chapter"> There is a lot of madness out there! |
03-11-2024, 07:18 PM | #10 |
null operator (he/him)
Posts: 20,580
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Last edited by BetterRed; 03-11-2024 at 07:24 PM. |
03-11-2024, 07:31 PM | #11 |
the rook, bossing Never.
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Tears in the rain
|
03-12-2024, 07:50 AM | #12 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
That a good reason to make most paragraphs be <p>.
|
03-12-2024, 11:47 AM | #13 |
Well trained by Cats
Posts: 29,811
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Sorry Jon,
That is a good reason for book so called code wranglers to LEARN the craft . <p class="chapter"> for a regular (content) paragraph is just stupid naming. (I am not much of a fan of the insanely long <p class="describe-everything-possible-about-the-styling"> either. Gimme old school UNIX style names TX, FP, CN, CT |
03-12-2024, 01:12 PM | #14 | |
the rook, bossing Never.
Posts: 11,166
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
I guess they were thinking "body of the chapter". It was one of the big publishers. When i'm fixing mad ebook I use <p class="indent"> for ordinary body text and <p class="no-indent"> for a first paragraph after anything centred. The way "zip" works means it's no bloat at all. Last edited by Quoth; 03-12-2024 at 01:15 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Chapter seperators (lines underneath chapter headings) | indieauthor83 | Sigil | 9 | 06-23-2017 06:01 AM |
Epub to Mobi issue...chapter headings. | heeby | Calibre | 3 | 04-10-2012 12:21 AM |
Issue With Chapter Headings and TOC | yoss15 | Kindle Formats | 5 | 02-07-2012 01:54 PM |
Chapter Headings | Paxman53 | Conversion | 3 | 10-12-2011 12:31 PM |
Why H1 and H2 Chapter Headings? | Ransom | Calibre | 11 | 08-10-2011 04:29 PM |