You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There currently is no way to set any document properties using context-dependent functions.
If one tries to define a show-rule as follows, the PDF export will not have a title set. Using context document.title does still output the set title, though.
// NOTE: You probably don't want to actually do such a `show: body => context …` construction.#show: body=>context {
setdocument(title: [Title]) ifquery(<my-label>).len() ==0body
}
#context document.title
// uncomment if desired: <my-label>
Proposal
There should probably be a way to define document properties based on context.
If that is not feasible, then context set document() should throw a compiler error.
Reproduction URL
No response
Operating system
No response
Typst version
I am using the latest version of Typst
The text was updated successfully, but these errors were encountered:
#lettemplate(doc) = {
// context if state("bundle").get() != true {contextifquery(<sub-document-begin>).len() ==0 {
setdocument(title: [Title])
}
// set ...// set ...// set ...// show ...// show ...// show ...doc
}
#show: template
Text
Description
There currently is no way to set any document properties using context-dependent functions.
If one tries to define a show-rule as follows, the PDF export will not have a title set. Using
context document.title
does still output the set title, though.Proposal
There should probably be a way to define document properties based on context.
If that is not feasible, then
context set document()
should throw a compiler error.Reproduction URL
No response
Operating system
No response
Typst version
The text was updated successfully, but these errors were encountered: