numberedCaption

fun <T : CaptionableNode, LocationTrackableNode, LocalizedKind> numberedCaption(builder: HtmlTagBuilder, node: T, position: CaptionPosition, captionTagName: String = "figcaption", idPrefix: String = node.kindLocalizationKey): HtmlTagBuilder

Retrieves the location-based label of the node, displays an optional caption preceded by the label, and also applies the label as its ID. The label is pre-formatted according to the current NumberingFormat.

At the end, thanks to injected CSS variables, the visible outcome is <localized_kind> <label>: <caption>.

Parameters

builder

builder of the tag hosting the caption

node

node to display the caption, and apply the ID, for

position

position of the caption relative to the content

captionTagName

tag name of the caption element. E.g. "figcaption" for figures, "caption" for tables

idPrefix

prefix for the ID. For instance, the prefix figure lets the ID be figure-X.Y, where X.Y is the label.

See also

to retrieve the numbered label