Skip to content

Unable to use html.elem("body") inside (conditional) context #5756

@Andrew15-5

Description

@Andrew15-5

Description

Currently, the multi-output config like below doesn't work:

#context if target() != "html" {
  [document-body]
} else {
  html.elem("body", html.frame([document-body]))
}

This was confirmed by Laurenz (that this is a bug). The body should be able to be contextual and work in the above example.

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghtmlRelated to HTML export

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions