![]() |
problems making an image a hyperlink in epub
Discovering that images inserted with Sigil weren't scaling properly in iBooks, you fine folks here helped me correct the issue so that now I'm using the sample code:
<div style="text-align: center; padding: 0pt; margin: 0pt;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width:100%; max-width:100%; height:auto; max-height:100%;" version="1.1" viewBox="0 0 600 525" preserveAspectRatio="xMidYMid meet"> <image width="600" height="525" xlink:href="../Images/C01Ilus01.png"/> </svg> </div> Moving on, I want to add an index of illustrations. I've done so in my NeoOffice master file, but am having problems in my epub file. I can link to an image from the index I created and from the image back to the index in the NeoOffice (.odt) master. It's simply a matter of wrapping an <img ...> tag in an <a ...> tag. However, in my epub I can't seem to make an image a hyperlink to get back to the index. So far I've tried wrapping various tags within the above sample code with: <a href="../Text/cEM03.xhtml#c0101ie” id=“c0101”> . . . </a> all to no avail. Is there a way to make an image displayed with the sample code a clickable hyperlink? Thank you :-) |
Seems I got something to work. Studying the confusing W3C SVG Links page at:
https://www.w3.org/wiki/SVG_Links I came up with the expanded sample code for inserted images (the red is what I added): <div style="text-align: center; padding: 0pt; margin: 0pt;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width:100%; max-width:100%; height:auto; max-height:100%;" version="1.1" viewBox="0 0 600 525" preserveAspectRatio="xMidYMid meet"> <a xlink:href="../Text/cEM03.xhtml#c0101ie" xlink:title="Click image to return to illustrations index" id="c0101"> <image width="600" height="525" xlink:href="../Images/C01Ilus01.png"/> </a> </svg> </div> It works fine in iBooks and Calibre ebook-viewer on my Mac (Apple is updating my iPad this evening so I'll have to wait to test there), including the tool tip (see xlink:title=". . ." above), though in ADE the tool tip doesn't show but the linking works. If you have any thoughts about how this may cause issues that I haven't discovered, please speak up :-) Thank you PS: I understand why some don't like using an image for a clickable link, and that's why I included a tool tip. Even if a reader inadvertently clicks an image before the tool tip comes up, they're positioned in the illustration index to immediately jump back to where they were. |
Quote:
|
And how would the reader KNOW the image is a hotlink? Would it actually say "Click Me"?
|
Quote:
BR |
Quote:
As with having to go the SVG route because illustrations weren't resized correctly in some major readers/apps, the underlying problem is that there is no industry wide consensus [i.e. understanding/respect/whatever] for even the standards that are in place. That, of course, is aggravated by older readers/apps, but applies to the current range of available readers/apps. If one gets beyond simple text, sooner or later they're going to find that some of the intended functionality fails in some number of readers/apps. Such may be ok with some tech people, and some businesses, but it's a real pita for authors. :thanks: |
Quote:
|
Quote:
|
Quote:
Quote:
Quote:
I suspect that Amazon's sold more eInks than they'll ever admit. I mean, c'mon, you think that they keep coming out with eInks out of sentimentality? No, brother. They come out with them because they sell like crazy. Hitch |
Quote:
|
Quote:
Let me rephrase my answer--I don't think that anyone or any company knows the answer to that. Too diverse, too disparate, too many peoples and devices of various types. I tend to run a running poll of my customers. Now, frankly, MOST of my customers aren't eReaders--a fact that always makes me sad (not because I give a hoot, but because it makes MY job so much harder...), but of those that are, it's heavily majority eInks. Could it be that they're a segment of the population that bought eReaders early on, and don't upgrade? I guess, sure. I tend to harken back to the "golden number" (yup, in typography too) for line-lengths, and there're reasons for it. On smartphones, it's very hard to reach that number. That's kinda the fundamental reason for my thinking. (Not that that impacts real tablets, of course. I have a Kindle Fire 10", which is actually a pretty decent tablet, although I HATE where they put the damn buttons for all the functions.) The golden number exists due to physiological reactions, to eye-flicks, at the end of the line, before the eye lands on the next line. I suspect that reading on the much-shorter line-length smartphones triggers the physiological reaction to those muc-shorter lines. {shrug}. That's my thinking. Hitch |
Quote:
|
I guess I'm not sure why the "golden number" would apply to reading devices. I get how it applies to pictures...as in, I understand the concept... but I've seen great pics that don't conform to that rule. I think it is more a training aid to get the photographer to think about composition...
I don't see how getting up to 60-66 characters on a line really makes a difference?? I use my phone to read, exclusively. I typically have it in landscape, but that is so the tables that are often in the books display nicely. It feels like the same width as an old style paperback book - maybe even a little wider. Although, my eyes have reached that 42+ years old range ;) and I find myself making the font a little larger, I don't notice that there are fewer characters on the line. I just get to the end and my eyes move to the next line. I also use auto-scroll so I don't worry about page flipping/swiping. I don't notice anything until I get to the end of a chapter... unless, of course there is some atrocious grammar/spelling that jars me out of the story. FWIW, I counted the number of characters in a line and it is about 45-50. |
Maybe its a locality thing, but I'm sure I see more gen-Z's reading p-books than I saw a few years ago. This is borne out by one of the librarians at my local bricks & mortar library who has said he's noticed the same thing with borrowing.
And they're building a new B&M library, and another regular bookshop opened recently. BR |
Quote:
I also think it's awesome to have B&M book stores. I like browsing for my next good book...I just hope the new stores closely integrate buying ebooks when you find a good one. My dream: Lots of aisles - with good book organization, a good hot chocolate stand in the corner, plush chairs to sit in...and a barcode or something that the store's app on my device can scan and automatically purchase/download to my reading software of choice.... :D |
| All times are GMT -4. The time now is 10:30 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.