|
|
#16 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,030
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@aap - Anything is better than Word's HTML, filtered, unfiltered, or passed thru a membrane water filtration unit :lol:
Now Kovid has access to the DOCX he should be able to tell you why you're not getting the desired results. Meantime here's a macro to delete unused styles that might help clean up the template Code:
Sub DeleteUnusedStyles()
'
' DeleteUnusedStyles Macro
'
'
Dim oStyle As Style
For Each oStyle In ActiveDocument.Styles
'Only check out non-built-in styles
If oStyle.BuiltIn = False Then
With ActiveDocument.Content.Find
.ClearFormatting
.Style = oStyle.NameLocal
.Execute FindText:="", Format:=True
If .Found = False Then oStyle.Delete
End With
End If
Next oStyle
End Sub
|
|
|
|
|
|
#17 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,616
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In any case you correct the indent setting on the heading3 style like I pointed out and that will take care of the indented entry after conversion. and the lever 4 heading not being numbered will be fixed in the next calibre release.
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2019
Device: HTML
|
BR/Koval -
After wandering through the catacombs of Word's bizarre styles dialogs, here's a solution. Heading3 did indeed have a buried alignment and indent setting (Heading3 Styles problem.png) To resolve this and the Heading4 missing list level number in the body text: Step1: Change Heading3 indent and alignment to match Heading1 and Heading2 (1. fix H3 indent.png) Step2: Select Heading4 and change to match Heading3 (2. update H4 to match selection.png) Step 3: Change Heading4 to List Level 4 (3. change list level.png) Step 4: Insure Heading4 number values are 1.1.1.1 (4. set number value.png) After processing through Calibre with the flow DOCX>HTMLZ>ZIP, the resulting HTML is now correct !!! (firefox rendering.png) Modified DOCX source (test-docx.zip) and Calibre HTML output (test calibre out.zip) are included. So it is indeed possible to do the 4-level chapter and TOC with Calibre 4.6.0. Thanks to all for your help. |
|
|
|
![]() |
| Tags |
| "table of contents", docx input, html conversion |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Table of Contents not being identified as Table of Contents | openletter | Conversion | 2 | 10-19-2012 01:54 AM |
| Table of Contents | fiona86 | Conversion | 1 | 08-11-2011 08:14 AM |
| Table of Contents | ucoa | Calibre | 1 | 01-07-2011 10:01 PM |
| How to: table of contents | wizzofoz | Sigil | 1 | 10-08-2009 09:22 AM |
| only the table of contents | wang960 | Sony Reader | 3 | 08-29-2008 01:45 PM |