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 02-13-2023, 12:42 PM   #1
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Headings Convert as List Items from Writer

Ubuntu 20.04, LibreOffice 7.5, Calibre 6.10
For years, whenever I try the "Last save as docx" in LO Writer, any heading styles come across as table items. I've spent way too many hours and never solved it. So now with Writer 7.5, thought I'd try again. I removed every trace of LO I could find and did a clean install or 7.5 from the .debs. No dice...

I made a tiny doc with two Heading 1 "chapters". As before, The Heading styles have to be in the Chapter Numbering list to act as headings in Writer: see attached pics. (I can't figure out how to get the images between paragraphs of text...)

Now in 7.5, there is a toolbar icon that will tell a style to be "No List", and that works, but only for one header instance at a time. The header style is fixed as "chapter numbering" and can't be changed by editing the style.


So converting my test book with one heading normal and one with the "no list" applied, I get the normal heading as a table and the other as a simple h1, which is what I want. The css that makes it a table item is this:

.calibre1 {
display: table;
margin: 0;
padding: 0;
}
.block_1 {
display: table-row;
font-size: 18pt;
line-height: 1.2;
page-break-after: avoid;
text-align: center;
margin: 28.4pt 0;
padding: 0;
}


If anyone can tell me how to avoid this table thing, it would be great, because the conversion from .odt is not nearly as good as from docx. Is there any way to make ALL the headings act as the "no list" one? It seems to work for everybody else! Also attached are the .docx file and the resulting epub. Many Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	ChapterNumbering.jpg
Views:	89
Size:	161.4 KB
ID:	199717   Click image for larger version

Name:	H1 Para Style.jpg
Views:	81
Size:	75.0 KB
ID:	199718   Click image for larger version

Name:	NoList widget.jpg
Views:	91
Size:	94.8 KB
ID:	199719   Click image for larger version

Name:	Export from docx.jpg
Views:	88
Size:	93.3 KB
ID:	199720  
Attached Files
File Type: docx A Test of Headings docx - me.docx (7.1 KB, 97 views)
File Type: epub A Test of Headings docx - me.epub (30.0 KB, 73 views)

Last edited by retiredbiker; 02-13-2023 at 05:30 PM.
retiredbiker is offline   Reply With Quote
Old 02-21-2023, 01:38 PM   #2
Badas
Junior Member
Badas began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2021
Device: Pocketbook Ultra
The best way is to change List Item to Text in docx. In Word I am using small macros:

Sub ListToText
Dim iCount As Integer, iParaCount As Integer, iListParaCount As Integer
Dim lp As Paragraph
iParaCount = ActiveDocument.Paragraphs.Count
iListParaCount = ActiveDocument.ListParagraphs.Count
For Each lp In ActiveDocument.ListParagraphs
lp.Range.ListFormat.ConvertNumbersToText
iCount = iCount + 1
Next lp
MsgBox "Para count is" & iParaCount & vbCr _
& " List Para is " & iListParaCount & vbCr _
& " Changed " & iCount & " Para Lists."
End Sub

But this is in World. How in LO... I dont know.

Last edited by Badas; 02-21-2023 at 01:41 PM.
Badas is offline   Reply With Quote
Advert
Old 02-21-2023, 03:09 PM   #3
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
see next

Last edited by Quoth; 02-21-2023 at 03:13 PM.
Quoth is offline   Reply With Quote
Old 02-21-2023, 03:12 PM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Make sure the Heading paragraph style in Writer has no list property, only heading level, and only for headings you want in TOC.

Edit only odt, but do an extra Save as docx. Only add docx to Calibre. Never edit a "Save As" docx from Writer in Writer as it reconverts it!

I'm on 6.4.7.2 on main PC, though I have newer version somewhere else, and I don't get headings as list. I guess you are ading an odt to Calibre, which doesn't work so well.
Quoth is offline   Reply With Quote
Old 02-21-2023, 07:28 PM   #5
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by Quoth View Post
1) Make sure the Heading paragraph style in Writer has no list property, only heading level, and only for headings you want in TOC.

2) Edit only odt, but do an extra Save as docx. Only add docx to Calibre. Never edit a "Save As" docx from Writer in Writer as it reconverts it!

3) I'm on 6.4.7.2 on main PC, though I have newer version somewhere else, and I don't get headings as list. I guess you are ading an odt to Calibre, which doesn't work so well.
The mystery is, why don't all you guys have the same trouble with Writer? Got to be some simple root cause, like I've made some silly setting somewhere.

1) Exactly what I would like to do! 7.5 gives me a tool to do that, but one-by-one heading instance (Image in OP). Can't change the Heading style by editing the style. This is not only 7.5--for me it goes back many versions.

2) That is my goal.

3) Yes, I'm converting odt files. With the heading thing not working, it is no worse than doing the docx conversion: a few extra spans to get rid of, versus the table/list headings.

I can simply use some non-heading paragraph style, but then I have no reasonable navigation in Writer, since Navigator works on headings.

Just before sending to Calibre, I can do a search and replace in Writer to change the heading to some other paragraph style, but that's getting crazy complicated.
retiredbiker is offline   Reply With Quote
Advert
Old 02-21-2023, 08:56 PM   #6
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: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Why are you outline numbering your heading styles?

I ask because they're a pain to get rid of in Word.

BR

Last edited by BetterRed; 02-21-2023 at 09:02 PM.
BetterRed is offline   Reply With Quote
Old 02-22-2023, 04:25 AM   #7
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by retiredbiker View Post
The mystery is, why don't all you guys have the same trouble with Writer? Got to be some simple root cause, like I've made some silly setting somewhere.

3) Yes, I'm converting odt files. With the heading thing not working, it is no worse than doing the docx conversion: a few extra spans to get rid of, versus the table/list headings.
No, don't use ODT with Calibre, I understood Kovid to write it's not going to be improved. EDIT only odt, but an extra Save As in DOCX purely for Calibre (or other MS Word users) (Don't edit and save in Writer or the conversions will mess up or even in older versions of MS Word that had a docx upgrade).
Quoth is offline   Reply With Quote
Old 02-22-2023, 04:28 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by BetterRed View Post
Why are you outline numbering your heading styles?

I ask because they're a pain to get rid of in Word.

BR
I think it's a bug. You get can headings as List items (possible to avoid numbers) if you import odt direct to Calibre. Doing Save As in docx and then import docx to Calibre is fine, as long as you never edit the docx in Writer.
Quoth is offline   Reply With Quote
Old 02-22-2023, 09:16 PM   #9
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by Quoth View Post
I think it's a bug. You get can headings as List items (possible to avoid numbers) if you import odt direct to Calibre. Doing Save As in docx and then import docx to Calibre is fine, as long as you never edit the docx in Writer.
Well, for me just the opposite, heading work fine in odt, mess up in that last save as docx. I give up!
retiredbiker is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming items on a list ackomb Library Management 30 01-02-2023 04:52 PM
Collections and items at once in list view ntamas Amazon Kindle 12 11-10-2022 03:48 PM
Jumping to items in book list without activating keyboard shortcuts ownedbycats Library Management 7 01-26-2021 03:22 PM
Commas Following List Items TheArtfulDodger Library Management 3 07-15-2018 06:33 PM
How to convert ''Headings'' to ''HEADINGS''? chaot Workshop 13 03-16-2017 03:32 PM


All times are GMT -4. The time now is 05:07 PM.


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