Merge branch 'main' of git.mineau.eu:histausse/template-thesis-matisse
This commit is contained in:
commit
83cf6050bf
3 changed files with 42 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
#import "cover.typ": cover
|
||||
#import "abstracts.typ": abstracts
|
||||
#import "todos.typ": todos, show-todos
|
||||
#import "todos.typ": todos, show-todos, show-notes
|
||||
#import "etablissements.typ": *
|
||||
|
||||
#let matisse-thesis(
|
||||
|
@ -55,6 +55,7 @@
|
|||
todos()
|
||||
} else {
|
||||
show-todos.update(false)
|
||||
show-notes.update(false)
|
||||
}
|
||||
|
||||
// ---------- GENERAL ----------
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
#let todo-list = state("todo-list",())
|
||||
#import "@preview/drafting:0.2.2": inline-note, note-outline, margin-note
|
||||
|
||||
#let show-todos = state("show-todos", true)
|
||||
#let show-notes = state("show-notes", true)
|
||||
|
||||
#let todo(color: red, content) = context {
|
||||
if show-todos.get() {
|
||||
inline-note(par-break: false, stroke: (paint: color, dash: "dashed"))[#text(fill: color)[TODO]: #content]
|
||||
}
|
||||
}
|
||||
|
||||
#let todos() = context {
|
||||
if show-todos.get() or show-notes.get() {
|
||||
note-outline()
|
||||
}
|
||||
}
|
||||
|
||||
#let note(body, dy: auto, ..kwargs) = context {
|
||||
if show-notes.get() {
|
||||
margin-note(body, dy: dy, ..kwargs)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
#let todo-list = state("todo-list",())
|
||||
|
||||
#let todo(color: red, content) = context {
|
||||
if show-todos.get() {
|
||||
|
@ -27,7 +50,20 @@
|
|||
text(size: 2em, weight: "bold", fill:red)[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 locs = query(l)
|
||||
|
||||
assert(
|
||||
locs.len() >= 1,
|
||||
message: "todo '" + t.first() + "' not found: " +
|
||||
repr(t.last()) + " (query(" + repr(l) + ") = " + repr(locs) + ")"
|
||||
)
|
||||
|
||||
if locs.len() >= 1 {
|
||||
list.item(link(l)[TODO n°#t.at(1) p.#locs.first().location().page() : #t.last()])
|
||||
} else {
|
||||
list.item(link(l)[TODO n°#t.at(1) p.??? : #t.last()])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
|
||||
#todo[Write an introduction]
|
||||
|
||||
#note(stroke: aqua + 3pt)[Something to comment about][a note]
|
||||
|
||||
#lorem(200)
|
||||
|
||||
#figure(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue