08-22-2024, 02:27 AM | #1 |
Eye pea vee for master
Posts: 21
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, 02:56 AM | #2 | |
null operator (he/him)
Posts: 20,986
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:
|
|
08-22-2024, 03:20 AM | #3 |
Eye pea vee for master
Posts: 21
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 03:29 AM. |
08-22-2024, 07:27 AM | #4 |
Eye pea vee for master
Posts: 21
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, 02:30 PM | #5 |
Bibliophagist
Posts: 40,383
Karma: 156982136
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.
|
08-22-2024, 08:00 PM | #6 | |
null operator (he/him)
Posts: 20,986
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 12:16 PM |
Understanding TOC conversion options | Paula-59 | Conversion | 9 | 02-02-2016 04:47 PM |
Use conversion to get proper TOC? | Lori Reeser | Conversion | 1 | 09-30-2012 11:59 PM |
Conversion and TOC | M4cc45 | Conversion | 3 | 10-18-2011 02:24 AM |
TOC conversion glitches | Tango Mike | Conversion | 10 | 06-29-2011 12:22 AM |