View Single Post
Old 01-07-2012, 02:16 PM   #1
UrbanR
Junior Member
UrbanR began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2012
Device: kindle
XML Coding to Create Kindle book with Calibre

Hi,

for some time I have been trying to work out how to export an existing book, which has been published as a paper book, out of InDesign CS4 and into Kindle format.

There is a beta 'Kindle Export' plugin for InDesign, but I found its output was flawed. In my book at least, there are various annoying things like missing italics, etc.

My next move was to open the .mobi files it made in Calibre, and to 'inspect' at problematic points to see the xml. It looked like a mess ... there were loads of redundant font and css tags.

Next I tried using Indesign's built in 'Export to Digital Editions' which produces an epub file. There were also similar problems with that. So, I have resigned myself to having to do some manual editing of the xml.

I have exported the file from Calibre as HTMLZ, unzipped it and have it open in Dreamweaver. This is very useful for me as an ex-coder, as I can now see it is an unscary normal html file, which gives me hope that I will be able to iron out the teething problems.

However, there is a big problem: Calibre seems to have created thousands of redundant CSS tags. Almost every sentence has a new one, <div class="calibre4">, <p class="calibre27">, and so on...

My idea is that, if I could just get rid of all of these and make a simple file with simple html tags <p> <h1><h2> etc., then when it was converted back to a .mobi file it would work nicely...

Does anyone have any idea how to stop Calibre from creating all these tags, or why it does so? Or a quick way to strip them all out?

Alternatively, has anyone succeeded in exporting from InDesign successfully to epub or mobi ? I would appreciate advice from anyone who has done so.

and finally, there seems to be no straightforward guide to which standard tags you should use within a file destined for the Kindle (for the table of contents, headings, etc.). Is there one anywhere?

thanks,

Robin
UrbanR is offline   Reply With Quote