User:Mathglot/sandbox/Templates/Ui-citec/doc
This is a documentation subpage for User:Mathglot/sandbox/Templates/Ui-citec. It may contain usage information, categories and other content that is not part of the original user template page. |
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
[edit]{{Ui-citec}}
– generates the canonical example above: a Wikipedia article "Stars", citing three chapters of one book on Astronomy.
Parameters
[edit]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:
- params for your sample article content; this is basically a footnote container, to link to the {{citec}} chapter links;
- params for your book – these params will populate an actual, {{cite book}} template (by default: "Astronomy" (2019) by John Doe);
- 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:Stars
.|String1=
– Sentence one of the "article"; this is verified by footnote[1] using {{citec}} #1. Alias:|S1=
. Default: "Galaxies have billions of stars."|String2=
– Sentence two of the "article"; this is verified by footnote[2] using {{citec}} #2. Alias:|S2=
. Default: "Stars sometimes explode in a supernova."|String3=
– Sentence three of the "article"; this is verified by footnote[3] 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:Astronomy
.|year=
– book year. Alias:|y=
. Default:2019
.|editor1-last=
– Alias:|e1l=
. Default:Doe
.|editor1-first=
– Alias:|e1f=
. Default:John
.
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:Supko
.|c1-first=
– value for param|first=
in the first citec. Alias:|c1f=
. Default:Robert
.|c1-chapter=
– value for param|c=
in the first citec. Alias:|c1c=
. Default:Supernovas
.|c1-page=
– value for param|p=
(or|pp=
) in the first citec. Alias:|c1p=
. Default:123
.
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:Blake
.|c2-first=
– value for param|first=
in the second citec. Alias:|c2f=
. Default:Oliver
.|c2-chapter=
– value for param|c=
in the second citec. Alias:|c2c=
. Default:Black holes
.|c2-page=
– value for param|p=
(or|pp=
) in the second citec. Alias:|c2p=
. Default:85–87
.
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:Galabov
.|c3-first=
– value for param|first=
in the third citec. Alias:|c3f=
. Default:Martin
.|c3-chapter=
– value for param|c=
in the third citec. Alias:|c3c=
. Default:Galaxies
.|c3-page=
– value for param|p=
(or|pp=
) in the third citec. Alias:|c3p=
. Default:201–202
.
Horizontal
[edit]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
[edit]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
[edit]Expand to show example transclusion:
| ||
---|---|---|
This code: {{User:Mathglot/sandbox/Templates/Ui-citec |Article=French historians |String1=Fustel de Coulanges (1830 – 1889) helped establish history as a rigorous academic discipline in France. |String2=Marc Bloch (1886–1944) was a medievalist and co-founder of the [[Annales school]]. |String3=Henry Rousso (b. 1954) is a leading contemporary historian specializing in the [[Vichy regime]]. |title=French Historians 1900-2000: New Historical Writing in Twentieth-Century France |year=2010 |e1l=Daileader |e1f=Philip |c1l=Potter |c1f=Mark |c1c=39. Henri Sée (1864–1936) |c1p=564-565 |c2l=Michaud |c2f=Francine |c2c=4. Marc Bloch (1886–1944) |c2p=39-61 |c3l=Frey |c3f=Hugo |c3c=37. Henry Rousso (1954– ) |c3p=545-555}} generates the following output: Citing a chapterHello. There are a few ways to include a chapter of a book in a citation. You can use a full inline citation (i.e., <ref> ... </ref>), or a short citation (i.e., {{sfn}} ), or a {{harvc}} template embedded in <ref> tags. The method you choose should conform to existing usage in the article. Here's an example of each, for a chapter by "Mark Potter" in a book called "French Historians 1900-2000: New Historical Writing in Twentieth-Century France" edited by Philip Daileader. The top one is for an article with full citations inline:
If your article uses short footnotes and has multiple citations to different chapters of the same book, you can cite them without any duplication of references by using short footnotes and the chapter citation template {{citec}} to link to the underlying {{cite book}} template for the book. To do this, just vary the
and add one {{citec}} template for each unique chapter you wish to cite. Here's an example using templates {{sfn}} and {{citec}} to link content in chapters of one book: French historians
Fustel de Coulanges (1830 – 1889) helped establish history as a rigorous academic discipline in France.[1] Marc Bloch (1886–1944) was a medievalist and co-founder of the Annales school.[2] Henry Rousso (b. 1954) is a leading contemporary historian specializing in the Vichy regime.[3] References
Works cited
The combination of In other words, considering footnote 1 we have:
The arrows represent a many-to-one relationship, that is: many {{sfn}}s may link to one {{citec}} chapter citation, and many {{citec}} chapters may link to one {{cite book}}. If there are more individual chapters you want to refer to, just add one additional {{citec}} per chapter. |
When to use
[edit]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
[edit]There is no need to use this template when either of these are true:
- the article in question uses full inline citations (i.e., <ref> ... </ref>), because {{citec}} cannot be used in that case;
- the article uses short footnotes ({{sfn}}s), 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
[edit]- *** 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#More than one contribution.