typst / templates

Templates that are directly maintained by the Typst team.
MIT No Attribution
228 stars 22 forks source link

Greater use of Constants #16

Open stellarpower opened 10 months ago

stellarpower commented 10 months ago

Hi,

Some nice templates in the app. I'd like to see a greater use of constants, and fewer things as hardcoded literals sprinkled through the template file's functions.

I think e.g. some numeric literals are fine, but I'm looking at the "Department News" template right now - changing the typeface or colour scheme ought to be a one-line change really.

I know it's probably the case that when typesetting, as so much is literal information, it's going to be harder to separate constants than when working with typical source code, but I think it's still important to encourage users to write re-usable code, and follow basic principles to make it easy to change and re-configure their work - because as the old adage goes, anything that you think is constant now, will change at some time in the future! So I think at least basic settings defining the appearance or settings of the template should be at the top using let statements.

Thanks!

laurmaedje commented 10 months ago

Fair.