Jump to content

From Noumenapedia

Template:Sfnp/doc

__EXPECTED_UNCONNECTED_PAGE__

The shortened footnote with parentheses template {{sfnp}} or shortened footnote with brackets template {{sfnb}} creates a short author–date citation in a footnote. It is used to create shortened footnotes, a citation style which pairs a short, author-date citation in a footnote with a complete citation in the references section at the end of the article (see example below). This citation style is used to simplify multiple citations to the same source and to reduce clutter in the edit window.

It works exactly like the basic {{sfn}} template, except that it puts parentheses () around the year, a bit like the way that full citations appear in (e.g.) APA style. It is a stylistic alternative to {{sfn}}.

Markup Renders as
Article text.{{sfn|Smith|2020|p=25}}
{{reflist}}

Article text.[1]

  1. ↑ Smith 2020, p. 25.
Article text.{{sfnp|Smith|2020|p=25}}
{{reflist}}

Article text.[1]

  1. ↑ Smith (2020), p. 25.

{{Sfn}}'s documentation includes an extensive collection of workarounds and solutions to common problems, and these will work equally well with sfnp.

Note that the use (or even non-use) of these templates is an element of citation "style", and adding or removing them in articles with an established style should be consistent with that style. See WP:CITEVAR.

Usage

Sfnp generates an "author-date" style short-cite from the following parameters:

{{sfnp| <last1*> | <last2> | <last3> | <last4> | <year*> | p= <page> | loc= <location> }}

with

  • <last1> – required; surname of first author or corporate author
  • <last2>–<last4> – positional parameters; surnames of next three authors; required if available in the full citation
  • <year> – required; four-digit year; may have a lowercase disambiguation letter, like
  1. REDIRECT Template:Parameter value

__EXPECTSHORTPAGE__

  • <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= – specific page referenced in the source (alias: <syntaxhighlight lang="wikitext" inline style="display: none;" />|page= )
  • <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp= – comma-separated list of individual pages and / or range(s) of pages referenced in the source (alias: <syntaxhighlight lang="wikitext" inline style="display: none;" />|pages= )
  • <syntaxhighlight lang="wikitext" inline style="display: none;" />|loc= – in-source location when <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= and <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp= are inappropriate; may be used to supplement <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= and <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp=; information such as a section or figure number. (alias: <syntaxhighlight lang="wikitext" inline style="display: none;" />|at= )

Example

Typical usage is shown in the example below. The text and the footnote are connected by a bi-directional link – clicking on the superscript takes the reader to the footnote, clicking on the footnote number takes them back to the superscript. The clicking on the short citation takes them to the full citation in the references section.

Sfnp will also automatically combine identical footnotes.

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> Article text.{{sfnp|Smith|2020|p=25}} More article text.{{sfnp|Smith|2020|p=25}} Still more article text.{{sfnp|Smith|2020|p=26}} ==Notes== {{reflist}} ==References== * {{cite book | last = Smith | first = John | date = 2020 | title = Smith's Book }} </syntaxhighlight>

Article text.[1] More article text.[1] Still more article text.[2]


Notes
  1. ↑ 1.0 1.1 Smith (2020), p. 25.
  2. ↑ Smith (2020), p. 26.
References

Smith, John (2020). Smith's Book.

Template sfnp is not placed inside <ref>...</ref> tags and generates the footnote internally. (To place sfnp in a footnote, see putting a citation inside a footnote, below.)

Parameters

Author(s) and year

The first four author surnames (or all authors if fewer than four; use the values from <syntaxhighlight lang="wikitext" inline style="display: none;" />|lastN= or <syntaxhighlight lang="wikitext" inline style="display: none;" />|authorN= ) are required, followed by the year of publication (from <syntaxhighlight lang="wikitext" inline style="display: none;" />|year= or <syntaxhighlight lang="wikitext" inline style="display: none;" />|date=). Authors past the fourth must be omitted or an error will result.

The possible issues section in {{sfn}} describes workarounds for various common problems, such as large number of authors, no author name, multiple works in the same year, two sources with same last names and years and others.

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|1994|p=25}}</syntaxhighlight>

Article text.[1]

  1. ↑ Smith (1994), p. 25.
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|Jones|1994|p=25}}</syntaxhighlight>

Article text.[1]

<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|Jones|Brown|1994|p=25}}</syntaxhighlight>

Article text.[1]

<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|Jones|Brown|Black|1994|p=25}}</syntaxhighlight>

Article text.[1]

Location in the source text

Use <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= for single pages; use <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp= for multiple pages (such as ranges). Use of <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= for multiple pages or <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp= for single pages can cause cite errors.

<syntaxhighlight lang="wikitext" inline style="display: none;" />|loc= can be used to specify a location in the source in another way, such as section numbers or chapters. It can also be combined with <syntaxhighlight lang="wikitext" inline style="display: none;" />|p= or <syntaxhighlight lang="wikitext" inline style="display: none;" />|pp=.

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|2020|p=25}}</syntaxhighlight>

Article text.[1]

  1. ↑ Smith (2020), p. 25.
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|2020|pp=25–26}}</syntaxhighlight>

Article text.[1]

  1. ↑ Smith (2020), pp. 25–26.
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|2020|loc=ch. 3}}</syntaxhighlight>

Article text.[1]

  1. ↑ Smith (2020), ch. 3.
<syntaxhighlight lang="wikitext" style="" class="markup-markup">Article text.{{sfnp|Smith|2020|p=25|loc=n. 14}}</syntaxhighlight>

Article text.[1]

  1. ↑ Smith (2020), p. 25, n. 14.

Other variations

These alternative templates change the appearance of the author-date citation

Purpose Markup Renders as
The most common format,
used 200,000+ articles
Has a final period
{{sfn|Smith|2020|p=25}} Article text.[1]
  1. ↑ Smith 2020, p. 25.
No final period <ref>{{harvnb|Smith|2020|p=25}}</ref> Article text.[1]
  1. ↑ Smith 2020, p. 25
No final period {{sfn|Smith|2020|p=25|ps=none}} Article text.[1]
  1. ↑ Smith 2020, p. 25
Parenthesis around year and page <ref>{{harvtxt|Smith|2020|p=25}}</ref> Article text.[1]
  1. ↑ Smith (2020, p. 25)
Parenthesis around citation <ref>{{harv|Smith|2020|p=25}}</ref> Article text.[1]
  1. ↑ (Smith 2020, p. 25)
Parenthesis around year <ref>{{harvp|Smith|2020|p=25}}</ref> Article text.[1]
  1. ↑ Smith (2020), p. 25
Parenthesis around year {{sfnp|Smith|2020|p=25|ps=none}} Article text.[1]
  1. ↑ Smith (2020), p. 25
Parenthesis around year
With final period
{{sfnp|Smith|2020|p=25}} Article text.[1]
  1. ↑ Smith (2020), p. 25.
Colon for page number <ref>{{harvcolnb|Smith|2020|p=25}}</ref> Article text.[1]
Colon for page number,
parenthesis around year and page
<ref>{{harvcoltxt|Smith|2020|p=25}}</ref> Article text.[1]
Colon for page number,
parenthesis around citation
<ref>{{harvcol|Smith|2020|p=25}}</ref> Article text.[1]

Anchors for some examples

Some of the examples need an anchor here so they don't display an error message. Press the back button on your browser to return to the example you were reading.

  • Smith (1994). Book by Smith.
  • Smith; Jones (1994). Book by Smith and Jones.
  • Smith; Jones; Brown (1994). Book by Smith, Jones and Brown.
  • Smith; Jones; Brown; Black (1994). Book by Smith, Jones and Brown.

TemplateData

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

TemplateData for Sfnp

<templatedata> { "params": { "1": { "description": "Last name of first (or only) author", "required": true, "example": "Smith", "type": "line", "suggested": true, "label": "Author last name" }, "2": { "description": "Year for citations with one author, or last name of second author for citations with two or more authors", "required": true, "example": "2006", "type": "string", "suggested": true, "label": "Second author or year" }, "3": { "description": "Year for citations with two authors, or last name of third author for citations with three or more authors", "type": "string", "label": "Third author or year" }, "4": { "description": "Year for citations with three authors, or last name of fourth author for citations with four authors", "type": "string", "label": "Fourth author or year" }, "5": { "description": "Year for citations with four authors", "type": "number", "label": "Year (if four authors included)" }, "p": { "description": "Page number in source, if the relevant information is on one page (use the «pp» parameter for multiple pages, and the «loc» parameter for other location data)", "suggested": true, "aliases": [ "page" ], "example": "42", "type": "line", "label": "Page" }, "pp": { "description": "Page numbers in source", "aliases": [ "pages" ], "example": "23–24", "type": "line", "label": "Pages" }, "ps": { "description": "Trailing text to replace period", "example": "none", "type": "string", "label": "Postscript" }, "loc": { "description": "Location in source", "example": "section 7", "type": "line", "label": "Location", "aliases": [ "at" ] }, "group": { "label": "Group", "description": "The reference group for the footnote", "type": "string" } }, "description": "This template creates a short author–date citation in a footnote. It allows you to link inline citation using Harvard citations (a form of short citations using parenthetical references) to their corresponding full bibliographic citations.", "format": "inline" } </templatedata>