This commit is contained in:
Jean-Marie Mineau 2025-06-12 11:51:21 +02:00
parent a1a6d7cff8
commit 1b5d007289
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
5 changed files with 43 additions and 6 deletions

20
lib/general.typ Normal file
View file

@ -0,0 +1,20 @@
// ------------ SYMBOLS/ABBREVIATIONS ------------
#let ie = [_i.e._,]
#let eg = [_e.g._,]
#let etc = [_etc._]
#let etal = [_et al._]
// ------------ FORMATING ------------
#let paragraph(title) = [#title #h(1em)]
#let epigraph(attribution, body) = align(right, box(width: 50%)[
#set align(left)
#quote(
block: true,
attribution: attribution,
body
)
])

View file

@ -1,2 +1,3 @@
#import "matisse-thesis.typ": * #import "matisse-thesis.typ": *
#import "todos.typ": * #import "todos.typ": *
#import "general.typ": *

View file

@ -2,7 +2,7 @@
#import "cover.typ": cover #import "cover.typ": cover
#import "abstracts.typ": abstracts #import "abstracts.typ": abstracts
#import "todos.typ": todos #import "todos.typ": todos, show-todos
#let matisse-thesis( #let matisse-thesis(
// English title, will be used for the document title metadata // English title, will be used for the document title metadata
@ -34,7 +34,11 @@
body body
) = { ) = {
if draft { todos() } if draft {
todos()
} else {
show-todos.update(false)
}
// ---------- GENERAL ---------- // ---------- GENERAL ----------

View file

@ -1,10 +1,22 @@
#let todo-list = state("todo-list",()) #let todo-list = state("todo-list",())
#let show-todos = state("show-todos", true) #let show-todos = state("show-todos", true)
#let todo(done: false, content) = context { #let todo(color: red, content) = context {
if (not done) and (show-todos.get()) { if show-todos.get() {
let todonum = todo-list.get().len() + 1 let todonum = todo-list.get().len() + 1
text(weight: "bold", fill: red, [TODO #todonum #label("todo-"+str(todonum)): #content])
box(
text(font: "DejaVu Sans Mono", white, size: .5em)[
TODO #todonum #label("todo-"+str(todonum))
],
inset: 3pt, fill: color,
)
text(weight: "bold", fill: color)[
#box(text($triangle.filled.r$, size: .8em), baseline: -.8mm)
_ #content _
#box(text($triangle.filled.l$, size: .8em), baseline: -.8mm)
]
todo-list.update(x => x + (("todo-"+str(x.len()+1),x.len()+1, content),)) todo-list.update(x => x + (("todo-"+str(x.len()+1),x.len()+1, content),))
} }
} }