From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Request: change SVG embedding in exported HTML Date: Sun, 24 Jul 2016 13:40:41 -0400 Message-ID: <3385fd22-91fe-f19f-cce1-cecdda416492@gmail.com> References: <87oa5oqzvr.fsf@iki.fi> <5c2f153b-05ad-c4b5-6384-e3e204a8f201@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRNOR-0001oC-Kd for emacs-orgmode@gnu.org; Sun, 24 Jul 2016 13:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRNOO-0001wb-8l for emacs-orgmode@gnu.org; Sun, 24 Jul 2016 13:40:47 -0400 Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]:35027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRNOO-0001wX-3J for emacs-orgmode@gnu.org; Sun, 24 Jul 2016 13:40:44 -0400 Received: by mail-it0-x22d.google.com with SMTP id u186so70611231ita.0 for ; Sun, 24 Jul 2016 10:40:43 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Christian Moe Cc: Jarmo Hurri , emacs-orgmode@gnu.org On 07/24/2016 12:50 PM, Christian Moe wrote: > > I disagree. A switch to 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 in HTML. But you *can* > scale SVG with by putting the in a container
and > scaling the container width and height. > > This is actually simple with Org, which natively wraps the in a >
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]] It has been awhile since I tried to scale an SVG image using Org markup, but I recall trying what you suggest and it didn't work. I will try again when I have some time and report the results to this list. > > Alternatively, you can use #+attr_html to set an id on the figure
, > and style it with CSS. > > (2) You can also do other things with that you cannot with > , like manipulating the SVG with Javascript and styling it with an > external stylesheet (linked from the SVG, not the web page). > > Raw SVG in the exported HTML is a third option that is very plain-texty > and supports all the mentioned features, but it tends to bloat files, > and doesn't encourage caching and re-using of an image across web pages. > > To sum up, makes the most common task simpler (scaling the > graphic), but at the cost of features such as interactive animated > graphics, which are possible with or SVG islands. I do remember a discussion in the past about this issue. Scott