View Single Post
Old 01-08-2012, 06:22 PM   #11
tooolbox13
Junior Member
tooolbox13 began at the beginning.
 
Posts: 6
Karma: 34
Join Date: Jan 2012
Device: Kindle
I apologize for my behavior there, I don't usually act that way. Of course the point of a forum is to share knowledge and I always appreciate the knowledge that is on a forum. I suppose I didn't really expect an answer from anyone, as this thread has been neglected for so long. I'll refrain from being quite so snarky and gleeful in the future.

Now, on the <mbp:nu> tag, I did not find that to work at all. I am using Calibre to convert an HTML file into a MOBI, specifically. I tried using the <mpb:nu> tag in several different ways, to no avail. I also used a python script to break apart my MOBI file and view the HTML, and there were <u> tags around the link. I removed the <u> tags, and used Kindlegen to rebuild into MOBI, but no luck, the underline was still there.

While you can use CSS to remove the underline from a link in an HTML file and it displays correctly in a browser such as Sarfari, when Calibre converts to MOBI it flattens the CSS into HTML tags, which leads me to believe that MOBI doesn't really support CSS, although I could be wrong I suppose.

I work with a publisher and we had 3 or 4 different eBook conversion companies tell us that the underlines could not be removed from hyperlinks in a MOBI file. Annoyed by this, I took to the Internet and personal testing. This is one of the only threads that Google turns up on the subject, and I did not find the <mbp:nu> tag to work.

If anyone has a specific example of how <mbp:nu> has been made to work with a MOBI file on a hyperlink, including what tools were used to accomplish this, please post it here. The exact source HTML file would be helpful.

And now, on to the method that I discovered. It's not as ideal as simply removing the underline from a hyperlink, as it has some drawbacks (one of which I still need to solve, and that people could help me with). But, it does actually work on Kindle 2, Kindle Touch and Kindle Fire (the three devices I've tested it on thus far).

The simple description is that a special space character is placed directly in front of the linked word, and this space character is a hyperlink. Because this character is adjacent to the word you want to link, the Kindle software recognizes it as part of the word and when the word is navigated to or tapped, it will take the user to the glossary. Here's a sample:

Quote:
Some <a href="http://www.google.com">&#x200B;</a>word here is linked!
x200B is the specific Unicode character that works on both Kindle 2 and Kindle Fire. Other, similar characters work on one or the other. I think x200B is a zero-width space or something. I first tried zero-width non-breaking space, which works on the Fire, but displays as a box on the Kindle 2.

There are two drawbacks to this method: one, and I have not tested this quite yet, but I believe if you read the MOBI on a computer and try to click on the word with a mouse, it will not link you. That's hypothesis, and I will test it today, but I believe that to be the case. It is only because the Kindle software "looks" at the word for hyperlinks when it is highlighted (5-way-button-style) or touched that enables the user to navigate with it. When I display that code in Safari I cannot click the link because it takes up no space.

The second drawback seems to be on the Kindle 2, and possibly the newer kindles with 5-way-buttons. For some reason when the cursor skips over the word immediately after the linked one. In the above example, the user of the Kindle would be prevented from looking up or highlighting the word "here". I'm fairly sure this is related to my workaround method, although I don't understand why the kindle software that detects different words would do that...there is a space between the words, after all. I plan on doing some testing to see how two spaces behaves, or an additional zero-width space, etc.

Anyway, I guess it would be helpful if someone could save me a lot of time and grief by posting up a working example of how to use <mbp:nu> on a hyperlink, in a MOBI, tested on the Kindle. This would render my discovery null and void, but the simple handling is actually far more ideal and preferable.

Thanks,
Matt

Edit: I did a bit more research. Is it perhaps the fact that <mbp:nu> only works with the Mobipocket Creator software? (I am using a Mac, and hence Calibre, since Creator is not available on the Mac.) I can't really find much of any documentation for this on the web... In any case, I'll try the Creator software somehow.

Last edited by tooolbox13; 01-08-2012 at 06:59 PM.
tooolbox13 is offline   Reply With Quote