Help:Footnotes: Difference between revisions
m →<ref>: rm comment from source article |
m →Synopsis: rm techno babble |
||
Line 5: | Line 5: | ||
== Synopsis == |
== Synopsis == |
||
* <code><ref[ name=["''id''"|''id'']]>Reference text</ref></code> |
* <code><ref[ name=["''id''"|''id'']]>Reference text</ref></code> |
||
*: the quotes are only needed if ''id'' contains |
*: the quotes are only needed if ''id'' contains spaces. |
||
* <code><ref name=["''id''"|''id'']/></code> |
* <code><ref name=["''id''"|''id'']/></code> |
||
*: repeated use of same reference may be done as before or in this format with no need to repeat the reference text. In this case the ID is mandatory. |
*: repeated use of same reference may be done as before or in this format with no need to repeat the reference text. In this case the ID is mandatory. |
Revision as of 20:18, 15 April 2006
- This page gives general documentation valid for all MediaWiki installations which use the cite extension. For use of this feature in the English Wikipedia see w:Wikipedia:Footnotes. That page also includes more examples.
Synopsis
<ref[ name=["id"|id]]>Reference text</ref>
- the quotes are only needed if id contains spaces.
<ref name=["id"|id]/>
- repeated use of same reference may be done as before or in this format with no need to repeat the reference text. In this case the ID is mandatory.
<references/>
<ref>
<ref>
defines inline citations that are collected for later insertion in the page using <references>
. For instance, try typing the following in an edit box and clicking "Save page":
AIDS is a collection of symptoms and infections resulting from the specific damage to the immune system caused by infection with the human immunodeficiency virus (HIV).
<ref name=Marx>Marx, J. L. New disease baffles medical community. Science. 1982;217(4560):618–621.</ref>
Most researchers believe that HIV originated in sub-Saharan Africa
<ref name=NYT>''New York Times''. [[January 14]], [[2010]] issue, page 16</ref>
; it is now a global epidemic. Some authorities<ref>UNAIDS</ref>
estimate that AIDS has killed more than 25 million people since it was first recognized on December 1, 1981, making it one of the most destructive epidemics in recorded history. The folks at the NYT are worried sick about this.<ref name=NYT/>
will result in the following text on the article page:
AIDS is a collection of symptoms and infections resulting from the specific damage to the immune system caused by infection with the human immunodeficiency virus (HIV).[1]
Most researchers believe that HIV originated in sub-Saharan Africa;[2] it is now a global epidemic. Some authorities[3] estimate that AIDS has killed more than 25 million people since it was first recognized on December 1, 1981, making it one of the most destructive epidemics in recorded history. The folks at the NYT are worried sick about this.[2]
Note that references may be cited more than once using <ref name=/>
. In the example above, the New York Times article is cited twice. In the second instance, instead of typing out the full reference (<ref name=NYT>''New York Times''. [[January 14]], [[2010]] issue, page 16</ref>
), one may simply use <ref name=NYT/>
. Be careful not to forget the /
.
<references>
Placing <references>
inserts the full text of all pending inline citations defined by <ref>
, anywhere on the page. For example, based on the citations above, the code:
<references/>
will yield:
Links to other help pages
- Help contents
- Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · Wikidata · MediaWiki · Wikibooks · Wikisource · MediaWiki: Manual · Google
- Versions of this help page (for other languages see further)
- What links here on Meta or from Meta · Wikipedia · MediaWiki
- Reading
- Go · Search · Namespace · Page naming · Section · Backlinks · Redirect · Category · Image page · Special pages · Printing
- Tracking changes
- Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
- Logging in and preferences
- Logging in · Preferences
- Editing
- Starting a new page · Advanced editing · Editing FAQ · Export · Import · Shortcuts · Edit conflict · Page size
- Referencing
- Links · URL · · Footnotes
- Style and formatting
- Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · Lists · Table · Sorting · Colors · Images and file uploads
- Fixing mistakes
- Show preview · Reverting edits
- Advanced functioning
- Expansion · Template · Advanced templates · Parser function · Magic words · System message · Substitution · Arrays · Expr parser function syntax · Transclusion
- Others
- Special characters · Renaming (moving) a page · Preparing a page for translation · Talk pages · Signatures · Sandbox · Legal issues for editors