Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-10-2011, 05:39 PM   #16
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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:
Originally Posted by crich70 View Post
I found two pieces of code to do with links. I'm not sure which is the right one for that.
<a href="#tips">Visit the Useful Tips Section</a>
or
<a name="tips">Useful Tips Section</a>
Or do I have to put one in one place and the other in the actual book files?
I just think it would make for a neater looking ebook file when building an omnibus book.
The first one links to the second one. name= is no longer the preferred syntax. It should be id=

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
DaleDe is offline   Reply With Quote
Old 04-11-2011, 04:15 AM   #17
crich70
Grand Sorcerer
crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.
 
crich70's Avatar
 
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:
Originally Posted by DaleDe View Post
The first one links to the second one. name= is no longer the preferred syntax. It should be id=

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
crich70 is offline   Reply With Quote
Advert
Old 04-11-2011, 04:25 AM   #18
crich70
Grand Sorcerer
crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.
 
crich70's Avatar
 
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.
crich70 is offline   Reply With Quote
Old 04-11-2011, 06:30 AM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by crich70 View Post
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>
Almost.

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.
Jellby is offline   Reply With Quote
Old 04-11-2011, 09:02 AM   #20
crich70
Grand Sorcerer
crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.crich70 ought to be getting tired of karma fortunes by now.
 
crich70's Avatar
 
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.
crich70 is offline   Reply With Quote
Advert
Old 04-11-2011, 10:44 AM   #21
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
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>
(this says: go to file book1.xhtml and there find the element with id="book_title")

and in book1.xhtml:
Code:
<h1 id="book_title">Book Title</h1>
It should not matter (for the link to work) whether the element is an <a> or an <h1>, unless something is really buggy in between.

Validating with FlightCrew (in Sigil) should tell you if there's anything wrong.

Last edited by Jellby; 04-11-2011 at 10:47 AM.
Jellby is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:42 PM.


MobileRead.com is a privately owned, operated and funded community.