This template is used on approximately 53,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Preview message: Transclusion count updated automatically (see documentation).
From the TfD closure: "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, a wrapper for {{Citation}}, returns a formatted citation from statements stored on a Wikidata item (referred to by its Q identifier or QID) describing a citable source such as a scholarly article.
Note: While Wikipedia does not regard Wikidata as a reliable source, citations using Cite Q are not citing Wikidata; they cite the individual work stated, using metadata about that work, which is held on Wikidata for convenience.
An example of an article using this template for all of its references is South Pole Telescope; an example using Harvard style citations is Suffix automaton.
By default, if there are more than eight author names, the template displays three, followed by "et al". This can be changed using |display-authors=; setting that parameter to all displays them all. The same applies to multiple editors – see the test-case pages.
Additionally, any named parameter used in {{citation}} may be entered and will overwrite the value in Wikidata. Using such parameters, with a value of unset, will suppress display of data from Wikidata.
The template used with a single parameter, the Q-number of the article on Wikidata, will produce a citation using the default display parameters from Template:Citation and the styling of the author and editor names as they are stored on Wikidata. This is rarely the same as required by the citation formatting in any given article. The guidance at WP:CITEVAR requires that editors match the formatting of citations that they add to that of the article where it is added. At present, {{Cite Q}} does not know what style the formatting in an article requires (although it is possible that common styles could be marked or recognised automatically as is done for date formatting).
The result is that editors using {{Cite Q}} must take care to preview their edits and ensure that the formatting rendered matches that of the rest of the article. The commonest formatting issues are:
Order of first and last names of authors and editors:
If that were used in an article that used "Last, First" format for author names, then the editor would have to find a way to format the Cite Q author names correctly. The best option, which will apply to all articles using Cite Q with a given ID, is to modify the Wikidata property for each author and editor, adding "object named as" with the author's name in "Last, First" format. See d:Q45922947#P98 for an example.
Editors can also supply those author names manually in the desired format within the Cite Q template. It's often worth previewing the citation in expanded form to show what is being passed to the actual citation template:
{{Cite Q |Q15625490 |expand=yes}} →
{{Cite journal|author-link1=Jeffrey T. Williams |author-link2=Kent E. Carpenter |author1=Jeffrey T. Williams |author2=Kent E. Carpenter |author3=James L. Van Tassell |author4=Paul Hoetjes |author5=Wes Toller |author6=Peter Etnoyer |author7=Michael Smith |bibcode=2010PLoSO...510676W |doi=10.1371/JOURNAL.PONE.0010676 |id=[[WDQ (identifier)|Wikidata]] [[:d:Q15625490|Q15625490]]|issn=1932-6203 |issue=5 |journal=[[PLOS One|PLOS One]]|language=en |pmc=2873961 |pmid=20505760 |publication-date=21 May 2010 |title=Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles |url=http://europepmc.org/abstract/MED/20505760 |volume=5}}
That would make the author names (and author-links) easily available for copy and paste, followed by tweaking into the desired format:
{{Cite Q |Q15625490 |author6=Etnoyer, Peter |author4=Hoetjes, Paul |author7=Smith, Michael |author5=Toller, Wes |author3=Van Tassell, James L. |author-link2=Kent E. Carpenter |author1=Williams, Jeffrey T. |author2=Carpenter, Kent E.}} →
The separators between elements in the above citation is a comma, which is the default for a CS2-style format produced by {{Citation}}. Careful examination in a particular article will often show the separator punctuation to be a full stop (period). That may be selected by setting |mode=cs1:
{{Cite Q |Q15625490 |author6=Etnoyer, Peter |author4=Hoetjes, Paul |author7=Smith, Michael |author5=Toller, Wes |author3=Van Tassell, James L. |author-link2=Kent E. Carpenter |author1=Williams, Jeffrey T. |author2=Carpenter, Kent E. |mode=cs1}} →
Sometimes, the article will have author names with initials, and those initials are terminated with a full stop (period). It may be necessary to manually add or remove the punctuation in the author names to match the style of the target article (note: this does not apply to author-links, which match the title of the author's article):
{{Cite Q |Q15625490 |author6=Etnoyer, Peter |author4=Hoetjes, Paul |author7=Smith, Michael |author5=Toller, Wes |author3=Van Tassell, James L. |author-link2=Kent E. Carpenter |author1=Williams, Jeffrey T. |author2=Carpenter, Kent E. |mode=cs1}} →
However, some titles require partial italicisation, and that has to be done manually when the whole title is not italicised, although that is rare. Titles of chapters may also need to be checked:
For example (from ISBN978-0-521-32115-0): |chapter= ''Porphyra'' as food: cultivation and economic
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!
We should have a global template repository, so the code can be used by multiple wikis, without having to manually copy it after every update.
Regardless of which of the above is used, link to the author biography article if available, via author (P50) (matched via series ordinal (P1545) if applicable)
Add tracking categories for each parameter where the local value differs from the corresponding WD value so that either the WD entry can be updated/corrected or the local override can be corrected/removed
Other tracking categories?
Links to sister projects: Wikisource, if a transcription project exists; Wikibooks; Wikiversity (esp. the WikiJournals there); perhaps more
Avoid <ref name="dicc">{{Cite Q|Q100160262}} {{cite wikisource|wslanguage=pt|wslink=Diccionario Bibliographico Brazileiro/Francisco Antonio de Almeida|title=Transcription}}</ref>!
Where there is a Wikipedia article about the work cited, link the title to that, overriding the URL if necessary (example: d:Q25766745)
Ditto for editions of works
At present a WD pages entry of "1" will result in |pages=1–1 (and metadata &rft.pages=1-1) rather than |page=1 (and metadata &rft.pages=1).
Implement evaluation of generic keyword for all parameters to denote that a WD value should be accepted by framing its value in accept-this-as-written markup ((..)). See talk thread for possible keyword names.
Check all parameter aliases when scanning for override parameters (at present some alias parameter names are ignored, possibly leading to inconsistent behaviour if they are set as well).
Take possible template parameter usage as hint which parameter to use in the generated output. F.e. if the journal/magazine/newspaper parameter is used, the template should use the same in the output. The underlying template {citation} will switch the output format accordingly.
Try to utilize given parameter values as filter for retrieved WD data. If an editor specifies |edition=2 or |volume=3, cite Q should select correlating data (f.e. page ranges, identifiers etc.) while retrieving data from WD (in cases where more than one entry is available for a particular parameter)
When the author is cited as various authors (Q2818964), the label should start with an upper case letter
Quick and dirty workaround: {{ucfirst:{{Cite Q|xxxx}}
Fix unnecessary piping of author/editor and journal links if link and label are the same, f.e. [[Author|Author]] -> [[Author]], [[Journal|Journal]] -> [[Journal]] for improved reusability, cleaniness of output, reduced size of resulting page code, and to avoid potential future extra text errors thrown by the underlying {citation} template
See talk
Fix invocation with |qid= instead of unnamed parameter. At present {{cite Q|qid=Q12345}} instead of {{cite Q|Q12345}} gives an error.
meta:WikiCite and d:Wikidata:WikiProject Source Metadata - goals of those projects include the management of citations across Wikimedia projects and better insight into research resources through Wikimedia projects.