#Unknown variable in chapters

3 messages · Page 1 of 1 (latest)

edgy haven
#

Hi all, I'll preface this by saying that I'm a novice when it comes to Typst (or similar systems like latex) so my apologies if I use some terms wrong or if the answer is really obvious lol.

Anyways, I'm having trouble calling a function inside of an imported typ file. In the image of my main.typ document you can see I'm importing the template.typ which contains the function "#let amazed(term) = box[✨ #term ✨]". When compiling main.typ, line 29 "You are #amazed[beautiful]!" shows up correctly in the document. However, if I put that exact same line in one of the typ chapter files I import later in the main file (like 1-introduction.typ), I get the error that 'amazed' is an unknown variable. How do I make it possible to call this function within the chapters I import?

dense crater
#

you want to import it in each chapter individually

edgy haven
#

right, I did think of that but was hoping there'd be a 'cleaner' way I guess. thanks!