typst/typst · error

{} was ignored during paged export

Error message

{} was ignored during paged export

What it means

Emitted as a warning-style error during paged export flow collection: a child element (e.g. an HTML-only or non-paged construct) has no representation in paged layout, so it was ignored rather than laid out.

Source

Thrown at crates/typst-layout/src/flow/collect.rs:118

            } else if let Some(elem) = child.to_packed::<ParElem>() {
                self.par(elem, styles)?;
            } else if let Some(elem) = child.to_packed::<BlockElem>() {
                let alone = children.len() == 1;
                self.block(elem, styles, alone);
            } else if let Some(elem) = child.to_packed::<PlaceElem>() {
                self.place(elem, styles)?;
            } else if child.is::<FlushElem>() {
                self.output.push(Child::Flush);
            } else if let Some(elem) = child.to_packed::<ColbreakElem>() {
                self.output.push(Child::Break(elem.weak.get(styles)));
                self.par_situation = ParSituation::First;
            } else if child.is::<PagebreakElem>() {
                bail!(
                    child.span(), "pagebreaks are not allowed inside of containers";
                    hint: "try using a `#colbreak()` instead";
                );
            } else {
                self.engine.sink.warn(warning!(
                    child.span(),
                    "{} was ignored during paged export",
                    child.func().name(),
                ));
            }
        }
        Ok(())
    }

    /// Perform collection for inline-level children.
    fn run_inline(&mut self, children: &[Pair<'a>]) -> SourceResult<()> {
        // Compute the shared styles.
        let styles = StyleChain::trunk_from_pairs(children).unwrap_or_default();

        // Layout the lines.
        let lines = crate::inline::layout_inline(
            self.engine,
            children,

View on GitHub (pinned to 6a6f1a97a3)

Solutions

  1. Remove or guard the non-paged element when targeting PDF/printed output
  2. Use a paged-compatible element instead
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/typst-layout/src/flow/collect.rs:99 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of typst/typst@6a6f1a97a3 (2026-08-17). Data as JSON: /api/errors/2dc3f3ecf675ce6b. Report an issue: GitHub.