Wikipedia:Advanced footnote formatting: Difference between revisions

Content deleted Content added
See also: wl corrections
m <syntaxhighlight lang="wikitext">
 
(10 intermediate revisions by 8 users not shown)
Line 1:
{{Historical|brief=yes|comment=[[H:PREGROUP|Predefined grouping]], such as {{tl|efn}} and {{tl|notelist}}, is the currently preferred and recommended way of adding footnotes.}}
{{essay}}
{{nutshell|[[#Remote footnotes|Remote footnotes]] can be added for pronunciations or examples. Footnotes can be [[#Indenting and line-splitting|indented, line-split]] & shortened by [[#Deferring details|deferring details]] into References or External links. Due to a WP quirk, the 1st footnote on a page might not indent properly. Note each website and beware [[wp:BLACKLIST]] sites.}}
Line 8 ⟶ 9:
__TOC__
Also, indentation and line-splitting can be used, such as for long URL webpage names, when coding footnotes in an article. For example:
<syntaxhighlight lang="wikitext">
<pre>
In [[digital imaging]], a pixel<ref>
Rudolf F. Graf, ''Modern Dictionary of Electronics'',
Line 14 ⟶ 15:
Google Books (''see below:'' References).</ref>
(or picture element) is the smallest part of an image.
</syntaxhighlight>
</pre>
In the above example, each part of the ref-tag footnote is indented (3 spaces) from the left margin. Due to a Wikipedia quirk, the first footnote on a page cannot be indented, because it is treated as a quotebox.
 
Line 22 ⟶ 23:
Many terms could use a remote footnote, not cluttering the upper text of page, such as for explaining pronunciations or showing some detailed examples:
::The term "time dilation"<sup>[[#Notes|[p]&nbsp;]]</sup> refers to a slowing of elapsed duration.
::<div style="font-size:89%">'''Notes'''<br />&nbsp; &nbsp;<small>[p]</small> – ''Dilation'' is pronounced "dy-LAY-shun".</div>
Note that in the pronunciation footnote [p], the word "time" is considered obvious, and the syllables for "dy-LAY-shun" are shown with capital letters for emphasis, but there is also ample space to show the [[International Phonetic Alphabet|IPA]]-format within the same footnote as well.
 
The footnote's superscript <small>"[p]"</small> can be coded by just a short wikilink: <nowiki><sup>[[#Notes|[p]&nbsp;]]</sup></nowiki>. The full, detailed content of that footnote text is not at the top of the article but, instead, is coded within the section named "Notes", thus shifting all that text into the Notes section, and deferring details away from the main text of an article. The ''Notes'' section could be coded as:
<sourcesyntaxhighlight lang="htmlwikitext">
==Notes==
<div style="font-size:89%">
Line 32 ⟶ 33:
</div>
<references/><!--Show numbered footnotes from <ref> tags. -->
</syntaxhighlight>
</source>
 
Since the actual footnote text (of a remote footnote) is written at the bottom of an article page, there is ample space to also compare formal versus local pronunciations of town names, without cluttering an article's top text.
Line 47 ⟶ 48:
An example (of footnotes within footnotes) would be:
::The term "time dilation"<sup>[[#Notes|[p] ]]</sup> refers to a slowing of elapsed duration.
::<div style="font-size:89%">'''Notes'''<!-- --><br>&nbsp; &nbsp;<small>[p]</small> – The word ''dilation'' is pronounced "dy-LAY-shun" [[#Notes|<sup>[a]</sup>]] and is the preferred term.[[#Notes|<sup>[b]</sup>]]<!-- --><br>&nbsp; &nbsp;<small>[a]</small> – Merriam-Webster <!-- -->Dictionary lists "dilation" with pronunciation: <!-- -->\dī-'lā-shən\.<sup>[<span></span>[[#Notes|c]]]</sup><!-- --><br>&nbsp; &nbsp;<small>[b]</small> – The term <!-- -->''"[[time dilation]]"'' has been used since 1934 but <!-- -->is sometimes called "time dilatation".<!-- --><sup>[<span></span>[[#Notes|d]]]</sup><!-- --><br>&nbsp; &nbsp;<small>[c]</small> – ''Merriam-Webster <!-- -->Online Dictionary'', 2009, webpage: [http://www.<!--
::<div style="font-size:89%">'''Notes'''<!--
-->merriam-webster.com/dictionary/dilation MW-dilation].<!-- --><br>&nbsp; &nbsp;<small>[pd]</small> – The word ''dilation''Merriam-Webster <!-- is pronounced "dy-LAY-shun" [[#Notes|<sup>[a]</sup>]]Online andDict.'', is2009, thewebpage: preferred term.[[#Notes|<sup>[b]<http:/sup>]]/www.merriam-<!--
--><br>&nbsp; &nbsp;<small>[a]</small> – Merriam-Webster <!--
-->Dictionary lists "dilation" with pronunciation: <!--
-->\dī-'lā-shən\.<sup>[<font></font>[[#Notes|c]]]</sup><!--
--><br>&nbsp; &nbsp;<small>[b]</small> – The term <!--
-->''"[[time dilation]]"'' has been used since 1934 but <!--
-->is sometimes called "time dilatation".<!--
--><sup>[<font></font>[[#Notes|d]]]</sup><!--
--><br>&nbsp; &nbsp;<small>[c]</small> – ''Merriam-Webster <!--
-->Online Dictionary'', 2009, webpage: [http://www.<!--
-->merriam-webster.com/dictionary/dilation MW-dilation].<!--
--><br>&nbsp; &nbsp;<small>[d]</small> – ''Merriam-Webster <!--
-->Online Dict.'', 2009, webpage: [http://www.merriam-<!--
-->webster.com/dictionary/time+dilation MW-time+dilation].</div>
 
Line 75 ⟶ 64:
 
<div style="width:auto; overflow:scroll">
<sourcesyntaxhighlight lang="xml+jinjawikitext">
In [[digital imaging]], a '''pixel'''<ref>{{Cite book
| author=Rudolf Graf | date=1999
Line 88 ⟶ 77:
-->GIDA&sig=7tg-LuGdu6Njypaawi2bbkeq8pw }}</ref>
(or picture element) is the smallest part of an image.
</sourcesyntaxhighlight></div>
Note the above line-splitting of the 6-line URL (for the webpage in Google Books) uses the [[HTML]] comment tokens "&lt;!--" and "-->". Each part of the footnote coding is placed on a separate line, thereby allowing each part to be indented from the lefthand side. There must be no spaces added to the URL (which is a single string of characters where spaces are coded "%20"). Do not add spaces before "&lt;!--" or after "-->" within the URL. However, when splitting an ''italicized phrase'' or long wikilink ("<nowiki>[[xx xx xx]]</nowiki>"), consider putting a space after "-->" on the 2nd line.
 
Line 98 ⟶ 87:
Because of a Wikipedia formatting quirk, the first footnote on a page might be treated as a quotebox when indented (as during May 2009). However, the indentation can be simulated, by line-splitting with HTML comments, between all lines within &lt;ref>....&lt;/ref>:
 
<sourcesyntaxhighlight lang="xmlwikitext" style="text-size:70;">
In digital imaging, a pixel<ref><!--
-->R. Graf, ''Modern Dictionary of<!--
Line 105 ⟶ 94:
-->Google Books (see: References).</ref>
(or picture element) is the smallest part of an image.
</syntaxhighlight>
</source>
 
The above line-splitting of the entire footnote text, into 4 lines, allows it to be coded as the first footnote of a page. Note that the first footnote might be in an infobox, appearing at the top of a page.
 
==Page numbers==
Although the issue of citing page numbers might not seem very advanced, many Wikipedia footnotes to books or journals have omitted the page numbers. Without specific page numbers, the verification of text can be extremely tedious for large books or magazines, like finding a [[wikt:needle in a haystack|needle in a haystack]]. In the [[wp:CS1]] cite templates, there is often confusion between the parameters "page=15" and "pages=750":
:* <code>page=15</code> &nbsp; or &nbsp; <code>pages=79–81</code> &nbsp; – the specific page(s) in the book/journal/etc.
:* <code>page=page 15</code> &nbsp; – show "page 15" in the footnote.
Line 120 ⟶ 109:
==Deferring details==
Another major technique for clarifying text, containing many footnotes, is to defer the footnote details to later parts of the article, such as using named ref-tags and putting "see: External links" for URLs. For example, listing 3 footnotes:
<sourcesyntaxhighlight lang="xmlwikitext">
In digital imaging, a pixel<ref name=MD/><ref name=AD/><ref name=DE/>
(or picture element) is the smallest part of an image. The word
Line 132 ⟶ 121:
Disco Dave Citizen, ''Disco Electronics Dictionary'',
1978, page 340 (''see below:'' External links).</ref>
</syntaxhighlight>
</source>
In the above example, the 3 footnotes are reduced to just short ref-name tags at first, then later expanded to show more details. However, they defer the extreme details for publisher, ISBN, and webpage-URL links to be contained as entries under "External links". Using that advanced method, no publisher names, ISBN numbers or long URL names appear in the upper article text for those 3 footnotes.
 
Line 149 ⟶ 138:
 
== See also ==
* [[Wikipedia:Citation templates]] – about [[Template:Cite_web]],{{tl|cite web}} etc.
* [[Help:Footnotes]] – help page about footnotes
* [[Wikipedia:Manual of Style/Layout]] – the guideline for article format