User:Mathglot/sandbox/Templates/Ui-citec/doc

This is an informational template intended for use on User talk pages to explain the workings of the citec template. There are numerous parameters which enable expert users to tailor the output to a particular editor's use case question. An additional use case is as a wikicode generator, for someone who wishes to use citec templates in a given article.

Usage
– generates the canonical example above: a Wikipedia article "Stars", citing three chapters of one book on Astronomy.

Parameters
All parameters are optional, but there are dependencies. If all params are omitted, the template generates the "Astronomy" cite book example seen at the top, with chapters "Supernovas", "Black holes", and "Galaxies" linked to it via citec templates. You can view a customized example of your own, by supplying parameters of three types:
 * 1) params for your sample article content; this is basically a footnote container, to link to the citec chapter links;
 * 2) params for your book – these params will populate an actual, cite book template (by default: "Astronomy" (2019) by John Doe);
 * 3) three groups of four params each, defining chapters 1, 2, and 3 of your book.

Sample "article" content – three strings comprising the content of the "article", having one sfn each, linking to a citec template defining one chapter of a common book:
 * Article – title of the "article" for the mockup display. Alias: A. Default:.
 * String1 – Sentence one of the "article"; this is verified by footnote using citec #1. Alias: S1. Default: "Galaxies have billions of stars."
 * String2 – Sentence two of the "article"; this is verified by footnote using citec #2. Alias: S2. Default: "Stars sometimes explode in a supernova."
 * String3 – Sentence three of the "article"; this is verified by footnote using citec #3. Alias: S3. Default: "Big ones collapse into a black hole."

Cite book – values for the cite book template defining the common book with chapters defined by the citec templates:
 * title – book title. Alias: t. Default:.
 * year – book year. Alias: y. Default:.
 * editor1-last – Alias: e1l. Default:.
 * editor1-first – Alias: e1f.  Default:.

Citec #1 – values for the first citec in the example (all optional, but if c1-last is present, then c1-chapter is required):
 * c1-last – value for param last in the first citec. Alias: c1l. Default:.
 * c1-first – value for param first in the first citec. Alias: c1f.  Default:.
 * c1-chapter – value for param c in the first citec. Alias: c1c. Default:.
 * c1-page – value for param p (or pp) in the first citec. Alias: c1p. Default:.

Citec #2 – values for the second citec in the example (all optional, but if c2-last is present, then c2-chapter is required):
 * c2-last – value for param last in the second citec. Alias: c2l. Default:.
 * c2-first – value for param first in the second citec. Alias: c2f. Default:.
 * c2-chapter – value for param c in the second citec. Alias: c2c. Default:.
 * c2-page – value for param p (or pp) in the second citec. Alias: c2p. Default:.

Citec #3 – values for the third citec in the example (all optional, but if c3-last is present, then c3-chapter is required):
 * c3-last – value for param last in the third citec. Alias: c3l.  Default:.
 * c3-first – value for param first in the third citec. Alias: c3f. Default:.
 * c3-chapter – value for param c in the third citec. Alias: c3c. Default:.
 * c3-page – value for param p (or pp) in the third citec. Alias: c3p. Default:.

Horizontal
All parameters, horizontal format:

Article String1 String2 String3 title year editor1-first editor1-last c1-last c1-first c1-chapter c1-page c2-last c2-first c2-chapter c2-page c3-last c3-first c3-chapter c3-page

All parameters horizontally, using aliases: A S1 S2 S3 t y e1l e1f c1l c1f c1c c1p c2l c2f c2c c2p c3l c3f c3c c3p

Vertical
All parameters, vertical format: Article

String1

String2

String3

title

year

editor1-last

editor1-first

c1-last

c1-first

c1-chapter

c1-page

c2-last

c2-first

c2-chapter

c2-page

c3-last

c3-first

c3-chapter

c3-page

Example
This code:

generates the following output:

When to use
This informational template is designed as an aide in responding to questions about how to code references to books, such as edited works or anthologies that may have many chapters written by different authors, without having to duplicate the book data numerous times in multiple cite book templates.

This template may also be used as a wikicode generator when an editor needs to cite two or more chapters from a given book using the citec template in an article which uses short citations (i.e., sfn), and needs help coding it. Properly configured, it will generate clean wikicode linking one cite book template and up to three citec chapter templates corresponding to your particular book and chapter data, which you can paste directly into your article, expandingi the citations to add url and other information as needed.

When not to use
There is no need to use this template when either of these are true:
 * the article in question uses full inline citations (i.e., &lt;ref> ... &lt;/ref>), because citec cannot be used in that case;
 * the article uses short footnotes (sfns), but either:
 * it is unlikely that the user will need to cite more than one chapter of a given book; or:
 * content in multiple chapters is cited using unique page numbers (or loc locations), without naming the chapter.

Technical issues

 * *** Template in progress *** – wikicode section is not working yet. For now, look at the show/hide wikicode at Linking to a chapter for the wikicode of the default example.
 * Note that if you wish to cite two different chapters by the same author, they need to be distinguished from each other, just as you would for two short footnotes citing different books in the same year by one author as "Jones-2015a and "Jones-2015b". In template citec, this is done through parameter anchor-year, not described here. For this case, please see the documentation at Template:Citec.