A while back I worked on making an equivalent to my CS department’s messy Word templates for our projects and settled on Typst (producing this monstrosity). One of the few snags I ran into is the fact that Typst and Word (and LaTeX) calculate line spacing (aka leading) differently:
- Word’s line spacing is the distance between the top of a line and the next (I think), with 1.5 line spacing making them be separated by around 175% of the point height (Word’s weird)
- LaTeX uses the baseline-to-baseline distance between lines
- Typst defines leading as the space between the bottom of a line and the top of the next line
As you can imagine, even for people using LaTeX there’s confusion on how exactly to replicate Word’s (or something close to it’s) behaviour, and tons of discussions on what the spacing macros actually do anyways…but LaTeX and Word’s definitions are somewhat similar so it’s (sort of) easy to fix.
How would one go across doing the same in Typst?
(As for my Typst recreation of the Word doc, I got some example text from Wikipedia and fiddled with par.leading
in a demo document until they looked similar—it ended up being 12.6pt, but this wouldn’t generalise to different fonts/sizes etc.)