Referencefigure

<figure>

A figure container holding graphical content with a caption

<figure> is a Sectional component which acts as a container for an <image/> or <video/>.

Attributes and Properties

Attributes for <figure>

Other (2)

boolean. Default value: true. Whether to display an auto-generated figure number.

boolean. Default value: false. Whether to omit the auto-generated figure name from the caption.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <figure name="f">

Other (7)
$f.caption

text. The figure's caption text.

$f.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$f.figureEnumeration

text. Auto-generated number for this figure.

$f.figureName

text. The full display name of the figure (e.g., 'Figure 3').

$f.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$f.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$f.hidden

boolean. Whether this component is hidden from the rendered output.

Common to all components (4)
$f.doenetML

text. The DoenetML source code that produced this component.

$f.hide

boolean. Whether to hide this component from the rendered output.

$f.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$f.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <figure> in a <section>

This example illustrates a <figure> with a <caption> placed within a <section>.

Attribute Examples

Attribute Example: suppressFigureNameInCaption

The suppressFigureNameInCaption overrides the default naming convention for captions, which otherwise start with the word “Figure”.


Attribute Example: number

The number attribute can be set to “false” to suppress the automatic figure numbering in the caption.