Wiktenauer logo.png

Template:Wikicite

From Wiktenauer
Revision as of 02:21, 23 September 2012 by Michael Chidester (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{{reference}}}

[edit] [history] [purge] Documentation icon Template documentation

{{Wikicite}} makes a simple reference, for use in a "References" section for books, journals, web references, etc. The reference text is formatted manually, and the template merely adds an anchor for linking from in-text citations.

Usage

Cut-'n'-paste:

{{Wikicite | id= | reference= }}

or, alternatively

{{Wikicite | ref= | reference= }}

The |id= or |ref= parameters are alternative unique identifiers used for the reference link on the page, compatible with some other reference templates. If both |id= and |ref= are provided, |id= is ignored. There are two differences between these:

  • |id= automatically prefixes the link anchor with "Reference-", whereas |ref= does not
  • |id= encloses the link anchor in double quotes, so these must not be provided by the editor; but if using |ref=, the specified content for this parameter must be enclosed in quotes unless it consists entirely of letters, figures, hyphens and periods. If it contains any other character - such as a blank or underscore - it must be quoted. (e.g., a ref anchor of Von Autor-2006 must be specified as |ref="Von Autor-2006")

Thus, these two forms

{{Wikicite | id=Anchor 1 | reference=Reference text }}
{{Wikicite | ref="Reference-Anchor 1" | reference=Reference text }}

produce identical results.

The |reference= parameter is the actual reference text. It may be plain text, formatted text, or one of the citation templates.

Examples

Recommended format (using the |id= parameter for illustration):

* {{Wikicite | id= Atwood-2003 | reference= Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. ISBN 0-7710-0868-6. }}

Result:

  • Atwood, Margaret (2003). Oryx and Crake, Toronto: McClelland & Stewart. ISBN 0-7710-0868-6.

Resulting code:

<li><span class="citation wikicite" id="Reference-Atwood-2003">Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. <a href="/w/index.php?title=Special:Booksources&isbn=0771008686" class="internal">ISBN 0-7710-0868-6</a>.</span></li>

This includes the HTML <span class="citation wikicite" id="Reference-Atwood-2003">, allowing you to link to the citation in your article's text with, for example [[#Reference-Atwood-2003 |(Atwood 2003)]], yielding a Harvard-style reference (Atwood 2003).

This is typically linked to in the article body from a shortened footnote in this form: <ref>[[#Reference-Atwood-2003| Atwood (2003)]]</ref>

This can be linked from {{Harv}} family templates if the |ref= parameter is used in combination with the {{Harvid}} template, as in the following example:

* {{Wikicite | ref= {{Harvid|Atwood|2003}} | reference= Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. ISBN 0-7710-0868-6. }}

Resulting code:

<li><span class="citation wikicite" id="CITEREFAtwood2003">Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. <a href="/w/index.php?title=Special:Booksources&isbn=0771008686" class="internal">ISBN 0-7710-0868-6</a>.</span></li>

Features

  • Compatible with any reference style: editor has 100% control of the format through a technology called editing wikitext

Technical features:

  • Produces well-formed, accessible, semantically-correct HTML code
  • Compatible many other templates' in-text citation links (any id which starts with "Reference-")
  • Complies with WP:AUM
  • No conditionals
  • No CSS hacks

Alternatives

Note that the identical behavior can be achieved using the more standard {{Harvnb}} and {{Citation}}.

In article body: {{Harv|Atwood|2003}}

In references section: *{{Citation| last=Atwood | first=Margaret | year=2003 | title=Oryx and Crake | location=Toronto | publisher=McClelland & Stewart | isbn=0771008686}}

See also