30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
#import "@preview/gviz:0.1.0": *
|
|
|
|
#let todo-list = state("todo-list",())
|
|
|
|
#let todo(content) = context {
|
|
let todonum = todo-list.get().len() + 1
|
|
text(weight: "bold", fill: red, [TODO n°#todonum #label("todo-"+str(todonum)): #content])
|
|
todo-list.update(x => x + (("todo-"+str(x.len()+1),x.len()+1, content),))
|
|
}
|
|
|
|
#let todos() = context {
|
|
pagebreak(weak: true)
|
|
[= TO-DOs]
|
|
for t in todo-list.final() {
|
|
let l = label(t.first())
|
|
list.item(link(l)[TODO n°#t.at(1) p.#locate(l).page() : #t.last()])
|
|
|
|
}
|
|
}
|
|
|
|
#let notes-template(doc) = [
|
|
#show raw.where(lang: "dot-render"): it => render-image(it.text)
|
|
#show raw.where(lang: "digraphLR"): it => render-image("digraph mygraph { rankdir=\"LR\";" + it.text + "}")
|
|
#show raw.where(lang: "digraphTB"): it => render-image("digraph mygraph { rankdir=\"TB\";" + it.text + "}")
|
|
#show raw.where(lang: "graphLR"): it => render-image("graph mygraph { rankdir=\"TB\";" + it.text + "}")
|
|
#show raw.where(lang: "graphTB"): it => render-image("graph mygraph { rankdir=\"TB\";" + it.text + "}")
|
|
#doc
|
|
#todos
|
|
]
|