Skip to main content

rescale-image

Rescale an image element to fit within a column-fraction of the available content width.

Parameters

img-el : content​

The raw image element — used only for measuring its declared width.

display-el : content​

The element that is actually rendered (may be img-el itself, or a figure containing it).

col-fraction : ratio​

Fraction of container-width this image should occupy (e.g. 40% → 0.4).

container-width : none | length    default: none​

The available content-area width in points. When none (default), it is measured automatically via layout().

align-direction : alignment​

left or right — which side the image is placed on.

Returns: content