View Single Post
Old 03-31-2014, 03:47 PM   #5
starrigger
Jeffrey A. Carver
starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.
 
starrigger's Avatar
 
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
Quote:
Originally Posted by kovidgoyal View Post
This is a bug in ADE where it incorrectly displays anchors as links. calibre used to explicitly workaround that bug, but it stopped doing that, as the workaround can break rendering in compliant epub renderers. You will have to apply the workaround manually.

Probably the following in extra css will do the trick

a { text-decoration: none; color: black; }

a[href] { text-decoration: underline; color: blue; }

or something along those lines, it's been a while since I touched ADE.
Actually, I think the problem is in the conversion. I just looked at the conversion output for one of my omnibus editions that has an inline TOC pointing to each of three books inside it, plus sections such Books by.

Here's what one of the TOC links looks like:

<p class="TOCHyperlink"><a class="pcalibre pcalibre1" href="../Text/ChaosChronicles_BVC_final_split_003.htm#neptune">N EPTUNE CROSSING</a></p>

And here's what the target of the link looks like:

<h2 class="calibre9" id="calibre_toc_3"><a class="pcalibre calibre10 pcalibre1" id="neptune">BOOK 1: NEPTUNE CROSSING</a></h2>

Both have the
class="pcalibre pcalibre1"

which when I look at the stylesheet shows this:

.pcalibre:visited {
color: purple;
text-decoration: underline
}
.pcalibre1:link {
color: blue;
text-decoration: underline

Which, to me, looks as if the problem isn't in ADE, but in the conversion. It's giving the same display attributes to both the link and the target. Am I crazy? If I'm reading that correctly, then the Calibre conversion is wrongly assigning a style to the target that it shouldn't have.


Here's the corresponding code from the source html:

The link in the TOC:
<p class=TOCHyperlink><a href="#neptune">NEPTUNE CROSSING</a></p>

The destination:
<h2><a name=neptune>BOOK 1: NEPTUNE CROSSING</a></h2>

And from the stylesheet:

p.TOCHyperlink, li.TOCHyperlink, div.TOCHyperlink
{mso-style-name:"TOC Hyperlink";
margin-top:12.0pt;
margin-right:0in;
margin-bottom:12.0pt;
margin-left:0in;
text-align:center;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:blue;
font-weight:bold;
text-decoration:underline;}

For the destination (a name=neptune) I don't see anything in the stylesheet.

It really seems as if Calibre is assigning the same display/decoration qualities to the destination text that it assigns to the link text, when that's not in the source.

I could be wrong. I'm at the edge of my knowledge base here.
starrigger is offline   Reply With Quote