Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 06-15-2014, 07:28 AM   #1
Julanna
Member
Julanna began at the beginning.
 
Julanna's Avatar
 
Posts: 19
Karma: 10
Join Date: Jun 2014
Device: Kobo e-ink, Samsung Galaxy Note II with 4 readers, desktop PC, lappy
Question Odd link problem

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!
Julanna is offline   Reply With Quote
Old 06-15-2014, 08:00 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
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>
kovidgoyal is offline   Reply With Quote
Advert
Old 06-15-2014, 11:30 AM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Exclamation 2 problems

Quote:
Originally Posted by kovidgoyal View Post
Use

<span id="John Wylde">John Wylde</a>

instead of

<a name="John Wylde">John Wylde</a>
closes with </span> not </a> (typo)

<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.
eschwartz is offline   Reply With Quote
Old 06-16-2014, 06:31 AM   #4
Julanna
Member
Julanna began at the beginning.
 
Julanna's Avatar
 
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???
Julanna is offline   Reply With Quote
Old 06-16-2014, 11:25 AM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Advert
Old 06-16-2014, 04:17 PM   #6
Julanna
Member
Julanna began at the beginning.
 
Julanna's Avatar
 
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!
Julanna is offline   Reply With Quote
Old 06-16-2014, 05:33 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 06-16-2014, 06:20 PM   #8
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
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:
Originally Posted by Julanna View Post
Looking forward to the day when there are standards for epubs. Maybe one day.
The problem is more about multiple ebook file formats and various implementations than anything else. Every manufacturer wants something slightly different and few of them are adhering 100% to the standards that do exist.

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.
Sabardeyn is offline   Reply With Quote
Old 06-16-2014, 07:57 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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:
Originally Posted by Sabardeyn View Post
The problem is more about multiple ebook file formats and various implementations than anything else. Every manufacturer wants something slightly different and few of them are adhering 100% to the standards that do exist.

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.
Or we could just go with the current standards that say you can't use spaces in an id, regardless of whether it works sometimes.
eschwartz is offline   Reply With Quote
Old 06-17-2014, 05:18 AM   #10
Julanna
Member
Julanna began at the beginning.
 
Julanna's Avatar
 
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!
Julanna is offline   Reply With Quote
Old 06-19-2014, 03:19 AM   #11
Julanna
Member
Julanna began at the beginning.
 
Julanna's Avatar
 
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.
Julanna is offline   Reply With Quote
Reply

Tags
calibre, epub, html, index, link


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:23 AM.


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