backup typst

This commit is contained in:
Arthur Grisel-Davy 2023-06-19 15:49:07 -04:00
parent 5cc9ea1e76
commit 6dff086d6c
4 changed files with 689 additions and 341 deletions

View file

@ -4,7 +4,7 @@
[#footnote[agd: #content]]
}
#let cn = text(purple,size:15pt)[ #super[citation needed]]
#let cn = text(purple,size:15pt)[ #super[[citation needed]]]
// problem statement environment
// Usage:
@ -20,3 +20,45 @@
])
]
#let reset-acronym(term) = {
// Reset a specific acronym. It will be expanded on next use.
if term in acronyms{
state("acronym-state-" + term, false).update(false)
}
}
#let reset-all-acronyms() = {
// Reset all acronyms. They will all be expanded on next use.
for term in acronyms.keys() {
state("acronym-state-" + term, false).update(false)
}
}
// Show rule to paste in the document for the acronym generation to work.
// #show ref: r =>{// Overload the reference definition
// // Grab the term, target of the reference
// let term = if type(r.target) == "label"{
// str(r.target)
// }
// else{
// // I don't know why the target could not be a type label but it is handled
// none
// }
// if term in acronyms{
// // Grab definition of the term
// let definition = acronyms.at(term)
// // Generate the key associated with this term
// let state-key = "acronym-state-" + term
// // Create a state to keep track of the expansion of this acronym
// state(state-key,false).display(seen => {if seen{term}else{[#definition (#term)]}})
// // Update state to true as it has just been defined
// state(state-key, false).update(true)
// }
// else{
// r
// }
// }