Skip to content

Fix bibliography indentation workaround once Typst solves it #37

@jassielof

Description

@jassielof

Bibliography hanging indentation isn't respected with:

#set bibliography(style: "apa")
#show bibliography: set par(
  first-line-indent: 0in,
  hanging-indent: 0.5in,
)

Requiring the following as a workaround:

#show bibliography: bib-it => {
  show block: block-it => context {
    // if it body is auto or styled()
    if block-it.body == auto or block-it.body.func() == text(fill: red)[].func() {
      block-it
      // if its body isn't sequence(), for example: pdf-marker-tag
    } else if block-it.body.func() != [].func() {
      par(block-it.body)
    } else {
      par(block-it.body)
    }
  }

  bib-it
}

Depends on: typst/typst#2639

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs Typst fixDepends on a Typst issue to be solved. It can have a workaround until the issue is fixed or not.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions