Template:Footnote: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#ifeq:{{{1}}}|main|<sup id="footnote_inline_{{{2}}}">''[[#footnote_note_{{{2}}}|{{{2}}}]]''</sup>}}{{#ifeq:{{{1}}}|note|<sup id="footnote_note_{{{2}}}">''[[#footnote_inline_{{{2}}}|{{{2}}}]]''</sup><small> - {{{3}}}<br/></small>}}<noinclude>
{{#switch:{{{1}}}
This is a template that emulates the function of the <nowiki><ref> and <references/></nowiki> tags. It can sometimes be preferable to ''actual'' ref tags since it allows multiple lists of footnotes in a single article, while the ref tags do not. In an article where only one list of footnotes is needed, ref tags are usually preferable.
|main=<sup id="footnote_inline_{{{2}}}">''[[#footnote_note_{{{2}}}|<span style="color:{{{3|unset}}}">{{{2}}}</span>]]''</sup>
|note=<sup id="footnote_note_{{{2}}}">''[[#footnote_inline_{{{2}}}|{{{2}}}]]''</sup>{{#if:{{{3|}}}|<small> - {{{3}}}</small><br>}}
}}<noinclude>
This is a template that emulates the function of the <code><nowiki><ref></nowiki></code> and <code><nowiki><references/></nowiki></code> tags. Although this template is commonly used on the wiki to create a list of notes, it is also possible to have multiple lists of footnotes in a single article by using [[mw:Help:Cite#Grouped references|grouped references]].


==Usage==
==Usage==
===Main text===
Use the following syntax to create a tag in the '''main''' article text to provide a link to the footnote:
<pre>{{footnote|main|1}}</pre>
<pre>{{footnote|main|1}}</pre>
Will create a footnote tag like this: {{footnote|main|1}}
Note that the one can be virtually anything, although some characters may need to be escaped. For example, {{footnote|main|&#91;1&#93;}} is escaped as ''<nowiki>{{footnote|main|&#&zwj;91;1&#&zwj;93;}}</nowiki>''.  This should be used in the main text to provide a link to the footnote.
<pre>{{footnote|note|1|Example Footnote}}</pre>
Will create this: <br/>
{{footnote|note|1|Example Footnote}}
This should be used in a list of notes after the main text of an article or paragraph.
==Example==
===Lorem Ipsum===
[[Image:Example.png|thumb|right|Lorem Ipsum{{footnote|main|§}}]]
Lorem ipsum dolor sit amet{{footnote|main|(1)}}, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit{{footnote|main|**}} in voluptate velit esse cillum dolore eu fugiat nulla{{footnote|main|A}} pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum{{footnote|main|Mario}}.
===Notes===
{{footnote|note|§|This is an image.}}
{{footnote|note|(1)|[[wikipedia:Lorem Ipsum|Lorem Ipsum]]}}
{{footnote|note|Mario|JP: マリオ}}
{{footnote|note|**|Example Text}}
{{footnote|note|A|Help!}}


This will produce a footnote tag like this: {{footnote|main|1}}


Note that the one can be virtually anything, although some characters may need to be escaped (for example, {{footnote|main|&#91;1&#93;}} is escaped as <code><nowiki>{{footnote|main|&#&zwj;91;1&#&zwj;93;}}</nowiki></code>). The color of the link can be changed by setting an optional third parameter.


===Note list===
Use the following syntax to create a note list after the main text of an article or paragraph:


<pre>{{footnote|note|1|Example footnote}}</pre>


This will produce the actual footnote like this:


{{footnote|note|1|Example footnote}}


==Example==
===Super Mario Wiki===
[[File:Mariowiki.png|thumb|right|Super Mario Wiki logo{{footnote|main|§}}]]


The Super Mario Wiki is a wiki about the Mario series and its related series, Wario, Yoshi, Donkey Kong, and Super Smash Bros.{{footnote|main|(1)}} It has many articles, such as Super Mario Bros., Super Mario World, New Super Mario Bros., Bowser, Extra Life, Goomba and much more.{{footnote|main|**}} In most of these games, such as New Super Mario Bros., the plumber Mario saves Princess Peach from Bowser, who is the main antagonist. There are over 15000 files uploaded, 90,000,000 page views, 7000 users and 16 administrators (though a few are inactive).{{footnote|main|A}} The wiki was created on August 12th, 2005 by Porplemontage, and is now a very vibrant wiki – sustaining over 1000 edits a day.{{footnote|main|Mario}} A person must create an account to edit or create new articles.


===Notes===
{{footnote|note|§|This is an image.}}
{{footnote|note|(1)|[[Super Smash Bros. (series)]]}}
{{footnote|note|Mario|JP: マリオ}}
{{footnote|note|**|Example text}}
{{footnote|note|A|Help!}}


</noinclude>
[[Category:Formatting templates]]</noinclude>

Latest revision as of 12:08, June 9, 2024

This is a template that emulates the function of the <ref> and <references/> tags. Although this template is commonly used on the wiki to create a list of notes, it is also possible to have multiple lists of footnotes in a single article by using grouped references.

Usage

Main text

Use the following syntax to create a tag in the main article text to provide a link to the footnote:

{{footnote|main|1}}

This will produce a footnote tag like this: 1

Note that the one can be virtually anything, although some characters may need to be escaped (for example, [1] is escaped as {{footnote|main|&#‍91;1&#‍93;}}). The color of the link can be changed by setting an optional third parameter.

Note list

Use the following syntax to create a note list after the main text of an article or paragraph:

{{footnote|note|1|Example footnote}}

This will produce the actual footnote like this:

1 - Example footnote

Example

Super Mario Wiki

Super Mario Wiki logo
Super Mario Wiki logo§

The Super Mario Wiki is a wiki about the Mario series and its related series, Wario, Yoshi, Donkey Kong, and Super Smash Bros.(1) It has many articles, such as Super Mario Bros., Super Mario World, New Super Mario Bros., Bowser, Extra Life, Goomba and much more.** In most of these games, such as New Super Mario Bros., the plumber Mario saves Princess Peach from Bowser, who is the main antagonist. There are over 15000 files uploaded, 90,000,000 page views, 7000 users and 16 administrators (though a few are inactive).A The wiki was created on August 12th, 2005 by Porplemontage, and is now a very vibrant wiki – sustaining over 1000 edits a day.Mario A person must create an account to edit or create new articles.

Notes

§ - This is an image.
(1) - Super Smash Bros. (series)
Mario - JP: マリオ
** - Example text
A - Help!