Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2011, 05:09 PM   #1
Jamestoo
Enthusiast
Jamestoo began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Oct 2011
Device: Kindle
Links in ebooks

I am transferring a wildflower Web site to ebook format, which in the Web version has a number of links, for example, to flowers of the same family on other site pages.

I've ignored these up to this point since the format for the ebook is quite different, and I've been concentrating on getting the text and images right.

Understanding that I am new to this:

I wonder is there any way to give the reader a way to go to a particular chapter from within the text of another chapter?

Thanks
Jamestoo is offline   Reply With Quote
Old 10-30-2011, 07:30 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,889
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jamestoo View Post
I am transferring a wildflower Web site to ebook format, which in the Web version has a number of links, for example, to flowers of the same family on other site pages.

I've ignored these up to this point since the format for the ebook is quite different, and I've been concentrating on getting the text and images right.

Understanding that I am new to this:

I wonder is there any way to give the reader a way to go to a particular chapter from within the text of another chapter?

Thanks
Yes







Sigil will not code these for you, But normal links and anchors function in EPUB and some other formats.

Code:
 
<p><a href="../Text/thepage.xhtml#Illustration_22.xhtml"/>Illustration here</p>

and  place the anchor
in the proper place in "thepage.xhtml"
<a id="Illustration_22"></a>

Last edited by theducks; 10-30-2011 at 10:42 PM. Reason: fixed missing 'a'
theducks is offline   Reply With Quote
Advert
Old 10-30-2011, 10:26 PM   #3
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by theducks View Post
Yes







Sigil will not code these for you, But normal links and anchors function in EPUB and some other formats.

Code:
 
<p>< href="../Text/thepage.xhtml#Illustration_22.xhtml"/>Illustration here</p>

and  place the anchor
in the proper place in "thepage.xhtml"
<a id="Illustration_22"></a>
whoops...

The "a" is missing in the first line in the code. It should read
Code:
<p><a href="../Text/thepage.xhtml#Illustration_22.xhtml"/>Illustration here</p>
BTW, these generally convert well to MOBI format. Also, since ePub is XHTML based the target anchor needs to identify itself with the ID attribute and not the old NAME attribute.
dwig is offline   Reply With Quote
Old 10-31-2011, 04:09 AM   #4
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,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by dwig View Post
Also, since ePub is XHTML based the target anchor needs to identify itself with the ID attribute and not the old NAME attribute.
And you don't need to use an <a> for an anchor, you can add the "id" to whatever element, like a <p>, <h2> or <img>:

Code:
<p>This <a href="#target">link</a> wil take you to the next paragraph.</p>

<p id="target">This paragraph is the target of the previous link, and any other link that points to "#target".</p>
Jellby is offline   Reply With Quote
Old 10-31-2011, 02:12 PM   #5
BeccaPrice
Wizard
BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.BeccaPrice ought to be getting tired of karma fortunes by now.
 
BeccaPrice's Avatar
 
Posts: 2,146
Karma: 11174187
Join Date: Jan 2011
Device: Sony 350, K3-3G, K4SO, KPW
Quote:
Originally Posted by Jellby View Post
And you don't need to use an <a> for an anchor, you can add the "id" to whatever element, like a <p>, <h2> or <img>:

Code:
<p>This <a href="#target">link</a> wil take you to the next paragraph.</p>

<p id="target">This paragraph is the target of the previous link, and any other link that points to "#target".</p>

I'm not familiar with the id tag - is that what the hash mark in the href tag refers to? I notice there's not # in the anchor when <a= is used.
BeccaPrice is offline   Reply With Quote
Advert
Old 10-31-2011, 02:30 PM   #6
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by BeccaPrice View Post
I'm not familiar with the id tag - is that what the hash mark in the href tag refers to? I notice there's not # in the anchor when <a= is used.
Try this sourtce:

http://www.daaq.net/old/xhtml/index....tml+hyperlinks
crutledge is offline   Reply With Quote
Old 10-31-2011, 02:59 PM   #7
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,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Basically, with "id" you name locations inside a file, whith "href" you link to a file and/or location like this: href="file#location". If you omit the file (href="#location") the current file is assumed, if you omit the location (href="file") the top of the file is assumed.
Jellby is offline   Reply With Quote
Old 11-01-2011, 04:27 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by BeccaPrice View Post
I'm not familiar with the id tag - is that what the hash mark in the href tag refers to? I notice there's not # in the anchor when <a= is used.
The "#" indicates that the link is to a location within the current file.
HarryT is offline   Reply With Quote
Old 11-02-2011, 11:34 AM   #9
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 HarryT View Post
The "#" indicates that the link is to a location within the current file.
It is also used after a filename to indicate where in the file the link belongs. Only if it is the first character does it mean the current file.
DaleDe is offline   Reply With Quote
Old 11-02-2011, 12:44 PM   #10
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by DaleDe View Post
It is also used after a filename to indicate where in the file the link belongs. Only if it is the first character does it mean the current file.
Yes; the absence of a filename, as is usual, indicates the current file.
HarryT is offline   Reply With Quote
Old 11-05-2011, 11:46 AM   #11
dlw
Enthusiast
dlw began at the beginning.
 
dlw's Avatar
 
Posts: 26
Karma: 15
Join Date: Jun 2009
Device: Palm TX, Pocket eDGe, Nexus (2012), iPad Air (3), Kobo Clara HD
This is all well and good, but Sigil recodes my work (I'm using v0.3.4 till I find the time to follow instructions for updating on linux).

I have this anchor in one file (ch01.html)

Code:
<p id="CH01-94" class="footnote">
and this reference in another (ch09.html)

Code:
See <a href="./ch01.html#CH01-91">note 1, on page 50</a>.
Sigil processing changes the reference to:

Code:
See <a href="#CH01-91">note 1, on page 50</a>.
which is broken: ereaders try to find "CH01-91" in the current chunk (ch09.html) and can't.

I tried changing the source to:

Code:
See <a href="../Text/ch01.html#CH01-91">note 1, on page 50</a>.
thinking Sigil might need a reference from root -- but the same truncation occurred.

Any guidance? Am I overlooking something obvious, or do I really have to turn off HTML Tidy and manually restore these links in Sigil's editor?

Thanks for thinking about this.
dlw is offline   Reply With Quote
Old 11-05-2011, 12:13 PM   #12
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
You don't need the "./". Just use "ch01.html#CH01-91".
HarryT is offline   Reply With Quote
Old 11-05-2011, 01:46 PM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,889
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I have noticed that Sigil has trouble when it can't find a file.

This can happen when you delete the file or what appears to be happening in your case, when it standardized the epub structure.

Quote:
See <a href="./ch01.html#CH01-91">note 1, on page 50</a>.
I have a feeling the dot slash (valid) threw it off. on import.
HarryT probably has the easiest answer/work-around
theducks is offline   Reply With Quote
Old 11-06-2011, 06:28 PM   #14
dlw
Enthusiast
dlw began at the beginning.
 
dlw's Avatar
 
Posts: 26
Karma: 15
Join Date: Jun 2009
Device: Palm TX, Pocket eDGe, Nexus (2012), iPad Air (3), Kobo Clara HD
Thanks for thinking about this, HarryT and theducks, but . . . it doesn't work for me.

Have you had success linking from one file to another? If you haven't actually tried it, I've attached SigilLinktest.epub that demonstrates Sigil's link reduction. If you load this into Sigil you'll see that it reduces each cross-file link style to #CH02-01. This makes ebook readers try to find the link in file01.html -- the currently-open file -- which, of course, they can't.

Thanks again for your thoughts.
Attached Files
File Type: epub SigilLinktest.epub (2.3 KB, 143 views)

Last edited by dlw; 11-06-2011 at 06:36 PM. Reason: change attached file type from html to epub
dlw is offline   Reply With Quote
Old 11-06-2011, 06:53 PM   #15
opitzs
Avid Reader
opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.
 
opitzs's Avatar
 
Posts: 161
Karma: 36472
Join Date: Sep 2008
Location: Look for rain, hail and snow...
Device: PRS-505, PRS-600, PRS T1, Kobo Glo
The example already has reduced links, so opening it in my copy of sigil won't show me anything.
You should upload an example where the links are destroyed by opening it in Sigil.

Last edited by opitzs; 11-06-2011 at 06:59 PM.
opitzs is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML of all the Baen Webscription eBooks with links to all the formats mjdb Workshop 4 12-10-2014 01:27 PM
Links Bather General Discussions 2 02-04-2011 03:26 PM
Links to URLs work, internal links don't? NewDay ePub 36 10-27-2010 04:09 AM
ePub eBooks (Fully Edited w/ TOC) Fanfiction, Forumfiction [Links removed by OP] Guns4Hire Reading Recommendations 12 02-25-2010 03:53 AM


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


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