emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC] <img> vs <object> in HTML export
Date: Fri, 10 Jan 2014 11:09:59 -0500	[thread overview]
Message-ID: <cf32d8f09aa9412b50e9369e0471da9d@mail.rickster.com> (raw)
In-Reply-To: <87vbxsamjm.fsf@alphaville.bos.redhat.com>

On 2014-01-09 16:10, Nick Dokos wrote:

> Exporting this to HTML produces <img> tags like this:
> 
> ,----
> | <div class="figure">
> | <p><img src="foo.svg" alt="foo.svg" />
> | </p>
> | </div>
> |
> |
> | <div class="figure">
> | <p><img src="foo.png" alt="foo.png" />
> | </p>
> | </div>
> `----
> 
> I attach a patch[fn:1] that changes these to <object> tags (the patch 
> is
> proof-of-concept only, not meant for integration into org core - it'll
> need a fair amount of work before that happens, if it ever happens.)
> With the patch, the relevant output is changed to this:
> 
> ,----
> | <div class="figure">
> | <p><object data="foo.svg" type="image/svg+xml"> </object>
> | </p>
> | </div>
> |
> |
> | <div class="figure">
> | <p><object data="foo.png" type="image/png"> </object>
> | </p>
> | </div>
> `----
> Open questions
> Do I have this right? I'm neither an SVG nor an HTML expert. If there 
> is
> another way to do what I want, please let me know.
> 
> Do most browsers support <object> tags? Do they do the right thing with
> images in <object> tags?

> 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).

 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

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?

see:
http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#SVG_in_HTML
for an interesting writeup on the issues.

rick

  reply	other threads:[~2014-01-10 16:10 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 [this message]
2014-01-10 19:12   ` Nick Dokos
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=cf32d8f09aa9412b50e9369e0471da9d@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).