My caption happened to line break at a weird place so I wanted to add a non-breaking space. This what happened :
#show figure.caption: it => {
set align(left)
set par(justify: true)
it
}
#figure(
rect(width: 100%, height: 10%),
caption : [#lorem(40)]
)
#figure(
rect(width: 100%, height: 10%),
caption : [This is a very long caption which breaks at the worst location possible like before a unit, 15 °C for example (in my language we have to space the value and the unit)]
)
#figure(
rect(width: 100%, height: 10%),
caption : [This is a very long caption which breaks at the worst location possible like before a unit, 15~°C for example (in my language we have to space the value and the unit)]
)
As you can see the line doesn’t adjust correctly in the third case. I suppose it’s a bug but I want to be sure it’s not something with my script.


