Simple SVG resizing
With bitmap images, resizing is simple using declarations like #+ATTR_HTML: :width 60%
before an image link.
However, this doesn't affect SVG's. Having looked around the forums, I have come up with a solution that works OK. Maybe this would be useful for others, too, but -- shouldn't there be a better way?
Current way (SVG from Inkscape. I do not understand much CSS):
- in the local CSS file, a
.middle
declaration provides centering, and apparently within such environments, SVG.figure
instances are centered (again) and provided with a width.
.middle { display: block; margin-left: auto; margin-right: auto; }
.figure p {text-align: center} svg {width: 100%}
- in the org file, an SVG image can be sized as follows, apparently (??) by sizing the
middle
environment within which the width fromfigure
is at 100%.
#+REVEAL_HTML: <div class=middle style="width: 60%">
[[../images/myimage.svg]]
#+REVEAL_HTML: </div>
Edited by Johan Wilhelm Klüwer