[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Scaling HTML-exported SVG

From: Jarmo Hurri
Subject: Re: [O] Scaling HTML-exported SVG
Date: Sun, 24 Jul 2016 20:55:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Christian Moe <address@hidden> writes:

> Jarmo Hurri writes:
>> Does anyone have any idea of how to scale an SVG figure produced by Org
>> (Asymptote)? The exported HTML is
>> <div class="figure">
>> <p><object type="image/svg+xml" data="pisteita-koordinaatistossa.svg" >
>> Sorry, your browser does not support SVG.</object>
>> </p>
>> </div>
> You can scale the SVG by scaling the <object> element's container,
> i.e. the <div> with class "figure". Setting attributes on the image
> link with #+attr_html as usual should work, because they are passed to
> the figure container rather than to the <object>.
> Either:
>   #+attr_html: :width 200px
>   [[path/to/image.svg]]
> or:
>   #+html_head_extra: <style>#svgfig {width: 200px; }</style>
>   #+attr_html: :id svgfig
>   [[path/to/image.svg]]
> For this to work, the SVG needs to be written to be scalable (with
> viewport set etc.).

(Also addressed this in the other thread; also here for completeness.)

But this means scaling on a file-by-file basis, which is very
inconvenient for any larger projects.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]