Home

Figure

This is a figure type used in Stencila Schema, analogous to figure containers in HTML, JATS, and scholarly publishing systems.

It extends CreativeWork so figures can carry rich metadata, authorship, captions, and provenance, while also adding document-oriented support for multi-panel layout and SVG overlays. This makes it suitable for executable and annotated figures, not just static media wrappers.

Key properties include content, caption, label, layout, padding, and overlay. Additional metadata and provenance features are inherited from CreativeWork.

Analogues

The following external types, elements, or nodes are similar to a Figure:

  • HTML <figure>: Closest HTML analogue for self-contained figure content with captions.

  • JATS <fig>: Closest JATS analogue for figures in scholarly publishing.

  • Pandoc Figure: Close Pandoc analogue for captioned figure content, though Stencila additionally supports panel layout and SVG overlay annotations.

  • MDAST Image: Only an approximate Markdown AST analogue; plain MDAST images do not model multi-block figure content, panels, or overlays.

Properties

The Figure type has these properties:

NameDescriptionTypeInherited from
labelA short label for the figure.String-
labelAutomaticallyWhether the label should be automatically updated.Boolean-
captionA caption for the figure.Block*-
layoutLayout for arranging content blocks in a multi-panel figure. When absent, content blocks stack vertically with no grid.String-
paddingPadding around the figure's content area in pixel units. Creates whitespace where overlay annotations can be placed outside the image bounds. Accepts 1, 2, or 4 space-separated values following CSS shorthand order (all, vertical/horizontal, or top/right/bottom/left).String-
overlayAn optional SVG overlay rendered on top of the figure's content. The SVG is positioned absolutely over the content area and scales proportionally using the SVG viewBox. Used for annotations such as arrows, callouts, bounding boxes, and labels.String-
overlayCompiledThe compiled SVG overlay with all custom elements expanded to standard SVG. Generated during compilation from the overlay source. When present, renderers use this instead of overlay.String-
compilationDigestA digest of the overlay property.CompilationDigest-
compilationMessagesMessages generated while compiling the overlay.CompilationMessage*-
contentThe content of the figure.Block*-
workTypeThe type of CreativeWork (e.g. article, book, software application).CreativeWorkTypeCreativeWork
doiThe work's Digital Object Identifier (https://doi.org/).StringCreativeWork
aboutThe subject matter of the content.ThingVariant*CreativeWork
abstractA short description that summarizes a CreativeWork.Block*CreativeWork
authorsThe authors of the CreativeWork.Author*CreativeWork
provenanceA summary of the provenance of the content within the work.ProvenanceCount*CreativeWork
contributorsA secondary contributor to the CreativeWork.Author*CreativeWork
editorsPeople who edited the CreativeWork.Person*CreativeWork
maintainersThe maintainers of the CreativeWork.(Person | Organization)*CreativeWork
commentsComments about this creative work.Comment*CreativeWork
dateCreatedDate/time of creation.DateTimeCreativeWork
dateReceivedDate/time that work was received.DateTimeCreativeWork
dateAcceptedDate/time of acceptance.DateTimeCreativeWork
dateModifiedDate/time of most recent modification.DateTimeCreativeWork
datePublishedDate of first publication.DateTimeCreativeWork
fundersPeople or organizations that funded the CreativeWork.(Person | Organization)*CreativeWork
fundedByGrants that funded the CreativeWork; reverse of fundedItems.(Grant | MonetaryGrant)*CreativeWork
genreGenre of the creative work, broadcast channel or group.String*CreativeWork
keywordsKeywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.String*CreativeWork
isPartOfAn item or other CreativeWork that this CreativeWork is a part of.CreativeWorkVariantCreativeWork
licensesLicense documents that applies to this content, typically indicated by URL, but may be a CreativeWork itself.(CreativeWorkVariant | String)*CreativeWork
partsElements of the collection which can be a variety of different elements, such as Articles, Datatables, Tables and more.CreativeWorkVariant*CreativeWork
publisherA publisher of the CreativeWork.Person | OrganizationCreativeWork
bibliographyA bibliography of references which may be cited in the work.BibliographyCreativeWork
referencesReferences to other creative works, such as another publication, web page, scholarly article, etc.Reference*CreativeWork
textThe textual content of this creative work.TextCreativeWork
titleThe title of the creative work.Inline*CreativeWork
repositoryURL of the repository where the un-compiled, human readable source of the work is located.StringCreativeWork
pathThe file system path of the source of the work.StringCreativeWork
commitThe commit hash (or similar) of the source of the work.StringCreativeWork
versionThe version of the creative work.String | NumberCreativeWork
alternateNamesAlternate names (aliases) for the item.String*Thing
descriptionA description of the item.StringThing
identifiersAny kind of identifier for any kind of Thing.(PropertyValue | String)*Thing
imagesImages of the item.ImageObject*Thing
nameThe name of the item.StringThing
urlThe URL of the item.StringThing
idThe identifier for this item.StringEntity

Related

The Figure type is related to these types:

Bindings

The Figure type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the Figure type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
labelMin+No labelNone
Low+Generate a simple labeloption::of(r"[a-zA-Z0-9]+")
MaxGenerate an arbitrary stringoption::of(String::arbitrary())
captionMin+No captionNone
Low+Generate up to two arbitrary paragraphs.option::of(vec_paragraphs(2))
MaxGenerate up to three arbitrary, non-recursive, block nodes.option::of(vec_blocks_non_recursive(3))
contentMin+Generate a single arbitrary block image object.vec_blocks_image_object(1)
Low+Generate up to two arbitrary, non-recursive, block nodes (excluding code chunks).vec_blocks_figure_content(2)
MaxGenerate up to four arbitrary, non-recursive, block nodes.vec_blocks_non_recursive(4)

This documentation was generated from Figure.yaml by docs_types.rs.

© 2026 Stencila