all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Re: Request: change SVG embedding in exported HTML
Date: Sun, 24 Jul 2016 20:51:17 +0300	[thread overview]
Message-ID: <8737myexgq.fsf@iki.fi> (raw)
In-Reply-To: m2a8h7t1z1.fsf@christianmoe.com

Christian Moe <mail@christianmoe.com> writes:

> I disagree. A switch to <img> for SVG export (1) is not necessary for
> scaling, and (2) would disable other useful features that are
> presently available out of the box.
>
> (1) It *is* a bit easier to scale SVG with <img> in HTML. But you
> *can* scale SVG with <object> by putting the <object> in a container
> <div> and scaling the container width and height.

The current version of Org wraps the SVG image in a <div> of class
figure, but at least setting the width of this class in a CSS produces
no scaling effect (tested with Chrome and Safari).

> This is actually simple with Org, which natively wraps the <object> in
> a <div class="figure"> tag, and passes any attributes to the latter.
> To scale an arbitrary image.svg e.g. to 100px width, try:
>
>   #+attr_html: :width 100px
>   [[path/to/image.svg]]
>
> Alternatively, you can use #+attr_html to set an id on the figure
> <div>, and style it with CSS.

But if you need to set an id, then you will also have to do scaling on a
file-by-file basis. Or? If this is so, then scaling would be a _lot_
easier using <img>.

Do we need to / could we add an option to HTML export? Either export all
SVG files with <object> or <img>.

Jarmo

  parent reply	other threads:[~2016-07-24 17:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-23 12:53 Request: change SVG embedding in exported HTML Jarmo Hurri
2016-07-23 20:50 ` Scott Randby
2016-07-24 16:50   ` Christian Moe
2016-07-24 16:55     ` Christian Moe
2016-07-24 17:40     ` Scott Randby
2016-07-24 21:30       ` Christian Moe
2016-07-24 17:51     ` Jarmo Hurri [this message]
2016-07-24 18:53       ` Jarmo Hurri
2016-07-24  8:24 ` Nicolas Goaziou
2016-07-24 14:42   ` Jarmo Hurri

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737myexgq.fsf@iki.fi \
    --to=jarmo.hurri@iki.fi \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.