#How to define variable amongst subdocuments with #include ?
12 messages · Page 1 of 1 (latest)
have a template.typ file with those variables in the root folder of your project, then #import "/template.typ": * in each file
note that a path starting with / is relative to the project root, not to your filesystem's root
Thanks for the super-quick answer. #include is not a preprocessing directive, so there is no better way ?
Also, is #include the best way to split a large document ?
#include is not a preprocessing directive
yeah that's right
so there is no better way ?
no. you will always need to add animportstatement.
import is what is used to bring names into a file. include is used to eval a file as content and place it where you ran include. they have two separate purposes.
Also, is #include the best way to split a large document ?
yes I'd say so
Thanks, you rocks !
no problem
just note though
you dont need to repeat global show and set rules on each file
they apply recursively on content which is placed in the main document tree
so once you place the output of include in your main document, its output will be subject to show and set rules in the main document