This opf file guide item does not initiate reading at the filename.html#_toc1 location: <reference type="start" title="Welcome" href="filename.html#_toc1">; when viewed using KindlePreviewer.exe. For some reason using that previewer, the filename.html ebook always opens at the "acknowledgements" page, even though there's nothing in the opf file to direct that result. Anyone know how to code the start reading location?
In my opinion there's nothing in them that elucidates Kindle Preview's failure to open at the location of the anchor tag. Instead, it opens at the "acknowledgements" header, which is determined by the following two lines of code, taken again and respectively, from the BOOKNAME.html and the "guide" section of the BOOKNAME.opf files.
This forum field elides comment code. I'll try again without the tag syntax: the anchor in bookname.html combined with the above copied .opf file code doesn't enable the book starting at that location. Changing the anchor tag to doesn't solve the problem.
Here's the resolution of this problem: (1) there's no tag with the id="start" required in the bookname.html file; (2) if what's sought is the book opening in Kindle Preview at the location "_RWtoc-0" plus one menu item for that location in the "GO TO" menu, then there should be one reference element in the .opf file "Guide" section with this form: <reference type="text" title="" href="filename.html#_RWTOC-0"></reference>. This reference element results in the GO TO menu item "Beginning" being the same as the book-open location. If a "title" is specified -for example, Start Here- then the GO TO menu will include a "Start Here" item which specifies the same location as the "Beginning" item;
(3) if additional GO TO items are wanted, then what's required is .opf file Guide elements with the form: <reference type="anything" title="anything" href="bookname.html#anything"></reference>. The presence of a Guide element of type "<reference type="toc" title="Table of Contents" href="toc.html"></reference>" is entirely independent of the above considerations. Of course, it adds a TOC element to the GO TO menu. If the Kindlegen or Kindle Publishers guides say anything other than this, they're mistaken.
Exactly, the type = "text" attribute in the reference element is what controls the starting point. The anchor tag can be named "start" or something else. The GO TO menu always labels the "start of text" location as "Beginning" instead of any title you assign.
Most authors use MobiPocketCreator, if they use a formatting program at all. The instructions say to use #start, perhaps because MPC uses the type "start" and the default title "Startup Page".
There is a list of Reference types in the OPF Spec, Section 2.6: Guide ( http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#TOC2.6 ). If you want to use a type other than the ones listed in the Spec, it has to be prefaced by "other." as in "other.intro". Kindle displays only Cover, Beginning, and Table of Contents, no matter what you put in the Guide.
Well, no, most authors seem to use Word, with html as a second choice, if only to avoid problems such as the poster has encountered. He or she has spent the better part of a week trying to solve a riddle that doesn't exist for those who don't use MPC/Kindlegen.
Amazon inherited MPC when it bought Mobipocket four years ago. It was needful to build books for the Mobipocket platform, now being phased out. Really, it's an absurd distraction from the fairly straightforward process of building books that convert well on the DTP.
JMHO, of course!
(OPF files exist in epub creation, of course, but rare is the individual who handcrafts epubs. We use Sigil or another such program.)
True, many people use Word and take their chances. But you misquoted me. I said, "Most authors use MobiPocketCreator, [i]if they use a formatting program at all[/i]."
Word is not an eBook formatting program, nor is HTML. My opinion is that anyone writing a book destined to be "born digital" would be better off using a simple HTML editor than Word. A text editor would be better than Word for books without illustrations.
MPC has it's weaknesses, and it doesn't process images to the new guidelines. Yes, it's being phased out, as it should be. Nevertheless, it is still very useful for creating a basic OPF file and making sure that all links are valid before uploading to DTP. It can import a Word file and make a usable, if longer than necessary, HTML file. Saving a Word doc as filtered HTML gives about the same results: Craptacular HTML that may or may not convert well on the DTP. (Your clever trick of pasting into gmail will, indeed, remove most of the cruft and is to be taken seriously. Folks who have Dreamweaver can do the same thing by tweaking their Paste from Word settings.)
Kindlegen seems to be fine with the OPF file made by MPC, and it does a better job with images, so what's not to like?
Using Kindlegen is a very straightforward process requiring only the name of a valid OPF file to run. If you choose to publish a book without the "required" OPF, TOC, or NCX files, that's your prerogative, and a valid choice for some authors, but it's not the best solution for everyone.
My preference is to clean up a "Word to Filtered HTML" conversion manually, with regular expressions, then fix any problems, and plug in a simple CSS style sheet, add page breaks, and position the named anchors properly. The HTML file is clean, easy to work with, and half or one-fourth the original size.