View Single Post
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: 8,846
Karma: 6120478
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 online now   Reply With Quote