wml::std::label(3)
π wml::std::label π β Labels and References
okay bestie, welcome to the wml::std::label(3) page from the EN Tools manual π
this one is genuinely so useful and I need you to lock in for like two minutes, k?
β¨ NAME β¨
wml::std::label β Labels and References π·οΈπ
β¨ SYNOPSIS β¨
#use wml::std::label auxfile=NAME
<label name "Label Section">
<ref name>
like. that's it. that's the whole vibe check. π
β¨ DESCRIPTION β¨
So this module implements a whole mechanism of labels and references β which, no cap, is exactly what it sounds like. Labels get defined via variables, and then those variables get expanded with the <ref> tag. Iconic behaviour, honestly. π
But here's the little plot twist that lowkey ruins everything if you don't handle it: a super common problem is when labels get referenced before they are defined. π Because obviously the <ref> goes looking for a variable that literally does not exist yet. Messy.
So for this reason β this is the whole reason the module works the way it does β labels are stored in an auxiliary file. π¦
Here's the flow, bestie, step by step:
- When the module is loaded, this file is read and labels are defined. π
- Then input is processed. βοΈ
- At end of input, labels are compared with their previous value. π
- If some labels changed, then all labels are written to the auxiliary file and a message is printed to warn that labels are wrong. π¨
so yeah β that warning message is not me being dramatic, it literally means the labels are wrong and you probably need another pass. it's giving "two-pass build" energy. iykyk. π₯
β¨ AUTHOR β¨
This masterpiece was brought to you by Denis Barbier π β hit them up at barbier@engelschall.com π«Ά
β¨ REQUIRES β¨
- Internal:
P2,P3,P4 - External:
--
and that's the page, bestie!! πβ¨ we're out here reading wml::std::label(3) from the EN Tools collection, dated 2020-11-29, and honestly? she ate. π
go build something cute, mwah ππ¦
π¦ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms