hackens-epi/lib/libepi.typ

38 lines
984 B
Typst

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