[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] <img> vs <object> in HTML export
From: |
Nick Dokos |
Subject: |
Re: [O] [RFC] <img> vs <object> in HTML export |
Date: |
Fri, 10 Jan 2014 14:12:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Rick Frankel <address@hidden> writes:
>> BTW, I tried using
>
>> <object data="foo.png" type="image/png"/>
>
> This does not work because the close tag is required according to the
> spec (like a script tag).
>
Yes, I figured that that was probably the case, even though FF seemed to
accept it (although I'm no longer sure what I have and have not
tried...) The primary reason I considered it was because
org-html-close-tag currently produces that form and I was trying to be
as non-intrusive (a.k.a. lazy) as possible.
> From a quick read on the interwebs, yes, it seems that <object> is an
> html4 specification. One problem with your solution, is that <object>
> does not allow an 'alt' attribute
>
I don't know if it's part of the standard or yet another hack but I
found this:
http://www.w3schools.com/tags/tag_object.asp
in particular the Note in "Tips and Notes", which seems to imply that I can do
<object data="foo.png" type="image/png"><img src="foo.png"
alt="foo.png"/></object>
to accommodate browsers which don't recognize the <object> tag, as well
as accommodating the absence of a foo.png file (or the disallowing of
images). In my limited testing, that seems to work if the file is abesnt.
> The problem w/ <img src='foo.svg"/> according to my reading, is that
> it is not officially supported, and is only incidentally supported by
> the browsers (but, as you can see, without svg interactivity).
>
> I thing the solution is to use an <object> tag for svg, but an <img>
> tag for the rest. It might also make sense to just inline the svg?
>
If the above form works with all browsers, I'd prefer to go with that.
If it's actually part of a standard, I think it would be the perfect
solution, but I'm not holding my breath about that.
I have a patch (much better than the original one) that implements this.
I'll post it this weekend for comments.
> see:
> http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#SVG_in_HTML
> for an interesting writeup on the issues.
>
I found that one in my search but I was somewhat discouraged by the
number of pages (167) and its age (2010) and I did not really try to
read it carefully. But I've taken another look at the section you point
out and it is indeed a good reference - thanks for pushing me towards
it!
And thanks for the comments!
Nick