Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2021, 01:58 PM   #1
Cactus Chef
Addict
Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.
 
Cactus Chef's Avatar
 
Posts: 294
Karma: 4504466
Join Date: Apr 2019
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
Advice for fixing a publisher's broken book

I purchased an EPUB version of A Canticle for Leibowitz from Kobo some time ago. All of the core text is there, but there are a number of formatting problems that make it irksome to read, namely that the Table of Contents is nonfunctional, and the chapter markers are incorrect.

I raised the issue with Kobo, who in turn raised it with the Publisher, but the publisher considered the issues "minor" and opted not to fix or recall the book. Kobo offered to refund me, but the book was $3, and I was also happy that the book was sold DRM-free by the publisher, so I told them not to worry about it.

I thought I would try fixing it myself using Calibre's book editor, but it's proving more difficult than I originally thought.

As best I can figure, the book is in three major "parts", and each part has about ten chapters in it. The problem seems to be that the individual HTML files comprise parts rather than chapter (e.g. "index_split_003.html" is the first part and contains ch's I-IX, etc).

What is the easiest way of marking a new chapter point in the HTML or CSS, such that the e-reader (specifically, my Kobo) will be able to easily skip between them and provide reading estimates? I could physically chop the index_split HTMLs into smaller "chapter_split_XXX" files if that's the only way, but if there's a <div> or a <span> or something I can add that would require less surgery, that would be preferable.

Thanks in advance for any advice. If someone has a link to one of those E-book text scramblers/obfuscators for scrambling the ebook's copyrighted text but leaving the formatting, I'd be happy to upload the EPUB here for easier analysis.
Cactus Chef is offline   Reply With Quote
Old 09-18-2021, 04:29 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Cactus Chef View Post
Thanks in advance for any advice. If someone has a link to one of those E-book text scramblers/obfuscators for scrambling the ebook's copyrighted text but leaving the formatting, I'd be happy to upload the EPUB here for easier analysis.
You can obfuscate the book with the Calibre ScrambleEbook plugin or the Sigil Borkify Epub plugin.
Doitsu is offline   Reply With Quote
Old 09-18-2021, 06:15 PM   #3
Cactus Chef
Addict
Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.
 
Cactus Chef's Avatar
 
Posts: 294
Karma: 4504466
Join Date: Apr 2019
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
Thanks! Scrambled version attached here.

I've also attached a screenshot of how the real book looks (at least the ToC), because it might be hard to follow the scrambled one.

As you can see, the TOC is out of order at points, and the anchors don't resolve properly. The anchor point "Part I Fiat Homo" actually goes to the physical ToC page, Part III goes to the Acknowledgement, and "Chapter Twelve" shows up right under Chapter One (it, in fact, begins Part II).

I am noticing that my EPUB app on the computer seems to be able to resolve all of the 'Chapter' points correctly (e.g. I click "Chapter Nine" and it jumps to Chapter Nine in the text successfully), but on my Kobo everything in the ToC just sends me back to the beginning. I'm wondering if this is more a Kobo issue than an EBook issue.

If someone is able to see what's screwed up in the CSS that might be causing this, I'd greatly appreciate knowing how to fix it!
Attached Thumbnails
Click image for larger version

Name:	canticle TOC.png
Views:	229
Size:	143.9 KB
ID:	189303  
Attached Files
File Type: epub A Canticle for Leibowitz - Walter M. Miller Jr__scrambled.epub (544.5 KB, 222 views)
Cactus Chef is offline   Reply With Quote
Old 09-18-2021, 06:18 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,974
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If the NCX ToC is correct, just delete the HTML ToC. That would be the simplest solution if it works.
JSWolf is offline   Reply With Quote
Old 09-19-2021, 03:00 AM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Cactus Chef View Post
Thanks! Scrambled version attached here.
You can use Sigil to split your chapters:

Press Ctrl+F, then make sure you are in Mode: "Regex".

Search: (<p class="calibre1" style="text-align: justify;"><a id="\d+"></a><b class="calibre2">)

Replace: <hr class="sigil_split_marker" />\1

Then Edit > Split at Markers (F6).

This should split all 27 chapters into their individual HTML files.

Note: Make sure to turn off Regex mode. If you don't know what you're doing, you can easily break/delete code out of your book.

* * *

After splitting, you can do some minor cleaning.

Biggest things I would recommend:

1. Rename the HTML files to something that actually makes sense:

Instead of:

- index_split_003.html

you want human-readable filenames:

- Part01.xhtml
- Chapter01.xhtml
- Chapter02.xhtml

Note: This also helps debug if things are busted (like your TOC issue). You can actually tell where the heck the links are pointing instead of all these cryptic names.

2. Change Headings to Use Proper <h1>-><h6>

Instead of this current crud:

Code:
<p class="calibre1" style="text-align: justify;"><a id="287"></a><b class="calibre2">Chapter 1 [...]</p>
you want those headings to be:

Code:
<h1>Part 1</h1>
<h2>Chapter 1</h2>
<h2>Chapter 2</h2>

[...]

<h1>Part 2</h1>
<h2>Chapter 12</h2>
You can then use Sigil's Tools > Table Of Contents > Generate Table of Contents and Tools > Table Of Contents > Create HTML Table of Contents to regenerate a correct TOC for you.

Quote:
Originally Posted by Cactus Chef View Post
I purchased an EPUB version of A Canticle for Leibowitz from Kobo some time ago. All of the core text is there, but there are a number of formatting problems that make it irksome to read, namely that the Table of Contents is nonfunctional, and the chapter markers are incorrect.

I raised the issue with Kobo, who in turn raised it with the Publisher, but the publisher considered the issues "minor" and opted not to fix or recall the book. Kobo offered to refund me, but the book was $3, and I was also happy that the book was sold DRM-free by the publisher, so I told them not to worry about it.
This doesn't seem like a "minor" problem to me. This is a fundamentally broken ebook and should not be for sale in that state.

Last edited by Tex2002ans; 09-19-2021 at 03:06 AM.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura H2O Screen somehow got broken? Need guidance fixing it! Karmylla Kobo Reader 58 03-17-2020 03:17 PM
Arc HELP! kobo broken - no fixing in Australia!! sidsthename Kobo Tablets 0 07-11-2015 05:59 AM
Touch 'Publisher Defaults' seems broken tomsem Barnes & Noble NOOK 4 06-18-2011 10:20 PM
Fixing broken sentences. Vanguard3000 Sigil 18 01-23-2011 12:45 PM
fixing broken button (guide) ashadocat Sony Reader Dev Corner 0 10-01-2009 01:52 AM


All times are GMT -4. The time now is 07:42 AM.


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