Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2024, 02:06 PM   #1
TheSmitty
Addict
TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.
 
TheSmitty's Avatar
 
Posts: 221
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.
TheSmitty is offline   Reply With Quote
Old 03-11-2024, 02:29 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,092
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.
Karellen is offline   Reply With Quote
Advert
Old 03-11-2024, 02:36 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
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']
When calibre detects what it thinks is a chapter header, it splits the page at that point. So what's happening is the Kindle eBook is using headers tags for each line. Either h1 and/or h2. So calibre is splitting it as it should.

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.
JSWolf is offline   Reply With Quote
Old 03-11-2024, 02:37 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Karellen View Post
Maybe you can scramble the book and upload it here so we can check the coding.
No need to see the eBook. I just gave the reason why it was split.
JSWolf is offline   Reply With Quote
Old 03-11-2024, 02:50 PM   #5
TheSmitty
Addict
TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.TheSmitty ought to be getting tired of karma fortunes by now.
 
TheSmitty's Avatar
 
Posts: 221
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:
Originally Posted by JSWolf View Post
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']
When calibre detects what it thinks is a chapter header, it splits the page at that point. So what's happening is the Kindle eBook is using headers tags for each line. Either h1 and/or h2. So calibre is splitting it as it should.

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.
What you say makes sense. Just so I am clear, you say remove all the code from the 'Detect chapters at (XPath expression)' setting within common options of Calibre, Apply, Convert to EPub, then paste the code back, Apply?

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.
TheSmitty is offline   Reply With Quote
Advert
Old 03-11-2024, 03:07 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by TheSmitty View Post
What you say makes sense. Just so I am clear, you say remove all the code from the 'Detect chapters at (XPath expression)' setting within common options of Calibre, Apply, Convert to EPub, then paste the code back, Apply?

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.
Most chapter header do not use multiple header tags. So it's not an issue in most cases. I would remove the XPath code, do your conversion and then put it back. Actually, most use just p instead of a proper header tag
JSWolf is offline   Reply With Quote
Old 03-11-2024, 04:48 PM   #7
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,085
Karma: 224756896
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.
Sirtel is online now   Reply With Quote
Old 03-11-2024, 05:49 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
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.
JSWolf is offline   Reply With Quote
Old 03-11-2024, 07:14 PM   #9
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,096
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!
Quoth is offline   Reply With Quote
Old 03-11-2024, 07:18 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Quoth View Post
. . .

There is a lot of madness out there!
Here too

BR

Last edited by BetterRed; 03-11-2024 at 07:24 PM.
BetterRed is online now   Reply With Quote
Old 03-11-2024, 07:31 PM   #11
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,096
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Tears in the rain
Quoth is offline   Reply With Quote
Old 03-12-2024, 07:50 AM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
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!
That a good reason to make most paragraphs be <p>.
JSWolf is offline   Reply With Quote
Old 03-12-2024, 11:47 AM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,785
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
theducks is offline   Reply With Quote
Old 03-12-2024, 01:12 PM   #14
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,096
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by theducks View Post
<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.
Yes, agree totally.

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.
Quoth is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 11:28 PM.


MobileRead.com is a privately owned, operated and funded community.