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 06-28-2013, 03:21 AM   #1
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Horizontal lines in DOCX to EPUB conversion.

I am SERIOUSLY impressed with the new DOCX conversion feature in Calibre (0.9.36). Many thanks!

A minor omission appears to be the handling of horizontal lines.
These generate a paragraph with a consistent, unique style, but the actual <hr> tag is not inserted.

Currently, I can easily correct this using Sigil.
However it may be simple to implement/correct.

Thanks again.
StevieP is offline   Reply With Quote
Old 06-28-2013, 03:33 AM   #2
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You're welcome, attach a sample docx file with the horizontal lines and I'll see if it can be done. IIRC, horizontal lines in DOCX are not a simple thing, but I may be mis-remembering.
kovidgoyal is online now   Reply With Quote
Advert
Old 06-28-2013, 05:19 AM   #3
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Hi Kovid

As requested here's a sample of horizontal lines in DOCX + EPUB formats.
The files are zipped because the forum interface allows .DOC but not .DOCX

I cut the initial text from the MS Word Help system and added some examples as described there.

The different lines convert to block8 - block13 style paragraphs which are consistent for repeated lines of the same type.
I've not worked out how to look inside the word document.

Cheers

Steve
Attached Files
File Type: zip Horizontal Line in word document (642).zip (155.6 KB, 265 views)
StevieP is offline   Reply With Quote
Old 06-28-2013, 05:35 AM   #4
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm somewhat confused, the docx and epub files you attached appear to have the same number of horizontal lines. The styles are a little different, but that's because some line styles are not available in HTML.
kovidgoyal is online now   Reply With Quote
Old 06-28-2013, 05:59 AM   #5
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Yes the EPUB is as generated by Calibre (0.9.37).
This example doesn't have repeated lines of the same style.
StevieP is offline   Reply With Quote
Advert
Old 06-28-2013, 06:58 AM   #6
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
So what is the bug? The EPUB and the docx look the same? I need an example docx that demonstrates a bug on conversion.
kovidgoyal is online now   Reply With Quote
Old 06-28-2013, 09:52 AM   #7
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
The problem is that there is no <hr> tag in the EPUB output and therefore no line across the page.

Steve
StevieP is offline   Reply With Quote
Old 06-28-2013, 10:15 AM   #8
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,559
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by StevieP View Post
I've not worked out how to look inside the word document.
Unzip it - courtesy of KG who told me that a couple of weeks ago.

This what the two files look like here, the first single line seems to absent

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	492
Size:	308.2 KB
ID:	107428  

Last edited by BetterRed; 06-28-2013 at 10:41 AM.
BetterRed is offline   Reply With Quote
Old 06-28-2013, 11:38 AM   #9
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Sorry I've just looked at my example again more carefully:

The problem is that only the Single line (block8) doesn't appear on the page.

The unfortunate thing is that it is that one I use most.
StevieP is offline   Reply With Quote
Old 06-28-2013, 12:09 PM   #10
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Looks like you need to add:

border-bottom-color: black;
border-bottom-style: solid;
border-bottom-width: 1pt;

To the block8 style definition.

Steve
StevieP is offline   Reply With Quote
Old 06-28-2013, 11:15 PM   #11
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah, I see now, the Single line is missing, that's probably because its width is too small, html rendering engines refuse to draw things below a certain width, I'll see if it can be fixed.
kovidgoyal is online now   Reply With Quote
Old 06-28-2013, 11:29 PM   #12
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I had a look, the Single line is represented as a drawing in Word, the others as paragraph borders. The conversion does not support drawings, so the line is missing. I'll see if it is possible to recognize this particular drawing and convert it into an <hr>, it will depend on if Word marks it up the same way every time.
kovidgoyal is online now   Reply With Quote
Old 06-29-2013, 12:10 AM   #13
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...e626486a0d6830
kovidgoyal is online now   Reply With Quote
Old 07-05-2013, 03:14 AM   #14
StevieP
Junior Member
StevieP began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2013
Location: Manchester UK
Device: Kobo
Installed Calibre (0.9.38)

Job's a good un!

Thanks
StevieP is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-600 Blank Screen with Horizontal Lines Coreman Sony Reader 5 06-27-2013 12:38 PM
Centered lines and conversion to epub starrigger Conversion 46 09-07-2012 11:18 PM
Help: blank screen and horizontal lines wildabandon iRiver Story 4 03-29-2011 02:39 PM
Black horizontal lines in pdf viewer yokos iRex 12 09-20-2010 02:09 PM
PRS-600 Faint Screen tiny horizontal lines alex3l Sony Reader 3 05-02-2010 08:45 PM


All times are GMT -4. The time now is 02:27 AM.


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