![]() |
#1 |
Connoisseur
![]() ![]() Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
DOCX -> EPUB NCX generation?
Hi,
how is NCX generation supposed to work? I have defined several heading styles NOT based on Heading styles. But with correct depth settings. In docx file I see the correct levels 1-3 in Navigation pane. I have included Word TOC in text, it's correctly generated for levels 1 and 2 only. When I convert DOCX to EPUB, everything is fine, EXCEPT for the fact that NCX is flat. Ie. it contains both levels 1 and 2, but in 'root' level only, not nested. I've checked all the TOC settings in conversions, but I can't find anything regarding NCX and all the settings are most probably only for inclusion of HTML TOC, which I don't need. I'm pretty sure I docx->epub converted files in the past and they had multi-level NCX files. To sum up: Everything is okay, works okay, except that NCX is flat. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Create a ToC in the word document and it will be automatically used. See the sample at https://manual.calibre-ebook.com/con...word-documents
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
Sorry, I don't understand. That's what I think I did.
There is TOC in the text of the document - { TOC \o "1-2" \h \z \u }. It's displayed correctly in the text of DOCX and in the text of calibre-converted EPUB. But generated NCX file - ie. the TOC displayed on the side of the Calibre Viewer (or in ebook reader) is flattened. That means that Calibre has correctly found all TOC items, but works with them as with 'level 1' items (incorrectly, as they use level 1 and level 2). |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
Attached is minimal example DOCX, which, when converted by Calibre 7.21.0, does create NCX with 4 items, but all on level 1. Word TOC contains two items on level 1, and two on level 2.
DOCX was created on latest Office365 version. (2410, 18129.20116) |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
That was quite unexpected.
I tried to workaround it temporarily by changing TOC2 style 'left' to integer in centimeters, but, alas, it has to be integer in points. That is quite confusing in word. Thanks for the fix anyway! |
![]() |
![]() |
![]() |
#8 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,643
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Centimetres & Inches are ONLY for PDF and direct print. Use em, pt, % or px in ebooks according to context.
A px can mean a pixel, but it's not really. Mostly for text 12 pt = 1 em. Occasionally some ereaders might get indents in pt wrong, so converting pt of margins to em is recommended. |
![]() |
![]() |
![]() |
Tags |
docx to epub, ncx toc levels |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
NCX file being ignored when converting from MOBI to EPUB | sweth | Conversion | 1 | 05-08-2018 02:40 AM |
Converting RTF to ePub with NCX | Sablerose | ePub | 6 | 12-10-2013 09:47 PM |
epub 3.0 with ncx, example please? | xmlgirl | ePub | 2 | 10-12-2012 08:13 PM |
OPF, NCX in Epub | chadpeppers | Sigil | 3 | 01-12-2011 11:11 AM |
Android Epub maker 1.0 (.doc and .docx --> .epub) | devseev | enTourage Archive | 2 | 08-30-2010 12:35 PM |