Template:Footnote: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
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>
{{#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>
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.


{{#ifeq:{{{1}}}|main|<sup id="footnote_inline_{{{2}}}{{#ifeq:{{{3}}}|1||_{{{3}}}}}">''[[#footnote_note_{{{2}}}|{{{2}}}]]''</sup>}}{{#ifeq:{{{1}}}|note|<sup id=footnote_note_{{{2}}}>''{{#ifeq:{{{3}}}|1|[[#footnote_inline_{{{2}}}|{{{2}}}]]|{{{2}}}}}''</sup><small>{{{4}}}</small>}}
==Usage==
<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!}}
</noinclude>
</noinclude>

Revision as of 15:48, March 23, 2009

This is a template that emulates the function of the <ref> and <references/> 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.

Usage

{{footnote|main|1}}

Will create 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;}}. This should be used in the main text to provide a link to the footnote.

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

Will create this:
1 - Example Footnote
This should be used in a list of notes after the main text of an article or paragraph.

Example

Lorem Ipsum

Lorem Ipsum§

Lorem ipsum dolor sit amet(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** in voluptate velit esse cillum dolore eu fugiat nullaA pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborumMario.








Notes

§ - This is an image.
(1) - Lorem Ipsum
Mario - JP: マリオ
** - Example Text
A - Help!