From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] <img> vs <object> in HTML export
Date: Fri, 10 Jan 2014 14:12:06 -0500 [thread overview]
Message-ID: <87r48f3b3t.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: cf32d8f09aa9412b50e9369e0471da9d@mail.rickster.com
Rick Frankel <rick@rickster.com> 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
next prev parent reply other threads:[~2014-01-10 19:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 21:10 [RFC] <img> vs <object> in HTML export Nick Dokos
2014-01-10 16:09 ` Rick Frankel
2014-01-10 19:12 ` Nick Dokos [this message]
2014-01-11 9:21 ` Bastien
2014-01-16 22:45 ` Rick Frankel
2014-01-16 23:18 ` Nick Dokos
2014-01-17 0:44 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r48f3b3t.fsf@alphaville.bos.redhat.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).