Hi all, I am writing the documentation of a new template that I want to submit soon in Typst Universe using Mantys. When writing the documentation, I am facing a problem that I can’t solve after reading the documentation of Mantys.
To help you to understand my problem, here is a short code snippet:
I couldn’t find anything in the Docs like a nameof() type function but here is a hack:
#let x = none
#let name-of-x = (x: none).keys().first()
The variable x is defined, then used as the key in a dictionary. The dictionary itself isn’t important so it isn’t saved into a new variable, instead the first key of the dictionary is saved in name-of-x.
The result of the above code is “x”.
What type should the name of the variable be if not str?
Or maybe I’m misunderstanding your request:
You would like to pass the name of journal-name as the journal parameter, is that correct? That is to say, the actual value stored in journal-name is not used here.
Actually, displaying the result as "x" can lead to infer that the type of journal is a str instead of a dict. Of course, this can be specified later when defining the #argument and by giving some use case.
Ideally, I would like that the dictionary won’t be interpret. I am not sure to be clear enough.
Hi. From looking at arg and Typst, you can only add concrete default value. I assume you can set parameter types with argument.types. But to pass a dictionary name and display it as identifier, I think needs a new feature.