Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2009, 04:03 PM   #1
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,684
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
eReader output SERIOUSLY flawed

I tried converting an ePub to eReader and the resulting eBook was awful.

The formatting I had in the ePub was all gone. What I got was separate paragraphs with no indents and line spaces between them. This is not how it's supposed to be. It's supposed to have indents and no paragraph spaces except where it does to indicate section breaks. Why did it convert to a format that's nothing like the source? It's not that eReader cannot handle the same formatting. This is a serious flaw and should be fixed ASAP.
JSWolf is offline   Reply With Quote
Old 12-28-2009, 05:52 PM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by JSWolf
The formatting I had in the ePub was all gone.
Conversion between formats does not necessitate exact visual output.

Quote:
Originally Posted by JSWolf
What I got was separate paragraphs with no indents and line spaces between them. This is not how it's supposed to be.
This is exactly how it's supposed to be. PML just like TXT can have the document formatted in almost any number of ways. I'm only going to support one style of output for PML.

Quote:
Originally Posted by JSWolf
This is a serious flaw and should be fixed ASAP.
At this time I feel the PML output is complete and is working be design. If you want it outputting in this manner and what it changed you will have to implement it yourself.
user_none is offline   Reply With Quote
Advert
Old 12-29-2009, 10:57 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,752
Karma: 5446592
Join Date: Nov 2009
Device: many
Hi,

I believe that you said Calibre strips off indent and things, upon initial conversions to its internal xhtml format? Does it do this even for properly formatted xhtml with proper css? I would hope not. But from the sounds of things it does.


I realize that an exact visual match is not always possible, but more can be done to keep it closer unless or until the user decides to change it.

The problem is that there are 2 main formats for text that people seem to gravitate to:

1. no indent, but with top and bottom margins that puts extra space between paragraphs to make it clear "speaker/topic" has changed.

versus

2. indent=5% (or so), but with 0 top and bottom margins so that it looks more like a printed book (where indentation helps the eye to detect change in speaker/topic) especially needed if text itself is not fully justified.


If so, then I think that a user switch to keep/create one versus the other while converting would be a good idea.

For example, the xpml2xhtml.py scripts (like its perl counterpart) does track leading spaces and leading \T="5%" and sets indent level css styles upon conversion.

The same thing could easily happen in reverse.

If a command line switch were added (or a default preference) then calibre could easily create the proper indents during almost any conversion.

For example, using the already existing css, upon conversion to pml, adding in the appropriate \T="x%" to start each paragraph (again in the same "0%" to "5%" range) (or even just spaces) should be very doable.

I personally would find this a very useful feature to have, as I am sure others would as well.

My 2 cents,

KevinH
KevinH is offline   Reply With Quote
Old 12-29-2009, 11:05 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: 44,028
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre already has this feature. See the look and feel section under conversion options
kovidgoyal is offline   Reply With Quote
Old 12-29-2009, 12:09 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,752
Karma: 5446592
Join Date: Nov 2009
Device: many
look and feel options

Hi,

Thanks for that tip on the look and feel options.

But I am not sure how much of this is preserved when converted to pml which does not support css and styles must be manually entered by tags.

From the looking at the code that converts to pml (pmlml.py), I do not see how it inserts the \T="x%" anyplace to create the paragraph indent. The \T tag is not even in command array that gets mapped. I have seen many pml files that simply use leading spaces to handle paragraph indent. Does calibre actually insert leading spaces to force the indent of the paragraph upon conversion to pml?

If not, then it would seem to qualify as a "bug" since the current code would not follow your look and feel controls.

Perhaps, simply numbering the paragraphs upon import and creating a array that stores original paragraph formatting at a basic level across ALL possible ebook formats would be useful? Say an array for flags, holding only the most basic info (indentation level, trailing blank lines present, etc).

I see you do have some very nice code that parses the style sheets and that would be even better as long as you had something to properly generate simply stylesheets when importing/exporting things from pml.

At the top of that page it says:

"Normally, you just add a book to calibre, click convert and calibre will try hard to generate output that is as close as possible to the input."

I frankly think your goal of "output that is as close as possible to the input" is the correct one.

So, you may want to rethink how something as basic as paragraph format is being handled in conversion to and from pml. At least from pml to xhtml it is not currently being tracked. And from the sound of the first report and from looking at the code, it at first glance does not seem to be handled on output either.

One big caveat, I only looked at the 6.29 files and not the latest .31, so all of this may be for nothing.

Thanks for listening.

KevinH
KevinH is offline   Reply With Quote
Advert
Old 12-29-2009, 02:34 PM   #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: 44,028
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
user_none will have to comment on PML, that's his baby.
kovidgoyal is offline   Reply With Quote
Old 12-29-2009, 04:41 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,684
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
user_none will have to comment on PML, that's his baby.
He did comment. He basically said it's useless.
JSWolf is offline   Reply With Quote
Old 12-29-2009, 04:43 PM   #8
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: 44,028
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by JSWolf View Post
He did comment. He basically said it's useless.
Feel free to submit patches improving the PML output
kovidgoyal is offline   Reply With Quote
Old 12-29-2009, 05:19 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,684
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
Feel free to submit patches improving the PML output
I don't program in Python. And why can't the eReader output match as closely the input? Why does everything have to be converted into a fixed format?
JSWolf is offline   Reply With Quote
Old 12-29-2009, 05:43 PM   #10
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: 44,028
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by JSWolf View Post
I don't program in Python. And why can't the eReader output match as closely the input? Why does everything have to be converted into a fixed format?
Because that's what user_none felt he had the time/inclination to implement. If you want it to behave differently, roll up your sleeves.
kovidgoyal is offline   Reply With Quote
Old 12-29-2009, 06:11 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,684
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
Because that's what user_none felt he had the time/inclination to implement. If you want it to behave differently, roll up your sleeves.
Why is it that eReader does not fit with the rest of the Calibre philosophy of having as good a conversion at possible that matches the source as much as possible?
JSWolf is offline   Reply With Quote
Old 12-29-2009, 06:41 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: 44,028
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's a philosophy not a law
kovidgoyal is offline   Reply With Quote
Old 12-29-2009, 06:46 PM   #13
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by KevinH View Post
The problem is that there are 2 main formats for text that people seem to gravitate to:

1. no indent, but with top and bottom margins that puts extra space between paragraphs to make it clear "speaker/topic" has changed.

versus

2. indent=5% (or so), but with 0 top and bottom margins so that it looks more like a printed book (where indentation helps the eye to detect change in speaker/topic) especially needed if text itself is not fully justified.

If a command line switch were added (or a default preference) then calibre could easily create the proper indents during almost any conversion.

For example, using the already existing css, upon conversion to pml, adding in the appropriate \T="x%" to start each paragraph (again in the same "0%" to "5%" range) (or even just spaces) should be very doable.

I personally would find this a very useful feature to have, as I am sure others would as well.
Going off of this idea. I can easily check if "remove paragraph spacing" has been enabled. Then produce style 2 output. Otherwise, style 1. I will add this functionality probably in a few minutes but maybe this weekend.

@JSWolf, I'm going to implement this feature because of KevinH's reasoned argument and request. Not because of you demanding that I drop everything I'm doing to change the behavior of the output so you can have books in your favorite style.
user_none is offline   Reply With Quote
Old 12-30-2009, 05:30 PM   #14
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Thanks for putting in so much hard work user_none. We all appreciate it!
chorpler is offline   Reply With Quote
Old 01-02-2010, 11:53 PM   #15
Marseille
Guru
Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.Marseille ought to be getting tired of karma fortunes by now.
 
Marseille's Avatar
 
Posts: 687
Karma: 5700000
Join Date: Dec 2009
Device: kindle
Quote:
Originally Posted by chorpler View Post
Thanks for putting in so much hard work user_none. We all appreciate it!
Ditto that. Thanks to Kevin too.
Marseille is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-600 eink is flawed under the sun goaspy Sony Reader 18 06-02-2010 01:33 AM
iPad Why Flash Is Fundamentally Flawed On Touchscreen Devices jibril Apple Devices 123 04-01-2010 02:30 PM
eReader output (pdb) has too much space on my iPhone bthoven Calibre 7 10-27-2009 07:43 AM
LIT converstion to LRF & EPUB flawed vbuss Calibre 5 09-04-2009 05:34 PM
calibre ereader output testers needed user_none Other formats 24 05-11-2009 12:00 AM


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


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