Template:Reflib/doc

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.

Parameters
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.,, or an equivalent shortcut: (see § table). Required.

nob – "no bullet" : set this param (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
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):

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. To create a new domain, see below.

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
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
1. An example showing transclusion of seven references from article domain French criminal law:

2. An example showing transclusion of five references from article domain Ancient seafaring:

⟶

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

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

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:

Updating domain containers
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.

Creating a new article domain
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, or just view the instructions for creating one.

Duplicate references
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
Reflib may be transcluded any number of times on a page, but the caveat about 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
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:

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
Contrary to the recommendation to only, 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. 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.