06-19-2018, 02:42 PM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2014
Device: none
|
.docx --> epub - Heading styles not translating to <h1> <h2>
Help! I'm converting a docx file to epub. Usually I specify
• Level 1 ToC (Xpath expression): //h:h1 • Level 2 ToC (Xpath expression): //h:div[@id] and it works great. Suddenly it's not doing that - <h1> and <h2> are no longer marking chapter headings and subheadings. Lulu requires all chapters and subheadings to be in <h2> <h3> format. Did anything change recently? Source file: http://friedmanarchives.com/~downloa..._for_epub.docx Output file: http://friedmanarchives.com/~downloa...III_v1.05.epub Thanks! GF |
06-19-2018, 09:31 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You dont need to use structure detection, calibre will automatically create a ToC based on the ToC in the docx file. As for the headings, it's likely because they are formatted using tables in the docx file. Format them as normal paragrpahs and it should work.
|
06-20-2018, 01:30 AM | #3 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2014
Device: none
|
Thanks, Kovid. But as you'll note in the source file the headings are not inside tables. So I'm not sure what I should do next (other than "no need to use structure detection" next time. :-) ).
As mentioned earlier, I've done six other similarly-formatted books this way, all successfully. GF |
06-20-2018, 01:43 AM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sorry, typo, I meant to say list, not table. The headings are formatted as lists.
|
06-20-2018, 02:44 AM | #5 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2014
Device: none
|
|
06-20-2018, 03:44 AM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because the list you are using in this book uses index formatting that cannot be represented except as a table in HTML, which means your headings cannot be represented using <h> tags
|
06-20-2018, 07:27 PM | #7 |
Member
Posts: 12
Karma: 10
Join Date: Oct 2014
Device: none
|
I found the problem. Normally I go into VBA immediate mode and type
ActiveDocument.Range.ListFormat.ConvertNumbersToTe xt which converts the numbered list with just numbers. For some reason it didn't take. Just did it again and all is well. Thank you for taking the time to respond! GF |
Tags |
conversion .docx .epub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using heading styles for title page | Notjohn | Sigil | 7 | 07-25-2014 10:46 AM |
Docx to mobi (Extra space over the heading/title) | zonoiko | Conversion | 0 | 12-04-2013 08:04 PM |
Modifying H1-H6 Heading Styles | townsend | Sigil | 13 | 05-05-2013 05:17 PM |
Converting txt to epub, chapter heading contains number | NMinker | Conversion | 2 | 11-01-2011 11:30 AM |
Keyboard shortcuts for heading styles? | Tryphan | Sigil | 4 | 09-26-2011 06:54 AM |