Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the paragraph spacing in Typst?

How to change the paragraph spacing in Typst? Do we have any codes to perform it? It seems the function par() is not the case.......

I tried to look for the relevant codes, but I failed to find them. Any suggestions, mates?

like image 279
Shujun Tan Avatar asked Nov 05 '25 16:11

Shujun Tan


1 Answers

Do you mean the spacing between paragraphs, or lines in the paragraph?

leading controls the spacing between lines:

#set par(leading: 2em)
#lorem(100)

enter image description here

A block's spacing controls the distance between paragraphs:

#set block(spacing: 4em)
#lorem(30)

#lorem(30)

enter image description here

like image 88
ntjess Avatar answered Nov 07 '25 16:11

ntjess



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!