The template normalises a decay code like β+ into a basic, unambiguous code. That normal code is used to handle the decay mode formatting & properies.
For example, β+ → code b+
In the example:
b+ → b+
Data retrieved for b+:
symbol: β+
en-name: β+ decay
AZ-changes: (A, Z − 1)
Using basic keyboard characters
The code is in basic keyboard characters. This allows the editor to enter a decay name by plain text characters.
a b e g p n + - 2 3 A-Z a-z 0-9 (SF CD IT Ne Mg Si, 24Ne, stable, syn, ...)
dm code normalisation:
No case conversion uc/lc ("SF" nand "β" recognised, but "sf" and "Β" are not recognised)
Decode entitity names (β → β)
Remove '%slink$' ('_link' suffix)
Remove all whitespace
Remove <sup> tags (keep content, like '+', '-')
Replace – (ndash) − (minus) with - (keyboard hyphen)
Replace α with "a", β → "b", ε → "epsi", γ → "g"
The whole string is considered
The whole string is considered. So, not recognised is input:
[[alpha|α]]N,
α (? not sure)N,
<span style="background: yellow;">α</span>N
Letter epsilon is coded "epsi". Also, bare letter "e" stands for "ε". Latin letter "e" only occurns in "e+".
Resulting code is in (US) keyboard characters.
The very same code can be enterd by its keyboard letters:
|code-in=β-
normalises to b-
|code-in=β<sup>-</sup>
normalises to b-
|code-in=β <sup > – </ sup>
normalises to b-
|code-in=b-
normalises to b-
Also recognised: bare alpha, beta, gamma, epsilon
Alternative codes are normalised, and recognised
Note:
Bare Latin letter "e" is not a code, so bare letter "e" code stands for "ε"
Inversely, "e−" only exists with Latin "e", so "e-" is unambiguous.
"stable", "observationally stable", "synthetic" and "trace".
Other values, such as number values like "{{val|1.23|e=7|ul=y}}" (for 1.23×107y), are not recognised. In Infobox uses, such values can be passed through and shown unedited.
|type=hl, na
Decode entitity names (β → β)
Conversion uc to lc ("Stable" → "stable" code)
Remove '%slink$' ('_link' suffix)
Search for code words: "obs", "stable", "syn", "trace"
The rest of the input string is discarded (so: any of these texts in the input will fire as recognised code)
By using these |type=hl, na options, it is prevented that some |dm= input would find "stable" as recognised code (it is not, for dm).
Codes known
58 normal codes (3 Feb 2023)
As of 21:32, 3 February 2023 (UTC)
List as used by |property=verify-code.
|property= lists to be checked against this list (completeness). Normalise does check against this list, returns <blank> when not present ("not a code"). |errormsg=false by default.