View Single Post
Old 09-30-2013, 06:29 PM   #2
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by yucca View Post
The command Ctrl+Shift+X creates an element of the form<a class="sigil_index_marker" title="...">...</a, and creating an index then causes an id attribute to be added to the element. While this is formally valid, it causes problems in Adobe Digital Editions, which handles any <a> element (even without a href attribute) as a link, displaying it in a link-like manner.

I though I had fixed this in CSS:

.sigil_index_marker {
text-decoration: none;
color: inherit;
cursor: text;
}

Now I was told that this does help in iBooks, which still shows the markers using a link color. Maybe this can be fixed by using black instead of inherit, but this is an ugly fix, and I cannot test this directly.

I wonder if Sigil could be changed to use <span> instead of <a> for the index markers. This would avoid the problem and would be better in accordance with modern HTML style. I guess the difficult part would be to create compatibility, but I would expect that simply changing any <a> in class sigil_index_marker to <span>, when opening an existing .epub, would handle this.
You certainly don't want to use black--not because it's an ugly fix, so much, but because that means that anyone who tries to read the book in Night Mode will be screwed. They won't be able to read the text.

Myself, I think this is a very small price to pay for the usability of the links. The reader needs to know what they are linking to, in addition to the functionality of jumping back and forth. How are you marking the indexed text, anyway? I mean, assume that you replaced the a's with spans--arguably, those would be invisible to the user, right? When the user jumps from the index to the indexed item, how on the page or pages would you propose that he knows where his eye is to go? If you are using an index that is somewhat like a TOC, and you are linking to named headers, I suppose that is less of a concern for you, but say you are linking to a conceptual paragraph--how would the reader know which paragraph on the page is related to that index item, just out of curiosity?

I'm curious from a functionality standpoint. I assume you mean that each span would have its own ID...you could, you know, just do it quasi-manually. You could do all the indices, and then regex the targets to spans, I suppose? That might work, and you could style the spans as you wished, assuming you have a particular styling in mind.

OR...it could just be that your base a styling is already set, or you haven't set it. Can you change your base anchor link styling, or do you need the blue links or (default display) link behavior elsewhere?

Hitch

Last edited by Hitch; 09-30-2013 at 06:48 PM. Reason: Edited dumb mistake
Hitch is offline   Reply With Quote