• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Wikicite/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Wikicite
This is the template sandbox page for Template:Wikicite (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 2,300 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
CSSThis template uses TemplateStyles:
  • Template:Citation/styles.css

For some atypical citations, {{Wikicite}} can create an HTML anchor. When used in manually written, non-templated full citations, it allows shortened footnotes to link to the full citation on the same page. The link anchor can work with short-citation templates, such as {{sfn}}, {{harvnb}}, {{sfnp}}, {{harvp}}, and others.

This template is only needed for a handwritten citation or for a citation using non-standard citation templates, that is linked to by a shortened footnote. The anchor serves no purpose if nothing links to it, and full citations created with the common {{cite xxx}} templates will either automatically create the anchor or offer the |ref= parameter for custom link anchors. In most cases, this template is expected to be used temporarily, in cases where an editor is not certain how to format the full citation data into a template, does not have time to do it, where there is a dispute on the talk page about which citation format should be used, or where a specific citation template does not yet support the |ref= parameter. In a handful of cases, however, there remain some articles with local consensus to use entirely manually formatted citations, to exactly mirror some off-site citation style. This is rare but permitted by the WP:CITESTYLE guideline.

Contents

  • 1 Usage
  • 2 Examples
  • 3 Non-standard templates
  • 4 Backward compatibility with id
  • 5 Template data
  • 6 See also

Usage

edit

Copy and paste:

{{wikicite |ref={{sfnref|}} |reference= }}

or

{{wikicite |ref= |reference= }}
ref
This creates the invisible HTML anchor. It can be used with the anchor template {{sfnref}} or its alias {{harvid}}. Both of those templates accept the same parameters as shortened footnote templates. The parameter can also be used with a freeform anchor and manually written anchor links.
Compared to citation style 1 templates, such as {{cite web}} or {{cite book}}, the anchor is rather arbitrary, but it is best if the parameters match the citation data exactly (including precise author name spellings and order), since someone might template the manually formatted citation, which would auto-generate citation anchor data that could then be used with the same short-citation templates without them having to be updated.
The anchor can be enclosed in quotation marks, but these are optional unless the anchor contains any character other than a number, letter, or hyphen. For example, with a space, a ref anchor of Von Autor-2006 must be specified as |ref="Von Autor-2006".
reference
The actual reference text. It may be plain text, formatted text, or one of the citation templates.

Examples

edit

In the following examples from the Bengal famine of 1943, an unpublished but publicly available manuscript by the Indian Government’s Regional Food Commissioner is used as a primary source. As there are few acceptable places on Wikipedia to use an unpublished memoir as a source, no citation template directly matches the document:

Markup Renders as
Government sources privately admitted the shortfall was 2 million tons.{{sfn|Braund|1944|p=50}}

==Notes==
{{reflist}}

==References==
* {{wikicite | ref = {{sfnref|Braund|1944}} | reference = Braund, H. B. L. (1944). ''Famine in Bengal'', typescript. British Library Doc D792.}}

Government sources privately admitted the shortfall was 2 million tons.[1]

Notes
  1. ^ Braund 1944, p. 50.
References
  • Braund, H. B. L. (1944). Famine in Bengal, typescript. British Library Doc D792.

You can also provide the |ref= parameter with a free-form anchor. The anchor can contain letters, numbers, and hyphens. To link to a free-form anchor, use a wikitext anchor link. For example, link to {{wikicite |ref=Doe-1999 |reference=... }} with <ref>[[#Doe-1999|Doe 1999]], p. x.</ref>. Below, the previous example has been rewritten with a free-form anchor:

Markup Renders as
Government sources privately admitted the shortfall was 2 million tons.<ref>[[#Braund-1944|Braund (1944)]], p. 50</ref>

==Notes==
{{reflist}}

==References==
* {{wikicite | ref = Braund-1944 | reference = Braund, H. B. L. (1944). ''Famine in Bengal'', typescript. British Library Doc D792.}}

Government sources privately admitted the shortfall was 2 million tons.[1]

Notes
  1. ^ Braund (1944), p. 50
References
  • Braund, H. B. L. (1944). Famine in Bengal, typescript. British Library Doc D792.

Non-standard templates

edit

Most citation templates have a |ref= parameter that can accept any anchor, similar to the |ref= parameter in this template. Templates that don't support this can be placed into this template's |reference= parameter:

* {{wikicite |ref={{Harvid|Australian Recording Industry Association A}} |reference= {{cite certification|region=Australia|certyear=2006|access-date=1 July 2019}} }}

When the citation template is updated to generate its own anchor, the custom anchor can be moved from {{wikicite}} to the citation template:

* {{cite certification|region=Australia|certyear=2006|access-date=1 July 2019 |ref={{Harvid|Australian Recording Industry Association A}} }}


Backward compatibility with id

edit

The |id= parameter can also be used to create an HTML anchor in a full citation. It has the same role as the |ref= parameter but they work in slightly different ways. If both |id= and |ref= are provided, |id= is ignored. There are two differences:

  • |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.

Thus, these two forms produce identical results:

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

The |id= parameter can only be used with manual anchor links:

Markup Renders as
According to Atwood, blah blah.<ref>[[#Reference-Atwood-2003|Atwood (2003)]], p. 29.</ref>

== Notes ==
{{reflist}}

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

According to Atwood, blah blah.[1]

Notes
  1. ^ Atwood (2003), p. 29.
References
  • Atwood, Margaret (2003). Oryx and Crake, Toronto: McClelland & Stewart. ISBN 978-0-7710-0868-9.


Template data

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Wikicite in articles based on its TemplateData.

TemplateData for Wikicite

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

no description

Unknownoptional
refref

no description

Unknownoptional
idid

no description

Unknownoptional
referencereference

no description

Unknownoptional

See also

edit
  • {{Citation}}
  • {{Harvnb}}
  • {{Sfn}}, an alternative method for creating shortened footnotes
  • {{Citeref}}, alternative method to create links to citations
  • Wikipedia:Citation templates
  • Wikipedia:Citing sources
  • Wikipedia:Citing sources/Further considerations#Using Wikicite
  • T-34#References, example of usage
The above documentation is transcluded from Template:Wikicite/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Wikicite/sandbox&oldid=1286953709"
Last edited on 23 April 2025, at 01:47

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 23 April 2025, at 01:47 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop