From 02a28b22724dfff30b27e9fe50273e9fac21867a Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Sun, 15 Sep 2024 15:31:36 +0200 Subject: [PATCH] More special cases --- lib/libepi.typ | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/libepi.typ b/lib/libepi.typ index 649de79..92d8ba1 100644 --- a/lib/libepi.typ +++ b/lib/libepi.typ @@ -1,7 +1,8 @@ #let dummy(truc) = [truc] // Builds a card from arguments -#let card(name: none, protection_items: (), forbidden_items: (), referent: "Pas de referent", +#let card(name: none, protection_items: (), forbidden_items: (), referent: +none, instructions: none, note: none, min_help: 0) = { ( name: name, @@ -33,13 +34,21 @@ instructions: none, note: none, min_help: 0) = { #text(size: 40pt, weight: "bold")[#card.name] ] [ - #text(size: 20pt)[Référent·es: #card.referent] + #if card.referent != none [ + #text(size: 20pt)[Référent·es: #card.referent] + ] else [ + #text(size: 20pt)[Référent·es: #text(style: "italic")[Demander à un·e respo]] + ] ] linebreak() [ #let plural = if card.min_help > 0 [s] else [] - #text(size: 20pt)[Utilisation: au moins - #text(weight: "bold")[#str(card.min_help + 1)] personne#plural] + #if card.min_help > 0 [ + #text(size: 20pt)[Utilisation: au moins + #text(weight: "bold")[#str(card.min_help + 1)] personne#plural] + ] else [ + #text(size: 20pt)[Utilisation: peut s'utiliser seul·e] + ] ] linebreak() linebreak()