{# A figure of a report: the image of `src`, and for an SVG with its spec the spec inline, `data-figure` and `data-figure-spec` by its key, which a page reads and `figures.js` draws as an interactive SVG in place of the image; `width` and `height` are the size the image reserves before it is loaded. A caption is the body of a call of the macro. #} {% macro figure(key, spec_text=None, src=None, alt="", width=None, height=None) -%} {{ alt }} {%- if spec_text %} {%- endif %} {% if caller is defined %}{{ caller() }}{% endif %} {%- endmacro %}