add function documentation and citation file changing

This commit is contained in:
2025-09-24 13:37:44 +02:00
parent a446bce8e6
commit 3d183b8673
4 changed files with 83 additions and 27 deletions

View File

@@ -1,6 +1,13 @@
#let todos = state("todos", "0");
#let is_prod = state("is_prod", "false");
// Set a build profile.
//
// This can be:
// - debug (debug comments and todos are displayed)
// - release (document will be ready for release)
//
// - profile (str): The target profile
#let profile(profile) = {
let profiles = ("debug", "release");
if profile not in profiles {
@@ -33,13 +40,19 @@
}
}
#let todo(content, do_highlight: true) = {
// Sets an item that should be done later.
//
// This will cause an error when compiling with a release profile.
//
// - content (str): What should you do?
// - accent (bool): Whether to highlight the todo
#let todo(content, accent: true) = {
context {
todos.update(todos => {
str(eval(todos) + 1)
});
}
if do_highlight {
if accent {
highlight(text(content, fill: white), fill: red, radius: .25em, extent: .25em);
} else {
text(content);