Jump to content

Template:Reflib/doc

From Wikipedia, the free encyclopedia

Citation wrapper template, useful for containing frequently used full citations and importing them into an article's "Bibliography", "Sources", or "Works cited" section. Some of the goals of § reference libraries are to encourage resource sharing across articles, to lower the bar for sourcing articles by having a pre-built repository of citations available in numerous topic areas, to introduce editors to new sources in topic areas they contribute to that they might not otherwise have known about, and to speed development by providing quality citations off-the-shelf in correct CS1 and CS2 format, ready for use in new and existing articles.

Usage

[edit]

{{Reflib|lib=ref lib name|refname1|refname2|. . .|refname20}}

Parameters

[edit]

One required and one optional named parameter; one to twenty unnamed (positional) parameters; at least one of which is required:

  • |lib=§ article domain name; e.g., French criminal law, or an equivalent shortcut: FCL (see § table). Required.
  • |nob= – "no bullet" : set this param (|nob=1) to suppress initial bullet before the citation.
  • |1= – name of the first § section, e.g., Elliott-2010. Required.
  • |2=, |3=, ... to |20= – name of the optional 2nd, 3rd, ... 20th § section names, which must all be unique.

Article domains

[edit]

An article domain is a topic area in which a group of related articles have shared citations; that is, citations which are used, or are likely to be used, in more than one article in the domain. It is by design a vetted repository of citations to reliable sources where new or veteran editors can come and find useful sources for their topic, already formatted properly as CS1 or CS2 citations and ready for use in their article. Typically, this would mean using this template in the "References" or "Works cited" section of an article that needs to include citations from the domain.

Reference libraries are currently available for the following domains (click items in the first column to view the reference library for that domain):

Article domains, and related pages
Article domain Shortcut Main space Nav boxes Categories
Anglo-Saxon history ASH Anglo-Saxon history Anglo-Saxon England
Ancient seafaring Asea Ancient maritime history {{Ancient seafaring}}
French criminal law FCL French criminal law {{French criminal law}} French criminal law
Science fiction SF Science fiction {{Science fiction}} Science fiction
Vichy France Vichy Vichy France {{Vichy France}} Vichy France

The last three columns are merely for informational purposes; there is no formal connection between a domain and any particular article, nav template, or category. Currently, domain containers are implemented as subpages of this template, but this may change.[a] To create a new domain, see § Creating a new article domain below.

Instead of having to copy and paste full citations among numerous articles related to Template:Reflib/Domain doc and keep them in sync, Template:Reflib allows you to place the citations into the domain container for Template:Reflib/Domain doc[b] just once, and then use the template to import needed citations into any articles in the domain that need them. It's up to users to define what constitutes a domain, but as a rough approximation, articles linked from the same navigation template are likely to have citations in common that are members of the same article domain. Categories offer another approach.

Citations in these domains are designed to be accessible via the template according to the usage and parameters shown above. Feel free to skip using the template itself and just copy citations of interest out of the domain container and paste them directly into your article.

Terminology

[edit]

Article domain (or domain) – a group topic spanning a number of subtopics which are likely to share a lot of the same reliable sources. The group topic may or may not have a category associated with it, and the subtopics may or may not already have Wikipedia articles associated with them. Example: "Ancient seafaring".

Reference library (or library) – a collection of references (citations) for one § domain, without regard to how the library is implemented.

Reflib – an overloaded term, which may refer either to: 1. this template, or 2. a § reference library.

Domain container (or article domain page) – an implementation of a § reference library. This is abstracted as named parameter |lib= of the template. Currently, domain containers are implemented as subpages of Template:Reflib, but this is an internal design decision and may change.

Reference section (or section) – an implementation of one reference (citation) within a § domain container. This is abstracted by any of the positional parameters |1= through |20= of the template. Currently, a reference section is implemented as a section of a subpage; this is an internal design decision and may change.

Examples

[edit]

1. An example showing transclusion of seven references from article domain French criminal law:

{{Reflib|lib=FCL|Bell-2008|Elliott-2001|Hall-2010|Hodgson-2005|Jurgens-2007|Larousse|Steiner-2010}}

{{Reflib|lib=FCL|Bell-2008|Elliott-2001|Hall-2010|Hodgson-2005|Jurgens-2007|Larousse|Steiner-2010}}

  • John Bell; Sophie Boyron; Simon Whittaker (27 March 2008). Principles of French Law (2 ed.). OUP Oxford. ISBN 978-0-19-101889-3. OCLC 865331945.
  • Elliott, Catherine (2001). French Criminal Law. Portland OR: Willan. ISBN 978-1-135-99307-8. OCLC 49494876.
  • Hall, Jerome (2010). General Principles of Criminal Law. The Lawbook Exchange, Ltd. ISBN 978-1-58477-498-3. OCLC 1131553404.
  • Hodgson, Jacqueline (8 November 2005). French Criminal Justice: A Comparative Account of the Investigation and Prosecution of Crime in France. Bloomsbury Publishing. ISBN 978-1-84731-069-9. OCLC 1048749661.
  • Jurgens, Erik (6 July 2007). The principle of the Rule of Law (Report). Council of Europe. 11343. Retrieved 4 March 2023.
  • "Dictionnaire Français en ligne - Larousse". Larousse.fr. Paris: Éditions Larousse.
  • Steiner, Eva (4 March 2010). French Law: A Comparative Approach. OUP Oxford. ISBN 978-0-19-923237-6. OCLC 1026108285.

2. An example showing transclusion of five references from article domain Ancient seafaring (note that param 4 pulls in nine citations):

{{Reflib|lib=Asea|Bagnall-1999|Goldsworthy-2006|Lazenby-1996|Morrison-Gardiner-1995|Warry-2004}}

{{Reflib|lib=Asea|Bagnall-1999|Goldsworthy-2006|Lazenby-1996|Morrison-Gardiner-1995|Warry-2004}}
{{sfn whitelist|CITEREFCasson1995b|CITEREFCoates1995|CITEREFHocker1995|CITEREFRankov1995}}

3. Citations will be listed in the order which you include them; if you want them in alphabetical order, list them that way:

{{Reflib|lib=FCL|Zalc-2020|Young-2013|Berger-2003|Azéma-1979}}

{{Reflib|lib=Vichy|Zalc-2020|Young-2013|Berger-2003|Azéma-1979}}

4. You cannot name the same section twice in one transclusion of the template; this generates an error:

{{Reflib|lib=Vichy|Berlière-2018|Carrier-2017|Diamond-1999|Berlière-2018}}

{{Reflib|lib=Vichy|Berlière-2018|Carrier-2017|Diamond-1999|Berlière-2018}}Reflib: Param values must be unique.

5. You can transclude {{Reflib}} more than once in the same article, but you cannot reuse a section name already used in a previous call:

{{Reflib|lib=FCL|Hall-2010|Hodgson-2005|Jurgens-2007}}

{{Reflib|lib=FCL|Hall-2010|Hodgson-2005|Jurgens-2007}}

Updating domain containers

[edit]

It is recommended that only editors experienced in using citation templates update the domain subpages. Certain common errors or oversights such as omitting a terminating curly bracket could have repercussions in more than one article. For details, and additional information on adding new citations to a domain container, or adding, renaming or deleting a reference section, please see Template:Reflib/Domain doc#Updating domain containers.

Creating a new article domain

[edit]

If you have a set of citations associated with a topic area that is not already covered by one of the existing article domains (see table above), you can create one. Detailed instructions are available for how to create a new article domain. A preload page will create a starter page for you at the press of a button, and walk you through the process.

The procedure for creating a new article domain is low-risk and is encouraged. If you're familiar with the process, you can create a new domain page now, or just view the instructions for creating one.

Technical notes

[edit]

Duplicate references

[edit]

To avoid duplicate references appearing in an article, which would generate a harv multiple-targets error, this template detects and flags duplicate parameter values with an error message (see Example 4 above).

Multiple Reflib transclusions

[edit]

Reflib may be transcluded any number of times on a page, but the caveat about § Duplicate references applies globally. Whereas the template flags duplicate params, if you transclude Reflib twice and include the same section name in each one, then the template cannot detect it. This will result in the template name itself being displayed among the references, instead of the duplicate section name (see Example #5). If you see the template name itself appearing among the list of references in the article appendix, suspect a duplicate parameter.

Whitelisting false positive messages

[edit]

False positive "no target" error messages are generated by articles transcluding this template (or any CS1 template wrapper). Normally, whitelisting using template {{sfn whitelist}} is required to suppress these false-positive error messages, by adding the following template after transcluding Reflib:

{{sfn whitelist|CITEREF1|CITEREF2|. . .|CITEREF20}}

See this brief explanation and consider requesting white-listing by adding the CITEREF to Module:Footnotes/whitelist, if the same citations are being transcluded to multiple articles. This template is safe to use, regardless whether you request whitelisting or not.

Whitelisting unused chapters

[edit]

Contrary to the recommendation to only § Use one citation per section, it makes sense to list chapter templates {{harvc}} / {{citec}} for commonly cited chapters in the same section with the {{cite book}} citation they belong to, all together in one section of a Reflib.[c] However, if not all of the chapters are cited in a given article, there may be scripted warning-level messages of the type, "there is no link pointing to this citation" that appear for these chapter citations. These warnings may be suppressed, if desired, using template {{cite whitelink}}, listing the unused chapter CITEREFs as param values.

Notes

[edit]
  1. ^ Users of object-oriented programming may view the analogy of an article domain as an object, a citation as a property or attribute of a given article domain-object, and the template as a method for getting a citation. Accessing a citation via the template will always work; accessing it directly via a subpage or whatever storage method is used currently, is not guaranteed to work across future upgrades to the template, so do that at your own risk.
  2. ^ A domain container is a repository containing all the shared references for one article domain. This is currently implemented as a subpage of the Reflib template, so 'Template:Reflib/Template:Reflib/Domain doc' for this domain, but this is an internal design decision, and may change.
  3. ^ For an example of a citation with multiple chapter templates in one section, see Template:Reflib/FCL § Tomlinson-1999.