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 12-21-2021, 06:42 PM   #1
GranitStateColin
Member
GranitStateColin began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2017
Device: none
Word -> EPUB Chapter titles blank for Headings using Word's {TC...} codes

I'm not sure if I'm just missing something or if this is a bug or missing feature around an admittedly rarely used feature of Word.

Here's the most common use case of this rare scenario:

Each chapter has a picture for the title of the chapter with the text of the chapter title in a stylized graphic. In order for the Word TOC to still generate correctly, you use Word codes like this {TC "Chapter 1. This is the first chapter" \1 1}. This is set to Hidden in Word so only the graphic is visible when printing.

Armed with that, in Heading 1 style Word can generate the TOC using the text, "Chapter 1. This is the first chapter".

However, upon converting this Word document to EPUB, Calibre shows this in the EPUB-generated TOC as "(Untitled)" including the parentheses. I find this odd, because Calibre obviously tries to find the chapter titles using the Heading styles, even when there is no Word TOC, but it seems to always fail in scenarios like this.

Is there a work-around or change needed to the document in Word for this to work for Calibre, or is this just a missing element in the DOCX -> EPUB conversion?

Thanks,
Colin
GranitStateColin is offline   Reply With Quote
Old 12-21-2021, 07:08 PM   #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: 20,586
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by GranitStateColin View Post
Is there a work-around or change needed to the document in Word for this to work for Calibre, or is this just a missing element in the DOCX -> EPUB conversion?

Thanks,
Colin
See How to ask a question about conversion problems

Importantly: example input and output files

BR
BetterRed is online now   Reply With Quote
Advert
Old 12-21-2021, 09:29 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use one of the many ToC detection features of the conversion pipeline to workaround it. Field codes (which is what you are referencing here) are not fully supported by the docx input plugin. See https://manual.calibre-ebook.com/conversion.html for how to control toc detection.
kovidgoyal is offline   Reply With Quote
Reply

Tags
docx, epub conversion errors, word codes


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove blank spaces in a word with RegEx? RbnJrg Sigil 12 12-19-2018 06:58 AM
Chapter titles and level 1 headings breaking to new page karennewton1 Conversion 1 04-26-2016 01:50 PM
Epub creation - pasting word and preserving codes Mr Pointy ePub 24 03-21-2014 02:55 PM
Losing Last Word of Titles zed88 Calibre 2 05-17-2011 09:00 AM
Word has it that eReaders will open the next chapter yagiz News 6 09-29-2009 08:42 PM


All times are GMT -4. The time now is 06:38 PM.


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