![]() |
#1 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
|
![]()
I usually create simple epubs, just fiction, simple formatting. Recently I've helped create a small non-fiction book that has an index. I used very simple html coding:
<a name="John Wylde">John Wylde</a> <a href="#John Wylde">Wylde, John</a> but the text being linked to is showing blue and underlined as if it's a link. It's not a link, the link is in the index and works fine. This shows up wrong on the PC using Digital Editions but not in the Calibre viewer. It is a problem on the Kobo e-ink and on the Android smartphone. They are the only devices I have to test on. With such simple coding I can't work out why it displays wrong. Any ideas appreciated! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,031
Karma: 27109760
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use
<span id="John Wylde">John Wylde</a> instead of <a name="John Wylde">John Wylde</a> |
![]() |
![]() |
![]() |
#3 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
![]() Quote:
<a> would create a named link, even if it isn't active. The id= attribute can also be linked to, however. You can add this to any element; if you are linking to the beginning of a paragraph, change <p> to <p id="John-Wylde">. The id attribute cannot contain spaces. Last edited by eschwartz; 06-15-2014 at 11:37 AM. |
|
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
|
So far so good: all the <span id="name">name</span>s are in - cept of course the links in the index aren't going to work as <a href="#name">name</a>. I'm not used to using spans so I'm not sure what the other half should be. Help? Is it suppose to be <span href etc???
|
![]() |
![]() |
![]() |
#5 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The <element id=""> creates a link target, just like <a name=""> does.
You still use <a href=""> for all links. Last edited by eschwartz; 06-16-2014 at 11:33 AM. |
![]() |
![]() |
![]() |
#6 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
|
<a href="#John Wylde">Wylde, John</a>
<span id="John Wylde">John Wylde</span> This works in Calibre viewer but nothing else. Looking forward to the day when there are standards for epubs. Maybe one day. I think i'll stick to simple fiction from now on! |
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
In post #3 I did say id cannot have spaces... Spaces imply that there are two ids: "John" and "Wylde", not one long id.
Use a hyphen or underscore. That is the standard. ![]() |
![]() |
![]() |
![]() |
#8 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
Quote:
Eventually everything will work out, but it will take a while yet. My guess? Two years before we finally start seeing a more universal feature set and it's implementation. It's that last bit that is most important. |
|
![]() |
![]() |
![]() |
#9 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
|
Ah the spaces eschwartz! I'll try that shortly. I thought you meant no spaces in the code itself.
Sabardeyn, you are optimistic. Think of the browsers and how they have never quite got it together. Instead of browser wars we have reader wars! ![]() |
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
|
Thank you eschwartz, after lots of repairs it has worked. I haven't tested in all the devices so far but if it's looking good in ADE then I'm thinking it will be ok in the rest.
Still mildly annoying that ordinary html behaves one way in a browser and another way in an e-reader, but now that I've got a work around it's only mildly. |
![]() |
![]() |
![]() |
Tags |
calibre, epub, html, index, link |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mini Odd components on mini PCB and serial link | euphy | Kobo Developer's Corner | 20 | 10-17-2013 03:04 PM |
PRS-T1 Odd USB problem | TAG_Keri | Sony Reader | 12 | 07-16-2013 01:00 AM |
Odd Problem | Pope Viper | Library Management | 3 | 06-23-2011 12:16 PM |
Odd problem with Sigil 0.4 | bobcdy | Sigil | 7 | 06-23-2011 02:45 AM |
Odd conversion problem | speakingtohe | Calibre | 2 | 05-10-2010 10:18 AM |