Help:List-defined references

From Sarkarverse
Jump to navigation Jump to search
Please read Help:Footnotes first, as this guide builds upon the methods described there.

List-defined references (LDR) are references that are defined in the reference list markup, as opposed to being defined in the body of the article. LDR was implemented in September 2009 as a way to make referencing articles easier and with less clutter.

Overview

LDR uses named references where each individual reference has a unique name and is defined within the reference list markup:

<references>
<ref name=name>reference</ref>
</references>
Or; using {{reflist}}
{{reflist|refs=
<ref name=name>reference</ref>
}}

Each reference is invoked in the content using <ref name=name />.

Names for footnotes and groups must follow these rules:

  • Names are case-sensitive
  • Names may not be purely numeric
  • Names must be unique— you cannot use the same name to define different groups or footnotes
  • Quotes are optional if the only characters used are letters A–Z, a–z, digits 0–9 and the symbols !$%&()*,-.:;<@[]^_`{|}~
  • Inclusion of any other characters including spaces requires that the name be enclosed in straight quotes (")
  • Quote-enclosed names may not include a less-than sign (<) or a quote symbol (")
  • Please consider keeping names simple and restricted to the standard English alphabet and numerals.
  • You may optionally provide names even when the name is not required.


Rules and guidelines

  • List-defined references and references defined in the body of the article technically may be mixed on a page, but this is not recommended as it may be confusing to ongoing editors.
  • All list-defined references must be named. Any name complying with the rules above may be used. A well-used practice is author-date, author-title or publication-date.
  • All list-defined references must be used in the body. Unused references will generate an error.
  • References may be ordered in any manner such as alphabetical, but the generated list will be in the order the references are invoked.

Examples

Markup Renders as
The Sun is pretty big.<ref name=Foot01/> But the Moon<ref name=Foot02/> is not so big.<ref name=Foot03/> The Sun is also quite hot.<ref name=Foot04/>
==Notes==
{{reflist|refs=
<ref name=Foot01>Miller, ''The Sun'', Oxford, 2005, p. 23.</ref>
<ref name=Foot02>Jones, ''The Solar System'', MacMillan, 2005, p 623.</ref>
<ref name=Foot03>Brown, ''The Moon'', 2006, Penguin, p. 46.</ref>
<ref name=Foot04>Smith, ''The Universe'', Random House, 2005, p. 334.</ref>
}}
The Sun is pretty big.[1] But the Moon[2] is not so big.[3] The Sun is also quite hot.[4]
Notes
  1. ^ Miller, The Sun, Oxford, 2005, p. 23.
  2. ^ Jones, The Solar System, MacMillan, 2005, p 623.
  3. ^ Brown, The Moon, 2006, Penguin, p. 46.
  4. ^ Smith, The Universe, Random House, 2005, p. 334.


List-defined references with explanatory footnotes using a separate reference group.
Markup Renders as
The Sun is pretty big.<ref name=Foot01/><ref group=Note name=Note01/> But the Moon<ref group=Note name=Note02/> is not so big.<ref name=Foot02/><ref group=Note name=Note03/> The Sun is also quite hot.<ref name=Foot03/>

==Notes==
{{reflist|group=Note|refs=
<ref name=Note01>But Miller points out that the Sun is not as large as some other stars.</ref>
<ref name=Note02>The Moon goes by other names, such as Selena.</ref>
<ref name=Note03>Historically the Moon was not always considered to be large.</ref>
}}

==References==
{{reflist|refs=
<ref name=Foot01>Miller, ''The Sun'', Oxford, 2005, p. 23.</ref>
<ref name=Foot02>Brown, ''The Moon'', 2006, Penguin, p. 46.</ref>
<ref name=Foot03>Smith, ''The Universe'', Random House, 2005, p. 334.</ref>
}}
The Sun is pretty big.[1][Note 1] But the Moon[Note 2] is not so big.[2][Note 3] The Sun is also quite hot.[3]
Notes
  1. ^ But Miller points out that the Sun is not as large as some other stars.
  2. ^ The Moon goes by other names, such as Selena.
  3. ^ Historically the Moon was not always considered to be large.
References
  1. ^ Miller, The Sun, Oxford, 2005, p. 23.
  2. ^ Brown, The Moon, 2006, Penguin, p. 46.
  3. ^ Smith, The Universe, Random House, 2005, p. 334.

Pros and cons

The use of list-defined references means that the references and footnotes formatted this way all appear in the section where the template {{reflist|refs= }} is located. This means that citation details and (possibly) extensive notes do not interrupt the text in the edit window. Also, they now all appear in one section at the bottom of the page that can be opened by itself to edit any of these entries in one place, and the editor does not need to search the entire text to find where the footnote was introduced.

A drawback of the approach is that an editor must either use a two-step procedure, first entering the identifier <ref name=name /> in the main text and then opening the listing section to enter the source or footnote as <ref name=name>content</ref>, or open the entire document to allow the reference to be added to the listing at the same time as its in-text name. Another overhead of this approach is that the list-defined entries in the list at the end of the article should be arranged alphabetically in the edit window by their name so they can be found easily by an editor.

There are some misconceptions about the pros and cons of list-defined footnotes. One of these is that the introduction of separate lists for different kinds of footnotes at the end of an article depends upon using list-defined footnotes. However, using a 'group' name to differentiate various kinds of footnotes, is available regardless of whether list-defined or in-line footnotes are used. For example, in both cases one can designate notes as a group called 'Note', and separate them from simple citations by using the in-line label <ref group=Note name=name /> (The complete explanation of the use of group names is illustrated in the second example in the section immediately above.)

Another misconception is that there is an 'either-or' choice between use of list-defined footnotes and in-line footnotes. In fact, {{reflist|refs= }} is entirely compatible with the use of in-line footnotes in the form <ref>content</ref> or <ref name=name>content</ref>. Although use of both systems in the same article might appear confusing or undesirable, it is a fact that the two systems can be mixed indiscriminately with the template {{reflist|refs= }}.

Errors

Sometimes referencing can produce errors that show up in red text. Please refer to Help:Cite errors to help diagnose and solve these errors.

Converting

After gaining consensus, reference styles may be converted from or to Template:Ldr. User:PleaseStand/segregate-refs.js has an option to assist conversion

Using list-defined references temporarily

References segregator allows you to use list-defined references whilst editing an article, without changing the format of the article (it converts to list-defined references automatically during editing, and converts back when you press Save).

Template:Wikipedia referencing