Template:Invisible reference
This template uses block elements, e.g. See H:DIVSPAN for details. |
This template can be used to add footnotes at the bottom of a page.
Under the hood, it uses a reference tag, which is wrapped inside a div styled with display: none;
to prevent it from showing.
It is especially useful for adding footnotes for poems wrapped inside a
<poem></poem>
This is because, if you transcribe footnotes inside a poem block, the Poem extension will automatically convert newlines in wikitext into newlines in the footnotes, which is often undesirable.
Do note that, if you're using this in the Page namespace, the template should go in the main content, not in the header or footer (since, when the page is transcluded, this template must be transcluded as well for the footnotes to work in mainspace.)
Usage
[edit]As an example:
<poem>
Lorem ipsum<ref name = "example"/> dolor sit amet,
:Consectetur<ref name = "example2"/> adipiscing elit,
Sed do euismod tempor incididunt<ref name = "example3"/>,
:Ut labore et dolore magna aliqua.
</poem>
{{invisible reference|example|abcd}}
{{invisible reference|example2|efgh}}
{{invisible reference|example3|ijkl}}
{{smallrefs}}
produces the following:
Lorem ipsum[1] dolor sit amet,
Consectetur[2] adipiscing elit,
Sed do euismod tempor incididunt[3],
Ut labore et dolore magna aliqua.