examfunction
#exam(questions, ..options)Define an exam with questions/parts/subparts. This is the main entry point for examy, and is usually invoked as a show rule (e.g. #show: exam or #show: exam.with(..)).
This function automatically invokes e.prepare(), which elembic needs to make cross references work.
Arguments
questionscontent | functionrequiredpositionalContent of the exam built out of Typst content and #question[..] blocks.
Alternatively, a function (solutions-only) => [..] that returns the content. solutions-only(x, otherwise: y) gives x if solutions are shown and y otherwise. Unlike #solution[..], which returns a Typst context, solutions-only() returns what it is given and so can be used anywhere.
..optionsany numberAny of
config's options (e.g. #show: exam.with(show-solutions: false)).