10-06-2012, 10:20 AM | #16 |
Junior Member
Posts: 5
Karma: 10
Join Date: Aug 2011
Location: London, England
Device: Kindle Touch
|
I cannot make this work on a Kindle Touch, using either the <mbp:nu> approach or the prepended linked special space character trick (Kindlegen V2.5 under Windows). I don't have any other Kindle devices to test it on.
I know it can be done, as I can see it in the Ben Goldacre Kindle book "Bad Pharma" (free sample available). Really frustrating, as I think the ToC does look much better without underlines. |
10-07-2012, 06:05 AM | #17 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
Advert | |
|
10-07-2012, 09:55 AM | #18 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Keep in mind that the Kindle Touch supports the KF8 format. Kindlegen 2.5 (that you indicated you were using) produces a file that contains BOTH a mobi version and a KF8 version. If you're then using a Kindle Touch to view the output, you're looking at the KF8 version ... which almost certainly doesn't use/recognize the <mbp:nu> tag. At the time this thread originated, there was no KF8, so things are different now. You also need to know which version you're previewing.
<mbp:nu> still works for the MOBI side of things just fine. I just checked. The problem is, it definitely doesn't do anything on the KF8 side of things -- which is what you're probably seeing on your Touch. The KF8 side is easy, if that's all your concerned with. In your source ePub/xhtml, just make sure the link is properly styled (inline or CSS) with the "text-decoration: none" attribute. This works on devices that support KF8 like the Kindle Fire. I've even had success mixing the two methods to ensure it works in both the MOBI and KF8 versions produced. EDIT: However, extensive testing with the Kindle Touch emulation mode of Kindle Previewer reveals that none of the above methods removes the underline. I can get rid of the underline in every single device mode except the Kindle Touch. Could be a bug of the Previewer or the Device itself. I don't have a real device to test it on. |
10-07-2012, 10:00 AM | #19 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
10-07-2012, 11:41 AM | #20 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Apparently, nothing is very clear. The attached sample mobi (generated using KindlePreviewer 2.5.1) works as expected on every emulated device that the Kindle Previewer includes with the exception of the Kindle Touch (everything is underlined).
It also works as expected on a Kindle 2 device. It does NOT work as expected on a Kindle Keyboard with the latest firmware supporting KF8 (everything is underlined). The only good thing I found from this experimenting is that these newer versions of kindlegen seem to honor the CSS "text-decoration" attribute when building the plain old MOBI side of things. So it seems <mbp:nu> isn't really needed (although it still seems to be honored). It's just that the different devices/firmware that support KF8 tend to render the same code differently (as well as differently than the official Previewer). |
Advert | |
|
10-07-2012, 11:56 AM | #21 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Works fine on the Touch. First link is underlined; second link isn't.
|
10-07-2012, 12:13 PM | #22 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
10-07-2012, 01:37 PM | #23 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
You're most welcome. Always interesting to do these experiments .
|
10-09-2012, 05:48 AM | #24 |
Junior Member
Posts: 5
Karma: 10
Join Date: Aug 2011
Location: London, England
Device: Kindle Touch
|
"text-decoration: none" does work on the Kindle Touch
HarryT: thanks for suggesting decompilation, I had not realized this was possible, or that such useful tools existed.
DiapDealer: your underline sample mobi works on my Touch, but when I changed the "filepos=XXXXXXXXXX" to "href=......" the underlining came back. I don't understand how your method is meant to work, is it the enclosing <p height="1em" width="0em"> tag? After decompiling the "Bad Pharma" sample, I could see that it appears to have been generated using some sort of industrial publishing tool (probably from Adobe) but that they simply suppress underlines with: Code:
a { text-decoration:none; } I like DiapDealer's idea of global suppression of underlines, and simply underlining explicitly, as it gives flexibility when you want underlines for things like endnotes. Edit: I thought that text-decoration was working as expected, and at one point in my experimentation did see my contents page without underlines (but with example code and other experiments above it in the file). On cleaning up the underlining has come back, so am now working with a short test file, similar to DiapDealer's, to try to understand what is going on (so far without success). At the moment what I am seeing is that putting 'href="..."' in the <a> tag makes the underlining come back, even if text-decoration is set to "none" either in CSS or inline. Obviously not very useful. The "Bad Pharma" example does use hrefs, but with a referencing method I have not seen before, e.g.: Code:
<a href="kindle:pos:fid:000A:off:0000000001" aid="1T14P">3 Bad Regulators</a> Last edited by rfolwell; 10-09-2012 at 07:38 AM. Reason: Clarification |
10-09-2012, 08:15 AM | #25 |
Grand Sorcerer
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can I ask what you're decompiling with that leaves the internal Amazon "aid" attributes and the internal kindle hrefs intact? You won't be able to "rebuild" that code and get anything reliable.
Unzip the source that's included in my sample and you'll see that my links ALL have hrefs with normal values in them. So links with hrefs are NOT all underlined by default after conversion. Don't confuse the source code with the internal markup language the Kindle uses. I recommend using the very latest version of Mobi_Unpack (v0.54) to get a good idea of what's going on inside the MOBI/KF8. Also note that I didn't really offer an "idea for global suppression." I fully intended my methods to be used piecemeal. Also keep in mind that what I suggested doesn't work at all on a Kindle Keyboard with the latest firmware update. Last edited by DiapDealer; 10-09-2012 at 08:20 AM. |
10-09-2012, 08:57 AM | #26 |
Junior Member
Posts: 5
Karma: 10
Join Date: Aug 2011
Location: London, England
Device: Kindle Touch
|
I used MobiUnpack, but I see I had found an old version from 2010. To avoid further possible confusion caused by me, would you mind posting your original source code, rather than me extracting it from the mobi? What I got from that was:
Code:
<html> <head> <guide></guide></head> <body> <h3 align="center">Testing Links</h3> <p height="1em" width="0em"> <a filepos=XXXXXXXXXX ><u>This link should be underlined.</u></a> </p> <p height="1em" width="0em"> <a filepos=XXXXXXXXXX >This link should NOT be underlined.</a> </p> </body> </html> |
10-09-2012, 04:24 PM | #27 |
Junior Member
Posts: 5
Karma: 10
Join Date: Aug 2011
Location: London, England
Device: Kindle Touch
|
Problem (mostly) sorted, was misunderstanding and misuse of style attribute
With Mobi_Unpack v0.54 I do get clean output of your original HTML, which is as you describe. With 'style="text-decoration: none"' as an attribute to the <a> tag the underlining is suppressed on the Kindle Touch. My problem here was simply incorrect use of the style attribute within the tag.
It still does not work for me when done as a CSS style, putting "text-decoration: none;" into a style that otherwise does work for links, but that might just again be a usage problem - I can investigate further now I know what does work. It would be nice to have a solution that works on all Kindles, but at the moment that does not seem to be possible. Thanks a lot for your (and other people's) help here - this issue has been driving me nuts! |
07-22-2013, 10:14 AM | #28 |
nvt
Posts: 2
Karma: 10
Join Date: Jul 2013
Location: Iceland
Device: kindle paperwhite; kindle touch
|
A little help on the matter!!!!
Well, solved in all kindle formats as follows in all your files:
Html css class with links works fine in all existing navigators, but when compiled in Kindle, you have to manually indicate the link you want to apply the none text-decoration attribute, and force it with important. This seems to work fine in kindle 1.0 and kindle 2.0 but not for kf8 format latest kindle readers : fire, fire hd, paperwhite and so on, that's why you need a combination with <mbp:nu></mbp:nu> mobi tag. This will result in xhtml validation errors but your kindle now won't be visible the link tag. Hope it works for you as it did for me! Regards to all and keep the good work!!!!!!!!! |
08-01-2013, 07:04 AM | #29 | |
Bookmaker & Cat Slave
Posts: 11,495
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I don't mean to sound snarky, but I had this situation with a client recently, with some 700+ footnotes in his book. He loathed the dreaded "blue" links in his book, which had a color scheme. I said, sure, fine, we can change it to black, as long as you understand that in Night Mode, no one will be able to see them. That was the end of that discussion. We had another client who also wanted some several hundred glossary items linked, from the first occurrence of each word, to the glossary. He then had a cow over the underscores. I asked him: how will your readers know to click the word? What possible clue is provided that the word is a link? That discussion was also over with rather quickly. FWIW, I have found, over the course of some 2K books, that readers do NOT know that the TOC items are linked when they are NOT underlined. I've seen complaints from readers in reviews about "not linked TOC's," when the old prc (mobipocket) tags were used, and the TOC entries WERE linked...but the readers couldn't tell that they were. People are accustomed to seeing underscores under links. Lastly, if By 2, in your post, I understand that the idea is that each anchor link has to have inline CSS...thanks, but I think I'll stick with either underscores, or find a different way. That feels as though it's fallback coding for K7, not for K8, and the problem is, if you put it inline, then you're overriding the CSS for the K8 files. Not to mention, I'm a firm believer in not using inline CSS unless there's simply no other alternative. {shrug} Hitch |
|
08-01-2013, 08:15 AM | #30 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Links Every Kindle Owner Should Have | poohbear_nc | Amazon Kindle | 175 | 08-02-2020 09:45 AM |
Kindle Source Code (Links) | TadW | Kindle Developer's Corner | 79 | 10-31-2017 10:47 AM |
Kindle - html to Kindle format - do links to anchors work? | Rasczak | Kindle Formats | 20 | 12-08-2008 04:20 PM |
Leaked Kindle and accessories prices, links, images | Alexander Turcic | Amazon Kindle | 155 | 11-21-2007 09:11 PM |