From d29ba21416ec45e63da1644c89d8e92ef19178c5 Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Sun, 15 Sep 2024 14:45:24 +0200 Subject: [PATCH] Baseline --- epi.typ | 10 ++++++++++ lib/libepi.typ | 38 ++++++++++++++++++++++++++++++++++++++ notices/défonçeuse.toml | 0 3 files changed, 48 insertions(+) create mode 100644 epi.typ create mode 100644 lib/libepi.typ create mode 100644 notices/défonçeuse.toml diff --git a/epi.typ b/epi.typ new file mode 100644 index 0000000..69542ec --- /dev/null +++ b/epi.typ @@ -0,0 +1,10 @@ +#import "lib/libepi.typ" + +#let fiches = ( + libepi.card(name: "Défonçeuse", instructions: "", protection_items: []), + libepi.card(name: "Perceuse à colonne", instructions: "", protection_items: []), +) + +#show: doc => [ + #libepi.generate_cards(fiches) +] diff --git a/lib/libepi.typ b/lib/libepi.typ new file mode 100644 index 0000000..8b8bb54 --- /dev/null +++ b/lib/libepi.typ @@ -0,0 +1,38 @@ +#let dummy(truc) = [truc] + +// Builds a card from arguments +#let card(name: none, protection_items: [], referent: "Pas de referent", +instructions: none, note: none) = { + ( + name: name, + protection_items: protection_items, + referent: referent, + instructions: instructions, + note: note + ) +} + +// Define bindings for al protection equipment items +#let Hearing = "OBLIGATION/OBLIGATION-casque-antibruit.pdf" +#let Helmet = "OBLIGATION/OBLIGATION-casque.pdf" +#let Glasses = "OBLIGATION/OBLIGATION-lunettes.pdf" +#let Shield = "OBLIGATION/OBLIGATION-visiere.pdf" +#let Gloves = "OBLIGATION/OBLIGATION-gants.pdf" +#let Mask = "OBLIGATION/OBLIGATION-protection-voies-respiratoires.pdf" + +#let generate_single_card(card) = { + text(size: 14pt)[#card.name] +} + +#let generate_cards(cards) = { + let total_cards = cards.len() + let index = 0 + for card in cards { + generate_single_card(card) + index += 1 + if index != total_cards { + // Newpage + pagebreak() + } + } +} diff --git a/notices/défonçeuse.toml b/notices/défonçeuse.toml new file mode 100644 index 0000000..e69de29