View Single Post
Old 06-16-2010, 11:36 AM   #16
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by Hitch View Post
the Kindle output profile is very unappealing and would result in nine billion printed pages for my authors. it's also just a wee bit buggy, for example, it produces two cover pages, for no discernible reason
This is a problem with mobipocket's interpretation of the OPF (which uses the guide rather than the spine). The way to fix it is to edit the spine element in your .opf file and take the coverpage out of the linear flow.
Code:
  <spine toc="ncx">
    <itemref idref="coverpage" linear="no"/>
    ...
  </spine>
  <guide>
    <reference href="coverpage.xhtml" type="cover" title="Cover"/>
    ...
  </guide>
If you do this then the cover won't appear in the standard flow of text. Calibre's reader will shunt it to the end, but ADE will catch it from the reference in the guide section and put it at the front. While ADE is smart enough to recognise when it should do this, the mobipocket standard isn't, so a lot of ePubs use this hack to make it easier to convert for the Kindle.

Quote:
It doesn't unzip down to html. It unzips to xhtml. I don't have an easy way--that I know of--to extract the html and then put it all back into Word.
xhtml is just a stricter form of html*. Anything that can read html (well, anything from the past 10 years) will have no problem with xhtml.
As for putting it back into Word - this is the main reason I still use the old (pre-0.2.0) version of Sigil. Open the book in 0.1.8 or 0.1.9, go to code view and you have all the code laid out for you. Copy everything (in code view) then paste it into a blank text document (in Notepad or something like that). Go to the top and remove the line saying
Code:
<?xml version="1.0" encoding="utf-8"?>
then save the text document and change the extension to .html. Now open in Word and you have the epub with all its formatting. Page-breaks that are forced through flow breaks will be indicated by a horizontal rule, as in Sigil. If you want to bring over all the images you need to replicate the directory structure: create a directory for the book and then inside it make two folders, 'images' and 'text'. Put the html file in the 'text' folder and extract all the images to the 'images' folder.

*Actually it's a bit more complex than that, but since your destination is print in this case the nuances don't really matter.

Last edited by charleski; 06-16-2010 at 11:42 AM.
charleski is offline   Reply With Quote