Template:Cite Q/doc

From TWC Archive
Jump to navigation Jump to search

Usage

A prototype wrapper for {{Citation}}, which calls available values from Wikidata.

Future developments

  • Convert to use Lua for more advanced functionality
  • Once robust the functionality should be merged into {{Citation}}
  • Eventually, each signed-in reader should be able to set, under their "Preferences", the style in which they wish to see citations rendered. No more CiteVar wars!

Parameters

  • |1= = Wikidata QID for the article
  • |access-date= = date an online resources was viewed
  • |author-mask= = replace author name(s) with em-dashes or text
  • |chapter= = chapter title or number of a book or larger work; overrides Wikidata value
  • |date= = date of publication; uses Wikidata value if not set
  • |df= = date format
  • |display-authors= =
  • |embargo= = embargo date for PMC
  • |id= = generic ID; may be wikilinked
  • |mode= = Sets separator, terminal punctuation, and capitalization; use |mode=cs1 or |mode=cs2
  • |page= = single page number
  • |pages= = multiple page numbers, e.g. 27-29 or 34,36
  • |quote= = quotation from the source; may include wikilinks
  • |series= = series of which e.g. a book is part; may include wikilinks; uses Wikidata value if not set
  • |url= = url to source; uses Wikidata value if not set

For all but |1=; see {{citation}} for more details.

Blank

{{Cite Q| XXQIDXX |page= |access-date= |quote= }}

Reference naming

For ease of use, you may wish to name your references to reflect the cited work, for example:

<ref name="Williams-2010">{{Cite Q|Q15625490}}</ref>

Parameter / entity map

This section lists where each of the template's supported parameters gets its data. P734}}

Identifier parameters

Examples

Examples here are mostly test-cases, and will need to be thinned (and moved to a sub-page) before the template is widely deployed.

Journal

{{Cite Q|Q15625490}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q15625490|page=42}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q15625490|access-date=18 May 2017}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q15625490|quote=lorem ipsum}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q15625490|page=42|access-date=18 May 2017|quote=lorem ipsum}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q30000000}} (with issue; volume - needs work!)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q30000000
{{Cite Q|Q14558831}} (with arxiv; bibcode)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q14558831
{{Cite Q|Q28597702}} (with biorxiv)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q28597702
{{Cite Q|Q22241718}} (with citeseerx)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q22241718
{{Cite Q|Q28798299}} (with osti)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q28798299
{{Cite Q|Q23327424}} (with ssrn)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q23327424

Book

{{Cite Q|Q25766745}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q25766745
{{Cite Q|Q25766745 |chapter=The Final Cut}} (with chapter specified)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q25766745
{{Cite Q|Q25766745 |pages =48-52}} (with pages)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q25766745
{{Cite Q|Q4784}} (with ISBN 10 & OCLC)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q4784
{{Cite Q|Q14944010}} (edition; with LCCN & OCLC)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q14944010
{{Cite Q|Q21707170}} (with MR)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q21707170
{{Cite Q|Q24969482|volume=1|date=1873}} (with volume & year; note: it is better to create an item for the specific volume)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q24969482
{{Cite Q|Q29581627|series=A series}} (with series)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q29581627

News

Not working at present; needs special handling.


Manuscript

{{Cite Q|Q15664389}} (with hdl)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15664389

Misc

{{Cite Q|Q15901614}} (with ISMN)
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15901614

Mode

{{Cite Q|Q15625490|access-date=18 May 2017|mode=cs1}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value). Wikidata Q15625490
{{Cite Q|Q15625490|access-date=18 May 2017|mode=cs2}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15625490
{{Cite Q|Q25766745|mode=cs1}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value). Wikidata Q25766745
{{Cite Q|Q25766745|mode=cs2}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q25766745

Authormask

{{Cite Q|Q25766745|author-mask=1}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q25766745

Module:Wd

Module:Wd can automatically cause this template to be invoked, e.g.,

{{Wikidata|references|raw|Q2978|P2046}}

currently causes the following to be invoked:

{{Cite Q|Q15707237|pages=242}}
Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).Wikidata Q15707237

because an Lua error in Module:Wd at line 620: attempt to index field 'wikibase' (a nil value). (P2046) statement on Lua error in Module:Wd at line 620: attempt to index field 'wikibase' (a nil value). (Q2978) is referenced to be Lua error in Module:Wd at line 620: attempt to index field 'wikibase' (a nil value). (P248) Lua error in Module:Wd at line 620: attempt to index field 'wikibase' (a nil value). (Q15707237) with Lua error in Module:Wd at line 620: attempt to index field 'wikibase' (a nil value). (P304) = 242.

{{wikidata|references}} is used in a number of places including {{Infobox World Heritage Site}} resulting in the above reference appearing as a reference footnote at Regensburg § History after 1945.

Issues