This commit is contained in:
Constantin Gierczak--Galle 2024-09-15 14:45:24 +02:00
parent 5a54954adb
commit d29ba21416
No known key found for this signature in database
3 changed files with 48 additions and 0 deletions

10
epi.typ Normal file
View file

@ -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)
]

38
lib/libepi.typ Normal file
View file

@ -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()
}
}
}

View file