Skip to main content

lower_figure_directive

Function lower_figure_directive 

Source
pub(crate) fn lower_figure_directive(
    document: &mut Document,
    root: NodeId,
    args: &[SetArg],
    span: &SourceSpan,
    source_file: &Path,
    em_pt: f64,
    diagnostics: &mut Vec<Diagnostic>,
)
Expand description

Lower a #figure(image: ..., caption: ...) directive into a [NodeKind::Figure] node with two children: an Image node (built the same way #image(...) would build it) and a caption paragraph. The caption is rendered beneath the image by the layout engine.