Jarmo Hurri writes:
> Greetings.
>
> 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>
(Suggested an answer on another thread. For completeness:)
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.).
Yours,
Christian