Hello fellow Typst users!
I’m in the process of replicating my faculty’s Master thesis template from overleaf in Typst (I plan to use it and make it available to colleagues).
I’m trying to wrap the document in a template function as suggested in Making a Template. This would be in a separate file, with multiple arguments for the fill-in info:
#let template(
thesis_title: [Insert the title of the dissertation],
thesis_author: [Author’s name, Arial Plain, 18],
//course_name: [Course’s Name, Arial Plain, 12],
department: [Department, Arial Plain, 10],
faculty: [Faculty, Arial Plain, 10],
year: [Year],
thesis_type: [Dissertation carried out as part of
the [course's name], Arial Plain, 12],
supervisor: [Supervisor’s Name, Category, Institution],
co-supervisor: [Supervisor’s Name, Category, Institution],
ext-supervisor: [Name, Professional status, Company’s name],
doc
) = {
//function
doc
}
And I’m importing the file and calling the function as:
#show: template.with(
thesis_title: [title],
…
ext-supervisor: [name])
at the top of the document. However, no matter what argument order or type (named/positional) I use, the compiler cycles through errors like “Unexpected argument”, “[argument] is positional”, etc.
If I remove all arguments from the function call, sometimes it starts working again, but as soon as I have 4 or 5 in, it begins again.
Am I doing something wrong?