Lovelace

→ Universe

Customization overview

Both #pseudocode and #pseudocode-list accept the following configuration arguments:

optiontypedefault
line-numberingnone or a numbering"1"
line-number-supplementcontent or string"Line"
line-number-alignmentalignmenthorizon + right
strokestroke1pt + gray
hookslength0pt
indentationlength1em
line-gaplength.8em
booktabsboolfalse
booktabs-strokestroke2pt + text.fill
titlecontent or nonenone
title-insetlength0.8em
numbered-titlecontent or nonenone

Until Typst supports user defined types, we can use the following trick when wanting to set own default values for these options. Say, you always want your algorithms to have colons after the line numbers, no indentation guides and, if present, blue booktabs. In this case, you would put the following at the top of your document:

#let my-lovelace-defaults = (
line-numbering: "1:",
stroke: none,
booktabs-stroke: 2pt + blue,
)

#let pseudocode = pseudocode.with(..my-lovelace-defaults)
#let pseudocode-list = pseudocode-list.with(..my-lovelace-defaults)