08-22-2024, 03:27 AM | #1 |
Eye pea vee for master
Posts: 24
Karma: 13632
Join Date: Nov 2014
Location: Philippines
Device: Android tablets, Android phones and PC's both Windows and Linux.
|
How to NOT have a TOC in the conversion
I have a DOCX document that does NOT have chapter headings. There should be no TOC, but Calibre is seeing the footnotes and creating a false TOC with them. I need to not have that happen.
I have tried to fix it within the Preferences/Conversion/Common Options/TOC but nothing I try in that makes any difference. |
08-22-2024, 03:56 AM | #2 | |
null operator (he/him)
Posts: 21,007
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If the footnote styling in the DOCX is a match to what's you have in Preferences->Conversion->Common options->Structure Detection->Detect chapters at (XPath expression) that could trigger a ToC entry
Quote:
|
|
Advert | |
|
08-22-2024, 04:20 AM | #3 |
Eye pea vee for master
Posts: 24
Karma: 13632
Join Date: Nov 2014
Location: Philippines
Device: Android tablets, Android phones and PC's both Windows and Linux.
|
Fascinating but what part of this does the / come in? Or do I erase all of it and substitute the /
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prol ogue|epilogue)(\s+|$))', 'i')) or @class = 'chapter'] Well, anyway I tried removing all and replacing with "/" and it didn't remove the TOC. Last edited by VeryWellAged; 08-22-2024 at 04:29 AM. |
08-22-2024, 08:27 AM | #4 |
Eye pea vee for master
Posts: 24
Karma: 13632
Join Date: Nov 2014
Location: Philippines
Device: Android tablets, Android phones and PC's both Windows and Linux.
|
I gave up trying to fix this. Instead I put a hidden header of single "." in the original document and it now creates a essentially empty ToC. I hate hacking a document to deal with converter, but at least it works.
There are times code can be "smarter" by half and can cause problems. There needs to be a simple check box that says: "Do NOT create a ToC." |
08-22-2024, 03:30 PM | #5 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If you are reconverting a document and have made changes in how you want it converted, did you remove the saved conversion settings? This can be done from the Edit metadata in bulk and checking the Remove stored conversion settings for the selected books.
|
Advert | |
|
08-22-2024, 09:00 PM | #6 | |
null operator (he/him)
Posts: 21,007
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Pretty sure setting the Chapter detection Xpath to '/' and ToC Number of links to '0' used to work… like a decade ago. But it doesn't seem to now. IIRC an NCX is mandatory in EPUB 2 so that might be why. But that doesn't explain why was your footnotes were ending up as ToC entries. Kovid would probably need access to your DOCX to answer that, see ==>> https://calibre-ebook.com/bugs BR |
|
Tags |
toc creation, toc problem |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion - losing TOC | MOJOJE | Conversion | 2 | 06-23-2016 01:16 PM |
Understanding TOC conversion options | Paula-59 | Conversion | 9 | 02-02-2016 05:47 PM |
Use conversion to get proper TOC? | Lori Reeser | Conversion | 1 | 10-01-2012 12:59 AM |
Conversion and TOC | M4cc45 | Conversion | 3 | 10-18-2011 03:24 AM |
TOC conversion glitches | Tango Mike | Conversion | 10 | 06-29-2011 01:22 AM |