Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 11-07-2007, 05:44 PM   #1
sartori
Connoisseur
sartori began at the beginning.
 
Posts: 54
Karma: 29
Join Date: Oct 2006
Q. for Kovidgoyal or others about Markup Languages

Kovidgoyal (and anyone else with input)

As you have experience with writing convertors for different formats - what would be your preferred 'Master' format for ebooks? I know you are not necessarily the authority on this, but as you write a lot of the easy to use tools for converting to lrf I thought your ideas would be good to hear.

My goal is to create good looking reproductions of pdf archive.org books for viewing on screen in a browser which is not too hard to do. (see http://www.britdesigner.com/sample.html). My problem right now is that even though this looks ok on screen the source html is quite a mess.

I know you mentioned that your tools should be able to parse my sample document, but it might be easier if I build my documents in a format that I know will work well with your code.

I've checked out some of the custom markup languages out there but I think it would be best to use something that is considered a standard.

Thanks for any input you might offer.
sartori is offline   Reply With Quote
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,227
Karma: 27110894
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, 514 views)

Last edited by kovidgoyal; 11-07-2007 at 06:20 PM.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-07-2007, 06:50 PM   #3
jbenny
Addict
jbenny has a complete set of Star Wars action figures.jbenny has a complete set of Star Wars action figures.jbenny has a complete set of Star Wars action figures.jbenny has a complete set of Star Wars action figures.
 
Posts: 323
Karma: 358
Join Date: May 2007
Device: Tablet PC and Nokia N800
I hope you don't mind my adding my 2 cents. First, kovidgoyal has made some very good suggestions. I would add that it wouldn't be a bad idea to use XHTML instead of regular HTML. This would be more standardized and structured and would allow you to use the markup in other ways (like epub), while still rendering in a web browser.

As to the suggestion to use percentages, also a very good idea. You can also use ems for the same reasons. Ems are sometimes easier and more intuitive when dealing with text size and positioning. In either case, definitely avoid using absolute units like pixels

Using logical font sizes is also a good suggestion. You don't want to limit the human reader to some font size that maybe you can read, but he/she can't. This is another case where using ems will work. For example, a header size specified in ems will scale up along with the base font when the reader increases the font size in their browser or viewer.

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


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DTBook markup? frquixote Calibre 10 03-05-2014 06:17 PM
Karma for Kovidgoyal desertgrandma Lounge 73 09-30-2009 10:01 PM
500 error accessing calibre.kovidgoyal.net/download_ubuntu adamvert Calibre 2 03-24-2009 03:05 PM
kovidgoyal: templatemaker -- automatic data extractor sammykrupa Sony Reader 1 07-21-2007 01:52 PM


All times are GMT -4. The time now is 09:24 PM.


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