View Single Post
Old 11-07-2007, 06:16 PM   #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: 45,509
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that's a difficult question. I personally use HTML. While using HTML it is important to keep in mind that while you are trying to reproduce the look of a paper book, the fact is that ebooks are not pbooks and sometimes it is necessary to compromise to accommodate the limitations of a reflowable format. A reflowable document will never be as beautiful as a fixed page size document.

Coming to specifics:

1) Use "semantic" HTML as far as possible. For e.g. use the code
<h2 class="chapter_title">Some chapter</h2> instead of just <h2> or even worse a <p> tag.

2) When specifying sizes and positions use % values whenever possible.

3) Use logical font sizes like large, x-large etc instead of actual numerical values. In general the less specific the font information the better, as I feel this is something that should be at least somewhat under the control of the user.

4) Use minimal markup. If some feature needs a ton of markup to accomplish, it may be better to find a alternative representation that while not being absolutely faithful to the original still preserves the meaning.

5) There is the question of metadata. For this at the moment I would recommend just a simple .opf file.


These are what come to mind at the moment. Feel free to ask questions. I took a look at your sample, it does look very nice on the screen. I've attached the resulting LRF from a "default" conversion without using the advanced features of html2lrf (you can view it using the LRF viewer that is part of libprs500, if you dont have a sony reader). As you can see it already looks halfway decent. With a little bit of cleanup of the HTML you should be able to produce a pretty good LRF.
Attached Files
File Type: lrf sample.lrf (55.5 KB, 531 views)

Last edited by kovidgoyal; 11-07-2007 at 06:20 PM.
kovidgoyal is offline   Reply With Quote