04-10-2011, 05:39 PM | #16 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
To make a book with in-line links your would place several of the first type in a list on a page. It could be a separate file or just add it to an existing file in your ebook. The syntax of the first link says the second link is in the same file. If it is really in another file then you might say href="anotherfile.xhtml#tips" Dale |
|
04-11-2011, 04:15 AM | #17 | |
Grand Sorcerer
Posts: 11,305
Karma: 43993832
Join Date: Feb 2010
Location: Monroe Wisconsin
Device: K3, Kindle Paperwhite, Calibre, and Mobipocket for Pc (netbook)
|
Thanks. With so much info on the web it's hard to know what is current and what isn't sometimes. I have no idea how old the page I found the bits of code was. I imagine they might have been current at the time, but things can change so fast on the web that I imagine it's hard to be sure of even that.
Quote:
|
|
Advert | |
|
04-11-2011, 04:25 AM | #18 |
Grand Sorcerer
Posts: 11,305
Karma: 43993832
Join Date: Feb 2010
Location: Monroe Wisconsin
Device: K3, Kindle Paperwhite, Calibre, and Mobipocket for Pc (netbook)
|
So if I understand correctly on the html page I have my cover image on I would have a set of codes that read:
<a href="#book title">book title</a> and on each of the html pages (in the ebook) I would have: <a id = "title">title</a> Is that right? Last edited by crich70; 04-11-2011 at 04:44 AM. |
04-11-2011, 06:30 AM | #19 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
I believe you can't have spaces in fragment names, so instead of "#book title" use "#book_title". And you have to use the same name (minus the #) in the id, so use id="book_title". And you can use the id in any element, not just <a>, so you can have: <h1 id="book_title">Book Title</h1> In the future, I'm sure Sigil will have some kind of hyperlink editor that will make all this easier. |
|
04-11-2011, 09:02 AM | #20 |
Grand Sorcerer
Posts: 11,305
Karma: 43993832
Join Date: Feb 2010
Location: Monroe Wisconsin
Device: K3, Kindle Paperwhite, Calibre, and Mobipocket for Pc (netbook)
|
Well I have the 2 links on a seperate page now, but when I put it through Calibre the individual chapter links are gone. (I'm using a copy of the Wonderland Books file I created as a model). I'm using the <h1 id="book_title">Book Title</h1> code for the connections. I'm not sure if the h1 rather than an a at the start and end somehow messed things up or if I have to do sometihng like retype all the seperate chapters headings using h2.
|
Advert | |
|
04-11-2011, 10:44 AM | #21 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The href="#book_title" works if the target is in the same file inside the .epub. Otherwise, you need to give the path to the other file, like this:
In toc.xhtml (for instance): Code:
<a href="book1.xhtml#book_title">Go to Book Title</a> and in book1.xhtml: Code:
<h1 id="book_title">Book Title</h1> Validating with FlightCrew (in Sigil) should tell you if there's anything wrong. Last edited by Jellby; 04-11-2011 at 10:47 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Are 'nested' epub files possible? | johnc.eire | ePub | 3 | 02-05-2011 04:37 PM |
NCX creation -- nested or not, css classes | illustrata | ePub | 3 | 08-25-2010 08:56 AM |
Content nested collections | alexxx | Amazon Kindle | 6 | 06-22-2010 06:05 PM |
Nested navPoint problem | Lemming | Calibre | 3 | 12-20-2009 11:24 AM |
Are Nested TOCs Possible? | VikingDave | Sony Reader | 11 | 12-28-2007 07:58 PM |