typst/typst · error

{} was ignored during HTML export

Error message

{} was ignored during HTML export

What it means

Warning emitted by the HTML converter in handle: the element (named by the placeholder) has no HTML representation and was skipped during export. The paged-only construct still compiles but does not appear in the HTML output.

Source

Thrown at crates/typst-html/src/convert.rs:156

    } else if let Some(elem) = child.to_packed::<BlockElem>() {
        handle_block(converter, elem, styles)?;
    } else if let Some(elem) = child.to_packed::<FrameElem>() {
        let locator = converter.locator.next(&elem.span());
        let style = TargetElem::target.set(Target::Paged).wrap();
        let frame = (converter.engine.library.routines.layout_frame)(
            converter.engine,
            &elem.body,
            locator,
            styles.chain(&style),
            Region::new(Size::splat(Abs::inf()), Axes::splat(false)),
        )?;
        let mut node = HtmlFrame::new(frame, styles, elem.span()).into();
        // A frame is block-level by default like a Typst `image`. It can
        // be wrapped in a `box` to omit the `display` annotation.
        make_block_level(&mut node).unwrap();
        converter.push(node);
    } else {
        converter.engine.sink.warn(warning!(
            child.span(),
            "{} was ignored during HTML export",
            child.elem().name(),
        ));
    }
    Ok(())
}

/// Handles an HTML element.
fn handle_html_elem(
    converter: &mut Converter,
    elem: &Packed<HtmlElem>,
    styles: StyleChain,
) -> SourceResult<()> {
    // See the docs of `HtmlElem::role` for why we filter out roles for `<p>`
    // elements.
    let role = styles.get_cloned(HtmlElem::role).filter(|_| elem.tag != tag::p);

View on GitHub (pinned to 35417aa769)

Solutions

  1. Remove or replace the unsupported element when targeting HTML
  2. Check the HTML export documentation for supported elements
  3. File or track an issue for the missing element support
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/typst-html/src/convert.rs:156 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of typst/typst@35417aa769 (2026-08-17). Data as JSON: /api/errors/3e4359610114b6f3. Report an issue: GitHub.