02-03-2014, 07:47 AM | #1 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Duplicate chapters in Moon+Reader after conversion
I converted an html file to epub. In Moon+Reader I get duplicate chapters (chapter 1, chapter 1, chapter 2, chapter 2 etc...)
Cool Reader does not have this problem but is not my reader of choice. I am wondering if anyone knows what may cause this problem? It does not happen with most conversions and I am stumped about what to look for. |
02-03-2014, 10:40 AM | #2 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Are the chapter files really duplicated (2 files with the same)? If NO open the OPF Are there duplicated filename entries in the <Spine>? And are the filenames really long? |
|
Advert | |
|
02-03-2014, 10:56 PM | #3 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
You can view the TOC using calibre's Edit TOC feature (you might have to go to Preferences - Toolbars and add it to a menu). What do you see?
Last edited by DoctorOhh; 02-03-2014 at 11:42 PM. |
02-04-2014, 02:31 AM | #4 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
The spine is way weird.
For some reason the first nave label is <navLabel> <text>Chapter One The entire text of the chapter is here</text </navlable> etc. I didn't clean up the html myself. It was a really nested xhtml file with a ton of divs. I'm wondering what would cause this in the conversion? I am going to try to duplicate this problem with an open source book so I can upload it lol. Last edited by LadyKate; 02-04-2014 at 02:50 AM. |
02-04-2014, 02:35 AM | #5 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
With edit toc I get
Chapter One --text of chapter -- Chapter One Chapter 2 -- text of chapter -- Chapter 2 etc etc. What causes a conversion from html or xhtml to do this??? Last edited by LadyKate; 02-04-2014 at 02:42 AM. |
Advert | |
|
02-04-2014, 03:08 AM | #6 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
At least with Edit TOC you have an extremely simple and quick method of deleting the duplicate entries. Last edited by DoctorOhh; 02-04-2014 at 03:10 AM. |
|
02-04-2014, 03:35 AM | #7 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
My settings in the Table of Contents section of conversion are the defaults.
I don't get this problem with most of the html I convert. I am a bit tired now so not up to experimenting but will have a go sometime this week at recreating the problem and then paring down and seeing what html is causing it. In truth, I had never used the Edit ToC plugin until it was mentioned here lol and had been converting, transferring the epub to my tablet and checking it lol. This is much quicker. I have to wonder if it is the nested divs or the ids on the divs that is doing it. But like I said, I'll experiment when I have the time and energy to. I just took another look and think perhaps the problem is the class on the nested div tags. I have class="chapter" on the entire chapter and then the other chapterHead, chapterNumber classes nested. LOL no wonder I prefer to redo the html myself. I will try changing the class names and see if it gets rid of the problem. (the following is how each chapter is coded. <div class="chapter" > <div class="chapterHead"> <h2 class="chapterNumber" id="ch01"> <span class="bold">Chapter One</span> </h2> </div> <div class="chapterBody"> <p class="chapterOpenerText">The bust was about to go down.</p> many paragraphs </div> Last edited by LadyKate; 02-04-2014 at 03:53 AM. |
02-04-2014, 04:27 AM | #8 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
I convert then view it in calibre's viewer then use the Edit TOC or Edit Book features as needed. The Edit TOC does a great job and it is quick and easy.
|
02-04-2014, 06:02 AM | #9 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
Thanks all. The Edit TOC is great. I had not used it before.
I did a test and it was the nested div with class="chapter" at the wrong point (spanning the entire chapter" that was causing a problem. That plus classes named chapterHead etc was causing problems with the TOC in the conversion. Teach me to use an html file I hadn't "tweaked" myself. At least I've now learned how to fix this problem! |
02-04-2014, 06:38 AM | #10 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Alternatively you could check the Manually fine-tune the TOC after conversion is completed option and the Edit TOC tool will pop up after conversion completes. This gives you a chance to glance at the TOC and immediately correct it if required. |
|
02-04-2014, 09:56 AM | #11 | |
Well trained by Cats
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
<h3 title="Chapter One --text of chapter --"> <a... /></h3> <h3>Chapter One</h3> or a weak (too loose) of a Xpath or might be caused by forcing the detection (force use of Auto generated TOC) look at the TOC tab of the books conversion settings IMHO 1 book... Use the TOC editor to fix |
|
02-04-2014, 07:04 PM | #12 |
Fanatic
Posts: 515
Karma: 1470724
Join Date: Jul 2013
Location: Quebec CA
Device: android 4 (samsung tablet and asus tablet)
|
True theducks, for the few books I found already it's easier using the toc edit BUT now I know what to look at when checking html prior to conversion.
More to the point I know WHY it happened . I hate not knowing why problems crop up. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Want chapters on new page in moon + reader | Kenyanscott | Android Devices | 0 | 02-06-2013 03:24 PM |
Calibre-Conversion: Parts and Chapters | linzerkipferl | Conversion | 2 | 02-05-2012 03:14 PM |
Manual ToC makes duplicate chapters? | JDawg | ePub | 8 | 07-17-2011 09:12 PM |
.Epub to .Mobi--duplicate chapters generated? | JDawg | Calibre | 0 | 07-15-2011 08:50 PM |
Double Chapters epub after Conversion | mara1212 | Conversion | 1 | 04-25-2011 09:25 AM |