Replies: 2 comments
-
Take a look at the |
Beta Was this translation helpful? Give feedback.
0 replies
-
That works -- thank you! I can pass functions defined in my Typst file to #let thefunction = [Local function]
#eval("#thefunction", mode: "markup", scope: (thefunction: thefunction)) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am creating an exam using a question bank, and want to use custom functions defined in my Typst file. The questions are loaded with
#let questions = json("questions.json")
and rendered with#eval(question.at("questiontext", mode: "markup")
. This works fine if I use only built-in functions:main.typ
questions.json
It works if the function is defined in the string fed to
eval
:I can't make it work with custom functions though. Here is a MWE:
Any workarounds, or alternatives to achieve my goal?
https://typst.app/project/rOJBSBL4mjggccIIPoDOCE
Beta Was this translation helpful? Give feedback.
All reactions