I'm working on a quarto template that uses typst to style and render to pdf. One of the things passed in the quarto yaml are author names. I parse them into an array of names that then is supposed to be displayed on the title page, separated by commas. Lets say I have something like below:
#let full_names = ("Gordon Allport", "Kurt Lewin", "Fritz Heider")
#full_names.join(", ")
The issue I would like to address is that sometimes the names get split so that first name appears on one line but last name is then passed to the next line.
Is there a way to make sure that the line ends only at commas so that first name and last name stays at the same line?
You could do something like this. \u{00A0} represents the Unicode code point for a non-breaking space.
#let full_names = (
"Gordon\u{00A0}Allport",
"Kurt\u{00A0}Lewin",
"Fritz\u{00A0}Heider"
)
#full_names.join(", ")