Using #include for multiple chapters breaks linking and commands

Hey there. I’m writing a very long document in Typst, and I wanted to have each chapter be its own .typ file. However, when using #include file.typ, I’m getting errors because commands i have defined in my main file are not defined in fyle.typ. Of course this also breaks some packages, such as glossarium and beautitled.

Any tips ?

Hello @khatharsis,

This is working as designed. You will need to follow Best practices for working with longer documents

If you post some code examples, we will make sure to help you with any issues. But first, have a look at the post above, which also links to the Typst Examples Book.

See also