09-18-2021, 01:58 PM | #1 |
Addict
Posts: 376
Karma: 6312188
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. |
09-18-2021, 04:29 PM | #2 | |
Grand Sorcerer
Posts: 5,637
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
09-18-2021, 06:15 PM | #3 |
Addict
Posts: 376
Karma: 6312188
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! |
09-18-2021, 06:18 PM | #4 |
Resident Curmudgeon
Posts: 76,102
Karma: 134368292
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.
|
09-19-2021, 03:00 AM | #5 | |
Wizard
Posts: 2,303
Karma: 12126963
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
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> Code:
<h1>Part 1</h1> <h2>Chapter 1</h2> <h2>Chapter 2</h2> [...] <h1>Part 2</h1> <h2>Chapter 12</h2> Quote:
Last edited by Tex2002ans; 09-19-2021 at 03:06 AM. |
|
|
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 |