View Single Post
Old 06-01-2012, 05:48 PM   #26
jswinden
Nameless Being
 
Quote:
Originally Posted by imfede View Post
thank yo all very much, in particular jswinden for his exhaustive answers
this is how i will proceed: taking notes with a kind of wordpad with just basic basic html, not to get distracted form studying
when i finished i will use dreamweaver (which is one of my fav editor) to set up all the layout, images and so on; import that in Sigil to create a ToC and to convert in an .epub and then convert it into a .mobi using kindlegen

But i don't really understand one passage: how do you "manually convert" the .epub in a .mobi? i don't get the part "When I compile the book I point Kindle Previewer to the toc.ncx file, not to the ePub file."

thx in advance
Actually that was a booboo on my part. I wrote toc.ncx file but should have written content.opf file. I'll edit the post to correct it. When you start Kindle Previewer it prompts you to open a file. Kindle Previewer can open mobi, ePub, HTML, or OPF files. What I do is have it open the content.opf file which was created in Sigil as part of the ePub. The content.opf file basically defines the book by pointing to each file that is used in the book and defining how those files are used. Think of it as the blueprints to how you want your book built. When you have Kindle Previewer open the content.opf file it reads the file and understands how you want the book built and then compiles the files into the mobi/KF8 book.

Here is a sample content.opf file so you can understand what it is and what it does:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID" version="2.0">
    <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
        <dc:title>W5JCK Amateur Radio Extra Class Exam Q&A Review 2012-2016</dc:title>
        <dc:creator opf:role="aut">Ceburn Jack Swinden</dc:creator>
        <dc:language>en</dc:language>
        <dc:identifier id="BookID" opf:scheme="UUID">urn:uuid:f6605485-aafd-45c2-a8dd-2e5d7667e7b8</dc:identifier>
		<meta name="cover" content="my-cover-image" />
    </metadata>
    <manifest>
        <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
        <item id="extra-exam.css" href="Styles/extra-exam.css" media-type="text/css"/>
        <item id="Section-E0.html" href="Text/Section-E0.html" media-type="application/xhtml+xml"/>
        <item id="Section-E1.html" href="Text/Section-E1.html" media-type="application/xhtml+xml"/>
        <item id="Section-E2.html" href="Text/Section-E2.html" media-type="application/xhtml+xml"/>
        <item id="Section-E3.html" href="Text/Section-E3.html" media-type="application/xhtml+xml"/>
        <item id="Section-E4.html" href="Text/Section-E4.html" media-type="application/xhtml+xml"/>
        <item id="Section-E5.html" href="Text/Section-E5.html" media-type="application/xhtml+xml"/>
        <item id="Section-E6.html" href="Text/Section-E6.html" media-type="application/xhtml+xml"/>
        <item id="Section-E7.html" href="Text/Section-E7.html" media-type="application/xhtml+xml"/>
        <item id="Section-E8.html" href="Text/Section-E8.html" media-type="application/xhtml+xml"/>
        <item id="Section-E9.html" href="Text/Section-E9.html" media-type="application/xhtml+xml"/>
        <item id="front-matter.html" href="Text/front-matter.html" media-type="application/xhtml+xml"/>
        <item id="linked-toc.html" href="Text/linked-toc.html" media-type="application/xhtml+xml"/>
		<item href="Text/images/cover.jpg" id="my-cover-image" media-type="image/jpeg" />
    </manifest>
    <spine toc="ncx">
        <itemref idref="front-matter.html"/>
        <itemref idref="linked-toc.html"/>
        <itemref idref="Section-E1.html"/>
        <itemref idref="Section-E2.html"/>
        <itemref idref="Section-E3.html"/>
        <itemref idref="Section-E4.html"/>
        <itemref idref="Section-E5.html"/>
        <itemref idref="Section-E6.html"/>
        <itemref idref="Section-E7.html"/>
        <itemref idref="Section-E8.html"/>
        <itemref idref="Section-E9.html"/>
        <itemref idref="Section-E0.html"/>
    </spine>
    <guide>
        <reference type="text" title="Beginning" href="Text/front-matter.html"></reference>
        <reference type="toc" title="Table Of Contents" href="Text/linked-toc.html"/>
    </guide>
</package>
So I use Sigil to create the content.opf file and the toc.ncx file. Both can be created manually, but they are a PITA to create manually. So use Sigil to create them. They are created when Sigil creates the ePub and you can see them by expanding (unzipping) the epub.

If you open an ePub or HTML file in Kindle Previewer it will convert that file to a mobi file. If you open a content.opf file Kindle Previewer will create your book using the instructions contained therein. Like I said, or meant to say, in the previous post, a mobi content.opf is slightly different than an ePub content.opf. Either will work, but if you make a couple tweaks to the ePub content.opf you will have better luck getting the cover to display correctly and the TOC to work correctly and few other things can be tweaked as well.
  Reply With Quote