❓ How can I prevent the ":" character from blocking word breaks in gendered German words like Brückenbauer:innen?

Hi everyone,

I’m working on a German academic paper in Typst and trying to format the text with justify = true. My setup kinda looks like this:

  set page("a4")
  set page(margin: (right: 2.5cm, left: 3cm, top: 2.5cm, bottom: 2.5cm))
  let leading = 1.5 * 12pt
  let spacing = leading + 6pt
  set block(spacing: spacing)
  set par(spacing: spacing)
  set par(leading: leading)
  set par(linebreaks:auto)
  set text(font: "New Computer Modern", lang: "de", size: 12pt, hyphenate:auto)
  set par(justify: true)

The issue I’m running into is with gender-inclusive language, specifically using a colon “:” in words like: Brückenbauer:innen

Typst treats the “:” as punctuation (similar to sentence punctuation), so it prevents any line breaks within the word. This causes awkward spacing between words. (see screenshot below)

Screenshot 2025-05-19 at 20.17.55

:question: Is there a way to:

  • Allow line breaks after or within Brückenbauer:innen, or
  • Tell Typst to treat the colon differently (e.g., not as a punctuation mark), or
  • Replace the colon with a visually identical but breakable character?

One solution would be to use the * character instead, but I’d prefer to keep the colon visually as-is (per university guidelines), but I need Typst to break the word like a regular compound.

Screenshot 2025-05-19 at 20.24.28

Thanks for any ideas!

The shy hyphen is -? and it allows you to insert suggestions or extra hyphen break points in a work. Like Brück-?en

If you insert something like that into the word, it will break again (at multiple possible points, not just at the soft hyphen). I don’t really know how that works. (Why didn’t it allow hyphenation in the first place, I mean?) The question is also how to automate it for your document.

The following seems like it would work, and only this placement of the soft hyphen, again not sure why :sweat_smile: (I also don’t know where a good place to break would be in relation to the : but since it picks a place earlier in the word anyway… maybe not the problem?

#show ":innen": [:-?innen]

2 Likes

I was going to suggest using a soft hyphen, U+00AD, so a question. You say you can enter it in Typst with -?. Where can I find out any similar shortcuts for other such elemants like “Narrow No Break Space”?

There’s just very few of those with their own shortcuts and they are listed here: Symbols – Typst Documentation

There is a shortcut for regular non-breaking space, ~ but for the narrow one you’ll have to go to the next page, symbols and find it there (it has a search box)

bild

In regular markup that would be #sym.space.nobreak.narrow; to enter it. You can give it a shorter name, of course with a let statement.

1 Like

Ah, thank you. I saw all the maths and scientific symbols, so didn’t scroll far enough down or missed the spacing symbols hidden amongst them.

:slight_smile:
Mark

1 Like

Please read the How to post in the Questions category and update your post.