Customization overview
Both #pseudocode and #pseudocode-list accept the following configuration arguments:
| option | type | default |
|---|---|---|
line-numbering | none or a numbering | "1" |
line-number-supplement | content or string | "Line" |
line-number-alignment | alignment | horizon + right |
stroke | stroke | 1pt + gray |
hooks | length | 0pt |
indentation | length | 1em |
line-gap | length | .8em |
booktabs | bool | false |
booktabs-stroke | stroke | 2pt + text.fill |
title | content or none | none |
title-inset | length | 0.8em |
numbered-title | content or none | none |
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)