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
|