View Single Post
Old 12-09-2008, 04:25 PM   #12
ewiplayer
Enthusiast
ewiplayer has learned how to buy an e-book online
 
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
I've been making a lot of EPUB files lately out of some rather technical CHM related files (I'm slowly replacing my pulp library so I can keep everything, including all my notes(!) in this wonderful device) and have found that it's quite difficult to get right.

Some rules of thumb I've come across:
  • Make sure all tags are complete (no dangling tags). htmltidy does a great job here
  • Get rid of as many tables as you can! A lot of these CHM type files put the entire content of the page in one table and that causes tons of problems
  • "normal" tables tend to get truncated in the reader due to being too wide. Convert these tables to some intelligent lists with <hr/>'s around them
  • Play with the CSS to get the colors cleaned up. A lot of the "color" gets translated to light grey and it sucks. Best just to change everything to black that you can
  • <pre> blocks of code can go off the page as well. Use the CSS to shrink their font size and, at worst, reformat the blocks to keep them into a 70 character width at 6pt.

And get yourself a good editor. These are extremely complex edits and they occur across a ton of files... VIM (http://www.vim.org) has always been my editor of choice and it makes these kinds of edits a breeze (relatively speaking - say about 5-10 minutes per book) but if you're not used to this kind of editor, it's going to be more trouble than it's worth.
ewiplayer is offline   Reply With Quote