Dear all,
Yesterday I’ve heard about typst the first time, and after having looked into it for an hour or so it was clear that this is what I’ve been after for a very long time. I’m quite excited about it!
I’ve spent yesterday and today on learning as much as possible about it. Now I am facing a little problem that I’m not able to solve myself. Please consider the following table definition:
#table(
columns: (auto, auto, 1fr, auto, auto),
align: horizon,
table.header(
repeat: true
)[Order line][Qty.][Description / Service IDs][Monthly fee][Setup fee]
)[a][b][c][d][e]
This produces the following result:

Now I would like to make each column as small as possible, except the middle column, which should be as wide as possible. Therefore, I would like the text in each cell in each column (except the middle column) to be line-wrapped wherever a wrap is possible. As an example, in the first header cell, there should be a line break after the word “Order” so that the word “line” is put in a new line.
The obvious solution would be to insert an explicit line break between the two words (that is, [Order\ line] instead of [Order line]).
Unfortunately, this is not a solution to the problem, because there is a second requirement:
If there is a text somewhere in the first column that cannot be line-wrapped (for example, because it does not contain a word separator like a space character), and if that text takes more horizontal space than the text in the first header cell would take, the text in the first header cell should remain on one line.
Probably it would be possible to achieve the desired behavior by a script which is very complex. Before taking that effort, I would like to know whether there is easy way that I have missed.
Thanks in advance for any ideas!