|
|
Thread Tools | Search this Thread |
12-21-2021, 06:42 PM | #1 |
Member
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 |
12-21-2021, 07:08 PM | #2 | |
null operator (he/him)
Posts: 20,586
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Importantly: example input and output files BR |
|
Advert | |
|
12-21-2021, 09:29 PM | #3 |
creator of calibre
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.
|
Tags |
docx, epub conversion errors, word codes |
|
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 |