09-14-2008, 10:10 AM | #1 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
"Start Reading" link in mobipocket
Hi all,
Has anyone found out how the "Start Reading" link in mobipocket files is generated? I know how to add items in the "guide", but if I add a "Start Reading" link there, it would be duplicated (i.e., there would be still another automatically generated "Start Reading"). I thought I could just add an anchor named "start_reading" wherever I want the "Start Reading" link to point to, as this seemed to work in some files, but now I've found it does not work in another file. Here I have a toc, then some text, then the first chapter, I wanted "Start Reading" to point to the beginning of the "some text", but it pointed to the beginning of the first chapter instead. I think that maybe the "Start Reading" is made to point to the first anchor that is also linked to in the text... or something like that. Any other ideas/experiences? (I think this "Start Reading" think is particular to the Cybook, at least I don't seem to find it in the desktop mobipocket reader). |
09-14-2008, 11:47 AM | #2 |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Isn't the guide pointer just a filepos?
How did you generate the guide? I though I played around with this in MobiPerl but now I cannot fint it in the code... |
09-14-2008, 11:55 AM | #3 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
The "Start Reading" link is a guide item with a type of "other.ms-firstpage", whose value is simply an HTML anchor in the text.
|
09-14-2008, 12:01 PM | #4 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<guide> <reference type="toc" title="Contents" href="#contents"></reference> <reference type="text" title="Part One" href="#part1"></reference> <reference type="text" title="Part Two" href="#part2"></reference> </guide> |
|
09-14-2008, 12:09 PM | #5 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Try adding:
Code:
<reference type="other.ms-firstpage" title="Start Reading" href="#whatever"></reference> |
09-14-2008, 12:13 PM | #6 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
So, if the TOC is: Chapter 1 Chapter 2 ... then "Start Reading" points to Chapter 1. If the TOC is: (Preface) Chapter 1 Chapter 2 ... then "Start Reading" points to the (Preface). Note that the rest of the book is identical in both cases, what I called "(Preface)" is actually some text with no title, previous to Chapter 1, and there is an anchor at the beginning anyway. Last edited by Jellby; 09-14-2008 at 12:23 PM. |
|
09-14-2008, 12:15 PM | #7 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
How very strange. It works fine for me, but I maintain the OPF file with Mobi Creator, rather than writing it by hand. I wonder if Mobi Creator is doing something else to the OPF file?
|
09-14-2008, 12:22 PM | #8 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
When I said it didn't work, I was trying the <reference> with no "title"... Edit: However, if I make the "Start Reading" guide item point to Chapter 2, then both entries actually point to Chapter 2... So maybe the logic of "first linked anchor" is only valid if there is no "other.ms-firstpage" guide item... Last edited by Jellby; 09-14-2008 at 12:28 PM. |
|
09-14-2008, 12:53 PM | #9 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
To make testing easier, here is a simple file:
Code:
<html> <head> <guide> <reference type="toc" title="Contents" href="#contents"></reference> </guide> </head> <body> <a name="contents"/> <h1>CONTENTS</h1> <a href="#chapter1">Chapter 1</a><br/> <a href="#chapter2">Chapter 2</a><br/> <mbp:pagebreak/> <a name="preface"/> <p>This is some text before the first chapter.</p> <mbp:pagebreak/> <a name="chapter1"/> <h1>CHAPTER 1</h1> <p>This is the first chapter.</p> <mbp:pagebreak/> <a name="chapter2"/> <h1>CHAPTER 2</h1> <p>This is the second chapter.</p> </body> </html> If I want it to point to #preface, I have either to add a new guide entry with a title (which will not be affected by UI language), or add a link to it in the toc: Code:
<reference type="other.ms-firstpage" title="Start Reading" href="#preface"></reference> Code:
<h1>CONTENTS</h1> <a href="#preface"/> <a href="#chapter1">Chapter 1</a><br/> <a href="#chapter2">Chapter 2</a><br/> But if I want the "Start Reading" entry to point to "#chapter2", I think the only solution is adding a guide item... but I would probably add it with blank title: Code:
<reference type="other.ms-firstpage" title="" href="#preface"></reference> |
09-14-2008, 12:53 PM | #10 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
I get the duplicated "Start Reading" item too on the Gen3 - that seems to be a quirk of that device. On the Windows Desktop version of the Mobi Reader I only get the one "Start Reading" menu item. You can set the text to be anything you want - it's the "other.ms-firstpage" that actually creates the menu item. I think we're seeing the same behaviour.
|
09-14-2008, 01:09 PM | #11 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
I mean, the Cybook already shows a "Start Reading" entry with English interface, which becomes "Comenzar Lectura" in Spanish, "Débuter la Lecture" in French, etc. If I create a new one called "Start Reading", it will always be "Start Reading". I only want to change the target of the default "Start Reading"/"Comenzar Lectura" entry, not create a new one. I know I'm a nitpicker, though. |
|
09-14-2008, 01:45 PM | #12 |
Connoisseur
Posts: 75
Karma: 204999
Join Date: Aug 2006
Location: London
|
The Mobi Dev Centre has just these few lines:
start: if the "start" type of subitem is present, the action defined in the onclick is performed whenever the ebook is opened. Use this in dictionaries to make the dictionary open on the first page every time instead of the last page read. The last page read is not very useful in a dictionary. <guide> <reference type="start" title="Start here" href="starthere.html"/> </guide> Doesn't look like it is always present, nor that it can't be made to point anywhere desired. bob |
09-14-2008, 02:21 PM | #13 |
Grand Sorcerer
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
You can always unpack the mobi file to raw html (--rawhtml) and see what the filepos pointers are to confirm that html2mobi do the correct thing.
|
09-14-2008, 02:55 PM | #14 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
This is a different guide item than the one discussed here. In particular "start" over-rides the last page read, which isn't typically what you want.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creator taking control of the "first page" link in the "content" menu | cyberbaffled | Kindle Formats | 2 | 07-11-2010 04:21 PM |
Here is the link: "A Christmas Carol Gift Pack" | Robertb | Astak EZReader | 26 | 11-26-2009 02:24 PM |
Interesting link to "E-Book Universe" chart | Xia | News | 7 | 10-02-2009 04:33 PM |
Seriously thoughtful Random House: "Guter Start für eBooks" | netseeker | Lounge | 1 | 06-16-2009 04:01 PM |
Mobile Slate "Read full article" link | Arnaud | Workshop | 0 | 02-24-2009 04:47 AM |