Repository navigation
Paragraph spacing property - #4390
Conversation
When both |
I'm not sure what exactly you mean. Maybe this explains it:
When two paragraphs touch, the larger |
|
The new behavior of list is not clear from https://staging.typst.app/docs/reference/model/list/#parameters-spacing:
I think the documentation should be improved, especially because the behavior has changed. An example like |
|
You have linked to the wrong parameter. The quote is from https://staging.typst.app/docs/reference/model/list/#parameters-tight. |
This introduces a new
par.spacingproperty. Paragraphs are not consideredblocks anymore and are not affected byblock.spacing. Insteadblock.spacingnow delegates topar.spacing, when it isauto(the new default). If, however, it is set to a non-auto value, it has precedence over paragraph spacing.This change has the following benefits:
#set par(spacing: ..)instead ofshow par: set block(spacing: ..).block.aboveandblock.belowcreated spacing with higher priority (and thus possibly different results) thanblock.spacingbecause otherwise it was impossible to override a larger spacing (e.g. for a heading to reduce the spacing below it). This was confusing. In the new system,spacingis really just a shorthand foraboveandbelowsince these naturally have higher priority than paragraph spacing (and thus alsoautoblock spacing, which is the same).block.aboveandblock.beloware now available in context expressions.par.spacingis of course available as well.Moreover, I changed
list.spacing,enum.spacing, andterms.spacingto selectleading/spacingbased on their tightness when set toauto, but to always respect the set value otherwise. Previously tight lists always ignored thespacingproperty. I believe the original reasoning was thatset list(spacing: ..)shouldn't break tight lists, but this problem is better solved withshow list.where(tight: false): set list(spacing: ..)in my opinion.I also improved the docs on
par.leadingand fixed a small bug withquoterelated to its block spacing.