Jump to content

Template:Anchor

From Wikibase

Usage: {{anchor|Anchor_name}} creates the link target #Anchor_name on the current page.

Every heading already gets a link target automatically. A heading that mixes text and math is normalised: the $…$ math is dropped (a heading that is ONLY math keeps it), and the characters that cannot appear in a fragment — # < > [ ] | { } — become _. So this needs no template call:

=== Symmetric groups $\mathcal{S}_{n}$ === → [[Page#Symmetric_groups]]

The section's [Copy internal mention] and [Copy URL] use that anchor.

Use this template when you want a different, readable anchor — especially for a math-only heading or a long heading. It wins over the automatic anchor:

=== {{anchor|sign composition}} $\operatorname{sign}(\sigma_1 \circ \sigma_2)$ === → [[Permutation#sign composition]]

The anchor must not contain any of # < > [ ] | { }; prefer _ instead of spaces (the automatic anchors use it). This wiki does not have ParserFunctions, so there is no multi-anchor form: call the template once per anchor.

Place the call at the start of the heading (=== {{anchor|Name}}Heading ===) or at the start of the section body on the same line as the text. A call alone on its own line produces an empty paragraph.