typst

How do I remove the extra indentation in the bibliography section?


When I create a bibliography in Typst (0.5.0) in anything but the IEEE style, the first line is missing its indent. How do I fix the formatting so this does not occur?

= References
#bibliography("bib.bib", style: "apa", title: none)

Sample content for the file bib.bib:

@Article{Einstein:1911:RGT,
  author =       "A. Einstein",
  title =        "{Die Relativit{\"a}tstheorie}. ({German}) [{The} Theory of Relativity]",
  journal =      j-VJSCHR-NATURF-GES-ZURICH,
  volume =       "56",
  pages =        "1--14",
  year =         "1911",
  ZMnumber =     "42.0720.02",
  acknowledgement = ack-nhfb,
  author-dates = "Albert Einstein (1879--1955)",
  Calaprice-number = "31",
  language =     "German",
  Schilpp-number = "43",
  ZMreviewer =   "Prof. Lampe (Berlin)",
}

All other lines are slightly indented compared to normal text:

badly formed bibliography

I would have expected all items to be consistently indented. How do I achieve this?


Solution

  • Another workaround is to set first-line-indent to zero right before the bibliography is declared. This conserves the intended hanging indent of the bibliography style:

    #set par(
      first-line-indent: 0in
    )
    
    #bibliography("refs.bib", style:"apa")
    

    Output of above code, showing a bibliography with the intended layout