From: Chris Clark <cfclrk@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Alexandre Duret-Lutz <adl@lrde.epita.fr>,
emacs-orgmode@gnu.org, tec@tecosaur.com
Subject: Re: Org 9.5 broke the rendering of my SVG images
Date: Mon, 17 Oct 2022 09:32:38 -0400 [thread overview]
Message-ID: <CAL2EVtdj--0Z7AMcdT4j5jgFT=pQ7Q7PPhdN5aRKai8-F-4CXw@mail.gmail.com> (raw)
In-Reply-To: <875ygmzunb.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
Would the HTML <svg> tag be appropriate in this case?
For example, here's a tiny example of using the <svg> tag with an external
CSS stylesheet: https://plnkr.co/edit/i8RFDW?preview
On Fri, Oct 14, 2022 at 4:32 AM Ihor Radchenko <yantar92@gmail.com> wrote:
> Alexandre Duret-Lutz <adl@lrde.epita.fr> writes:
>
> > In Org 9.5, SVG images started being exported by the HTML exporter as
> > <img> rather than <object>.
> >
> > The patch causing that was
> > https://list.orgmode.org/87k0pemj6d.fsf@gmail.com/T/
> > with two arguments:
> > 1) <object> do not have an alt attribute
> > 2) <object> will not render some SVG file correctly if it has no viewBox
> > (I'm assuming that the issue shown in that message is a missing
> viewBox).
> >
> > The reason I've noticed this change is that it broke my web pages. On
> > my pages, I use SVG to display many automata, and they all share a
> > common stylesheet. That stylesheet is not inlined into the SVG, rather,
> > it is a separate file included in the SVG files with
> > <?xml-stylesheet href="filename.css" type="text/css"?>
> > so that the browser only need to download it once.
> >
> > Infortunately, <img> does not allow external stylesheets to be
> > processed, so my stylesheets are now ignored. Note that one can also
> > build SVG images that include other SVG images, or SVG images that have
> > animations that start when you hover on some elements. All those
> > usages would break with <img>.
> >
> > I've seen that very issue was discussed back in 2016
> > https://list.orgmode.org/871t2iq353.fsf@iki.fi/T/
> > where Christian Moe pointed out exactly this:
> >
> >> (2) You can also do other things with <object> that you cannot with
> >> <img>, like manipulating the SVG with Javascript and styling it with
> >> an external stylesheet (linked from the SVG, not the web page).
> >
> > So in the interest of allowing users to build documents where SVG
> > files are not static, self-contained images, it seems to me that Org
> > probably needs some way to specify whether SVG images should be
> > exported as <img> or <object> (or maybe even inlined).
>
> Confirmed.
> This is clearly a regression and should be fixed.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
>
[-- Attachment #2: Type: text/html, Size: 3685 bytes --]
next prev parent reply other threads:[~2022-10-17 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 14:17 Org 9.5 broke the rendering of my SVG images Alexandre Duret-Lutz
2022-10-14 8:17 ` Ihor Radchenko
2022-10-17 13:32 ` Chris Clark [this message]
2022-10-17 13:49 ` Timothy
2024-05-19 11:40 ` Ihor Radchenko
2024-05-22 9:27 ` Ihor Radchenko
2024-06-03 9:21 ` Ihor Radchenko
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='CAL2EVtdj--0Z7AMcdT4j5jgFT=pQ7Q7PPhdN5aRKai8-F-4CXw@mail.gmail.com' \
--to=cfclrk@gmail.com \
--cc=adl@lrde.epita.fr \
--cc=emacs-orgmode@gnu.org \
--cc=tec@tecosaur.com \
--cc=yantar92@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).