Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-22-2024, 03:27 AM   #1
VeryWellAged
Eye pea vee for master
VeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavens
 
VeryWellAged's Avatar
 
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.
VeryWellAged is offline   Reply With Quote
Old 08-22-2024, 03:56 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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:
An XPath expression to detect chapter titles. The default is to consider <hi > or <h2> tags that contain the words "chapter", "bode, "section", "prologue", "epilogue" or "part" as chapter titles as well as any tags that have class="chapter". The expression used must evaluate to a list of elements. To disable chapter detection, use the expression "/". See the XPath Tutorial in the calibre User Manual for further help on using this feature.
BR
BetterRed is online now   Reply With Quote
Advert
Old 08-22-2024, 04:20 AM   #3
VeryWellAged
Eye pea vee for master
VeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavens
 
VeryWellAged's Avatar
 
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.
VeryWellAged is offline   Reply With Quote
Old 08-22-2024, 08:27 AM   #4
VeryWellAged
Eye pea vee for master
VeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavensVeryWellAged is a rising star in the heavens
 
VeryWellAged's Avatar
 
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."
VeryWellAged is offline   Reply With Quote
Old 08-22-2024, 03:30 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
DNSB is offline   Reply With Quote
Advert
Old 08-22-2024, 09:00 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,007
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by VeryWellAged View Post
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."
Sorry about the bum steer

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
BetterRed is online now   Reply With Quote
Reply

Tags
toc creation, toc problem


Forum Jump

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


All times are GMT -4. The time now is 04:31 PM.


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