Template:Cite Q
| From the TfD closure: "[...] works-in-progress should rarely be used in the article space until they are 99% finished/accurate/etc. Until the matter of transcluding Wikidata on Wikipedia is resolved (most likely with a huge and contentious RFC) usage of this template should be extremely vetted to ensure that all of the transcluded information is accurate." |
| This template uses Lua: |
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=cs1or|mode=cs2|page== single page number|pages== multiple page numbers, e.g.27-29or34,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}}
Bibliographic parameters
|authorn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P50)|chapter== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P792)|date== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P577)|editorn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P98)|issue== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P433)|journal== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1433)|others== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P110)|place== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P291)|publisher== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P123)|series== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P179)|title== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1476)|title== wikidata label|url== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P856)|volume== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P478)
Identifier parameters
|arxiv== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P818)|bibcode== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P819)|biorxiv== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3951)|citeseerx== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3784)|doi== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P356)|hdl== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1184)|isbn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P212)|isbn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P957)|ismn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1208)|jstor== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P888)|lccn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1144)|mr== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P889)|oclc== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P243)|ol== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P648)|osti== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3894)|pmc== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P932)|pmid== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P698)|ssrn== Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P893)
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 632: attempt to index field 'wikibase' (a nil value). (P2046) statement on Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Q2978) is referenced to be Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P248) Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Q15707237) with Lua error in Module:Wd at line 632: 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
Multiple author names treated as one blobLinking author name(s)- Title for a book uses
{{ #invoke:WikidataIB |getLink |{{{1}}} }}and may be expensive - What to do if title not in English
- Linking title to Wikipedia article, if any
- Need to fetch ISSN etc. from item about journal
- More properties/ parameters to add
- Parameters with no equivalent property?
- Move Wikidata link before
|quote=(and after other IDs like|pmid=) Fix|ol=values- Need to handle volume, issue and page(s) as qualifiers of journal (see Q30000000 example)
- Check/ resolve handling of redirected QIDs
- Need wider variety of examples/ test cases
Need to add manual date for newspaper articles/ website articles.- Resolve special case of newspaper articles
- Improve date formatting options
- Make publisher a link, where appropriate
- Handle volume in a serial
- Improve handing of unexpected multiple values
- e.g. Handle multiple DOIs
Handle author name string (Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2093)) values (e.g. on Q38000000)- Order of precedence for rendering author names:
- Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1932) qualifier on Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P50)
- Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2093)
- Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P50) label in English
- Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P50) label in any other language
- Regardless of which of the above is used, link to the author biography article if available, via Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P50) (matched via Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1545) if applicable)
Handle pseudonymous author personas such as P. D. Q. Bach or Mark Twain