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-20-2019, 06:24 PM   #16
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,587
Karma: 26954694
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
BR
BetterRed is online now   Reply With Quote
Old 12-20-2019, 10:31 PM   #17
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
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-21-2019, 10:53 AM   #18
aap
Member
aap began at the beginning.
 
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.
Attached Thumbnails
Click image for larger version

Name:	Heading3 Styles problem.png
Views:	135
Size:	73.2 KB
ID:	175787   Click image for larger version

Name:	1. fix H3 indent.png
Views:	132
Size:	19.4 KB
ID:	175788   Click image for larger version

Name:	2. update H4 to match selection.png
Views:	126
Size:	15.2 KB
ID:	175789   Click image for larger version

Name:	3. change list level.png
Views:	127
Size:	24.0 KB
ID:	175790   Click image for larger version

Name:	4. set number value.png
Views:	129
Size:	13.9 KB
ID:	175791   Click image for larger version

Name:	firefox rendering.png
Views:	127
Size:	46.4 KB
ID:	175792  
Attached Files
File Type: zip test-docx.zip (69.8 KB, 134 views)
File Type: zip test calibre out.zip (3.2 KB, 133 views)
aap is offline   Reply With Quote
Reply

Tags
"table of contents", docx input, html conversion


Forum Jump

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 12:54 AM
Table of Contents fiona86 Conversion 1 08-11-2011 07:14 AM
Table of Contents ucoa Calibre 1 01-07-2011 09:01 PM
How to: table of contents wizzofoz Sigil 1 10-08-2009 08:22 AM
only the table of contents wang960 Sony Reader 3 08-29-2008 12:45 PM


All times are GMT -4. The time now is 08:49 PM.


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