wip
This commit is contained in:
parent
a1a6d7cff8
commit
1b5d007289
5 changed files with 43 additions and 6 deletions
20
lib/general.typ
Normal file
20
lib/general.typ
Normal 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
|
||||
)
|
||||
])
|
|
@ -1,2 +1,3 @@
|
|||
#import "matisse-thesis.typ": *
|
||||
#import "todos.typ": *
|
||||
#import "general.typ": *
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#import "cover.typ": cover
|
||||
#import "abstracts.typ": abstracts
|
||||
#import "todos.typ": todos
|
||||
#import "todos.typ": todos, show-todos
|
||||
|
||||
#let matisse-thesis(
|
||||
// English title, will be used for the document title metadata
|
||||
|
@ -34,7 +34,11 @@
|
|||
body
|
||||
) = {
|
||||
|
||||
if draft { todos() }
|
||||
if draft {
|
||||
todos()
|
||||
} else {
|
||||
show-todos.update(false)
|
||||
}
|
||||
|
||||
// ---------- GENERAL ----------
|
||||
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
#let todo-list = state("todo-list",())
|
||||
#let show-todos = state("show-todos", true)
|
||||
|
||||
#let todo(done: false, content) = context {
|
||||
if (not done) and (show-todos.get()) {
|
||||
#let todo(color: red, content) = context {
|
||||
if show-todos.get() {
|
||||
let todonum = todo-list.get().len() + 1
|
||||
text(weight: "bold", fill: red, [TODO n°#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),))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
keywords-fr: keywords-fr,
|
||||
abstract-en: abstract-en,
|
||||
abstract-fr: abstract-fr,
|
||||
draft: true,
|
||||
draft: true,
|
||||
)
|
||||
|
||||
// Preamble
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue