Jump to content

Template:Sfnp

From Elite Dangerous Wiki
Revision as of 03:30, 2 March 2025 by Wikipedia>Queen of Hearts (upd param check)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Sfnp/doc" to edit its documentation if it is available. (How does this work?)

Template:Documentation subpage Template:High-use

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.Template:Sfn

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 2012a
  • |p= – specific page referenced in the source (alias: |page= )
  • |pp= – comma-separated list of individual pages and / or range(s) of pages referenced in the source (alias: |pages= )
  • |loc= – in-source location when |p= and |pp= are inappropriate; may be used to supplement |p= and |pp=; information such as a section or figure number. (alias: |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
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
}}

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 |lastN= or |authorN= ) are required, followed by the year of publication (from |year= or |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
Article text.{{sfnp|Smith|1994|p=25}}

Article text.[1]

  1. ↑ Smith (1994), p. 25.
Article text.{{sfnp|Smith|Jones|1994|p=25}}

Article text.[1]

Article text.{{sfnp|Smith|Jones|Brown|1994|p=25}}

Article text.[1]

Article text.{{sfnp|Smith|Jones|Brown|Black|1994|p=25}}

Article text.[1]

Location in the source text

Use |p= for single pages; use |pp= for multiple pages (such as ranges). Use of |p= for multiple pages or |pp= for single pages can cause cite errors.

|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 |p= or |pp=.

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

Article text.[1]

  1. ↑ Smith (2020), p. 25.
Article text.{{sfnp|Smith|2020|pp=25–26}}

Article text.[1]

  1. ↑ Smith (2020), pp. 25–26.
Article text.{{sfnp|Smith|2020|loc=ch. 3}}

Article text.[1]

  1. ↑ Smith (2020), ch. 3.
Article text.{{sfnp|Smith|2020|p=25|loc=n. 14}}

Article text.[1]

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

Other variations

Template:Hatnote

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.Template:Sfn
No final period <ref>{{harvnb|Smith|2020|p=25}}</ref> Article text.[1]
No final period {{sfn|Smith|2020|p=25|ps=none}} Article text.Template:Sfn
Parenthesis around year and page <ref>{{harvtxt|Smith|2020|p=25}}</ref> Article text.[1]
Parenthesis around citation <ref>{{harv|Smith|2020|p=25}}</ref> Article text.[1]
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]

Template:Hidden

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

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.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Author last name1

Last name of first (or only) author

Example
Smith
Linerequired
Second author or year2

Year for citations with one author, or last name of second author for citations with two or more authors

Example
2006
Stringrequired
Third author or year3

Year for citations with two authors, or last name of third author for citations with three or more authors

Stringoptional
Fourth author or year4

Year for citations with three authors, or last name of fourth author for citations with four authors

Stringoptional
Year (if four authors included)5

Year for citations with four authors

Numberoptional
Pagep page

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)

Example
42
Linesuggested
Pagespp pages

Page numbers in source

Example
23–24
Lineoptional
Postscriptps

Trailing text to replace period

Example
none
Stringoptional
Locationloc at

Location in source

Example
section 7
Lineoptional
Groupgroup

The reference group for the footnote

Stringoptional