Hello,
I am writing my first Typst document. And here is what I have in my main.typ:
[...]
#let cas_limite_font = "Linux Biolinum O"
#show "impossible de gagner": set text(font: cas_limite_font)
#show "déjà gagné": set text(font: cas_limite_font)
[...]
The document then compiles to (excerpt):
How can I “factorise” set text(...) for a specific list of texts ?
Best regards,
@ensko wrote a great post about this topic here:
Using that post as a guide, something like this should work for your case:
#let words = ("ipsum", "sit")
#show regex(words.join("|")): set text(red)//Change font here
#lorem(10)
3 Likes