Misplaced Pages

:Tutorial (historical)/Editing/sandbox: Difference between revisions - Misplaced Pages

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Misplaced Pages:Tutorial (historical) | Editing Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 22:09, 20 February 2008 view source209.244.43.112 (talk) copying and pasting a guideline page for creation of a diff for a proposed change← Previous edit Revision as of 22:09, 20 February 2008 view source 209.244.43.112 (talk) proposed editNext edit →
Line 20: Line 20:
:''See ] for some template based implementation examples.'' :''See ] for some template based implementation examples.''


# Place a '''&lt;ref>''' ... '''&lt;/ref>''' where you want a footnote reference number to appear in an article—type the text of the note between the ref tags. # Place a '''&lt;ref>''' ... '''&lt;/ref>''' where you want a footnote reference number to appear in an article,directly after a word or punctuation if it is adjoining—type the text of the note between the ref tags.
# Place the '''<nowiki><references /></nowiki>''' tag or '''<nowiki>{{reflist}}</nowiki>''' tag in a "Notes" or "References" section near the end of the article—the list of notes will be generated here. (The choice between {{tl|reflist}} and <nowiki><references /></nowiki> is a matter of style; Misplaced Pages does not have a general rule.) # Place the '''<nowiki><references /></nowiki>''' tag or '''<nowiki>{{reflist}}</nowiki>''' tag in a "Notes" or "References" section near the end of the article—the list of notes will be generated here. (The choice between {{tl|reflist}} and <nowiki><references /></nowiki> is a matter of style; Misplaced Pages does not have a general rule.)



Revision as of 22:09, 20 February 2008

Welcome to this sandbox page, a space to experiment with editing.

You can either edit the source code ("Edit source" tab above) or use VisualEditor ("Edit" tab above). Click the "Publish changes" button when finished. You can click "Show preview" to see a preview of your edits, or "Show changes" to see what you have changed.

Anyone can edit this page and it is automatically cleared regularly (anything you write will not remain indefinitely). Click here to reset the sandbox.

You can access your personal sandbox by clicking here, or using the "Sandbox" link in the top right.Creating an account gives you access to a personal sandbox, among other benefits.

Do NOT, under any circumstances, place promotional, copyrighted, offensive, or libelous content in sandbox pages. Repeatedly doing so WILL get you blocked from editing.

For more info about sandboxes, see Misplaced Pages:About the sandbox and Help:My sandbox. New to Misplaced Pages? See the contributing to Misplaced Pages page or our tutorial. Questions? Try the Teahouse!


Sandbox navigation
Information
Misplaced Pages sandboxes
Template sandboxes
Draft sandboxes
User sandboxes
Module sandboxes
File sandboxes
My sandboxes
Test wikis
Blue tickThis page documents an English Misplaced Pages style guideline.
Editors should generally follow it, though exceptions may apply. Substantive edits to this page should reflect consensus. When in doubt, discuss first on this guideline's talk page.
Shortcuts
"WP:FOOT" redirects here. For You may be looking for Misplaced Pages:WikiProject Football, see WP:FOOT (disambiguation).

A footnote is a note placed at the bottom of an article that expands on a specific portion of the text. The connection between that portion of the text and the corresponding footnote is indicated by a number or symbol in the text.

Footnotes add material that explains a point in greater detail, but that would be distracting if included in the main text.

Footnotes are also used to cite sources. Misplaced Pages:Verifiability, a key content policy, says that any material that is challenged or likely to be challenged, including any contentious material about living people, and all quotations, must have a source. Unsourced or poorly sourced material may be removed from any article, and if it is, the burden of proof is on the editor who wishes to restore it.

Footnotes are one way to cite sources. Alternative methods are embedded links and Harvard referencing (also known as author-date or parenthetical referencing). For more information, see Misplaced Pages:Citing sources, the main style guide on citations.

You can add a footnote to an article by writing your note within <ref> ... </ref> tags, as explained below.

Manual of Style (MoS)

Content
Formatting
Images
Layout
Lists
By topic area
Legal
Arts
Music
History
Regional
Religion
Science
Sports
Related guidelines

How to use

A simplified explanation is given at Help:Footnotes
See Category:Specific source templates for some template based implementation examples.
  1. Place a <ref> ... </ref> where you want a footnote reference number to appear in an article,directly after a word or punctuation if it is adjoining—type the text of the note between the ref tags.
  2. Place the <references /> tag or {{reflist}} tag in a "Notes" or "References" section near the end of the article—the list of notes will be generated here. (The choice between {{reflist}} and <references /> is a matter of style; Misplaced Pages does not have a general rule.)

This page itself uses footnotes, such as the one at the end of this sentence. If you view the Wikicode of this page by clicking "Edit this page", you can see a working example of footnotes. For the purpose of adding references, the more recent cannot be mixed on a page with the old Footnotes3 format—you must pick one or the other. It is possible, however, to use the template system to e.g. separate content notes and references when that is deemed a good idea (this is often the case when content notes must be themselves cited, see, for example, Alcibiades). However, as with all citation styles, consensus should be achieved on the talk page before implementing such a change.

Naming a ref tag so it can be used more than once

To give a footnote a unique identifier, use <ref name="name"> ... </ref>. You can then refer to the same footnote again by using a ref tag with the same name. The name cannot be a number, or the extension will return an error. The ref name need not be placed within quotes unless it consists of more than one word (the wiki parser converts single word quoteless attribute values into validly quoted XHTML).

Named references are used when there are several cases of repetition of exactly the same reference, including the page number for books; they should not be used to cite different pages in the same book. Named references in wikitext serve a purpose similar to loc. cit. or ibid. in printed media. See also cautions in Style below.

Only the first occurrence of text in a named ref will be used, although that occurrence may be located anywhere in the article. You can either copy the whole footnote, or you can use a terminated empty ref tag that looks like this: <ref name="name" />. Such forward-slash-terminated named tags may precede the definition of the named reference.

In the following example, the same source is cited three times.

This is an example of multiple references to the same footnote.<ref name="multiple"/>

Such references are particularly useful when citing sources, if different statements come from the same source.<ref name="multiple">Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</ref>

A concise way to make multiple references is to use empty ref tags, which have a slash at the end.<ref name="multiple">This text is superfluous, and won't show up anywhere. We may as well just use an empty tag.</ref>

== Notes ==

<references />

The text above gives the following result in the article (see also Notes section below):

This is an example of multiple references to the same footnote.

Such references are particularly useful when citing sources, when different statements come from the same source.

A concise way to make multiple references is to use empty ref tags, which have a slash at the end.

One should be particularly careful when deleting a named reference with text content, because the footnote text will be deleted unless it is copied to another ref tag with the same name.

Citation templates

Text placed between <ref> and </ref> may be short notes or full bibliographic references, and may be formatted either by hand or with the assistance of templates. Instructions on available templates to help format bibliographic references may be found at Misplaced Pages:Citation templates. Use of such templates is not required; see WP:CITE.

Previewing a single section edit

When you edit a single section on a long page, the Notes or References section will not be visible when you preview your edits. Thus you ordinarily cannot see how your footnotes (text you place between <ref> and </ref> tags) will later appear when you save your edits.

A simple workaround is to temporarily insert a <references/> or {{reflist}} tag at the bottom of the section you are editing. Your footnotes will appear at the bottom of your section so you can preview them. When you are satisfied with your edits to the section, delete your temporary <references/> or {{reflist}} tag, and save your edits. Now your footnotes should appear in the "Notes" or "References" section along with other footnotes on the page.

While you preview the footnotes in a section this way, the first footnote in the section will temporarily have a number of one (1), because the preview will not show footnotes from elsewhere on the page. The footnotes will renumber properly across the entire article after you save your edited section.

Another complication is that you will not be able to preview the effect of citing a footnote from another section merely by citing its name (for example: <ref name="multiple"/>). If the section you want to edit reuses footnotes from elsewhere on the page, you may have to edit the whole page at once if you need to preview the footnotes accurately.

Style recommendations

  • Do not use Ibid, op. cit. or similar abbreviations in footnotes. Other editors who add new references to the article may not take the time to correct Ibid references broken by their addition. Furthermore, not all readers are familiar with the meaning of the terms. If a reference is reused in more than one footnote, it is preferable to use the format "Smith, Short Title, 182" rather than "Ibid, 182", so as to avoid these problems, or use named references if appropriate.
  • Consider maintaining a separate bibliography/references section that gives full publication details for frequently cited sources, then you only need to cite the author, short title, and page number in specific notes, following Misplaced Pages:Citing sources. For examples of this usage, see Johannes Kepler and Rabindranath Tagore.
  • Internal links and wiki formatting work as normal within the text of the citation, like this: <ref>'']'', ], ].</ref> However, you cannot rely on the "pipe trick" to expand a link for you in ref text; you must type out ], rather than just typing ] and letting the software fill in the text after the pipe. See Help:Pipe_trick#Cite.php_footnotes_and_the_pipe_trick.
  • When citing a website within the ref tags, include a name for the site inside the brackets for the URL. Unnamed URLs appear as numbers, so <ref></ref> results in the footnote being displayed as ; the reader clicks to the numbered footnote only to see another number. Thus, use a name in the link to display the website page title in the reference list, as in this example: <ref></ref> .
  • Avoid using <ref> tags within transcluded templates; they are not numbered correctly. See mw:Extension:Cite/Cite.php#Current_problems, and User:Pengo/pageusingref for an illustration of the issue. Ref tags within transcluded text may also not handle template parameters correctly. Ref tags can be used within template variables, though (for example, {{taxobox}}'s status_ref parameter).
  • References cannot be nested: <ref name="Ran1912">J. Random, 1912. Cited in <ref name="Foo2005"/></ref> does not render correctly.
  • Avoid use of "subst", or at least verify that it works correctly. A Mediawiki bug prevents the expansion of certain (if not all) "subst"'s within refs.

Resizing references

Some editors prefer references to be in a smaller font size than the text in the body of the article. Although smaller text has some disadvantages, it is common when there is a long list of references (as a rule of thumb, at least ten) to replace the basic <references /> tag with {{Reflist}}, which reduces the text size to 90%. (Note: Do not use {{Reflist}} with a "subst:".) The underlying CSS class is "references-small", so an alternative is to use this directly: <div class="references-small"><references /></div>. If this class is used to make other sections at the bottom of the page ("Notes", "See also", "External links", etc.) small for consistency (this is rarely done), the div tags must be opened and closed within each section.

A similar CSS class exists to create small footnotes in two columns, but this displays as a single column in some common browsers (like Internet Explorer). If desired, use <div class="references-2column"><references /></div>

The same effect (with any number of columns) can be accomplished by using {{Reflist|number of columns}}.

Compatibility with other MediaWiki sites

As of late December 2005, the mw:Extension:Cite/Cite.php extension to MediaWiki has been installed on all Wikimedia wikis. Other wikis that use the MediaWiki software may not have this extension installed, and therefore may be unable to display Cite.php footnotes. The Special:Version page on any MediaWiki wiki shows the installed extensions.

Extensions like Cite/Cite.php are installed after installing MediaWiki software; these extension files are placed in the directory wiki/extensions/.

Caution on converting citation styles

An older system using {{ref}} and {{note}} templates is still common. Converting this older system to the new <ref>...</ref> system can make the references in an article easier to maintain.

Converting citation styles should not be done without first gaining consensus for the change on the article's talk page.

A December 2005 ArbCom case ruled that the following scripts could no longer be used by a certain Wikipedian:

Similarly, individual users may be forbidden to "manually convert citation styles on any articles."

So, tread lightly, and seek consensus first, before converting citation styles. For example, when using (semi-)bot tools as listed below:

  • User:Cyde/Ref converter converts articles that use the {{ref}} and {{note}} system into the more recent mw:Extension:Cite/Cite.php system;
  • Citation Tool diagnoses and fixes sequencing and duplication errors in Cite.php references. In the future, Citation Tool may (optionally) enable user-guided conversion of some or all of the <ref> numbered citations to named notes using the footnote3 template technology (which includes Harvard references).

CAUTION: do not edit-war with automated tools that convert in opposing directions.

See also

Notes

  1. This footnote is used as an example in the "How to use" section.
  2. Misplaced Pages Signpost. November 13, 2006.
  3. ^ Remember that when you refer to the same footnote multiple times, the text from the first reference is used. Cite error: The named reference "multiple" was defined multiple times with different content (see the help page).
  4. The Misplaced Pages:Footnote3 system created footnotes with the {{ref}}/{{note}} and the {{ref_label}}/{{note_label}} pairs of templates. The system may be encountered on many Misplaced Pages pages.
  1. Additional references that are not created with <ref> ... </ref> (as per WP:CITE, section 3.5.2) do not continue the numbering. These are mistakes; they should be corrected by converting them to footnotes using "ref" tags.
Categories: