Jump to content

Template:Cite Q/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
When was "the matter of transcluding Wikidata on Wikipedia [...] resolved"?
Tags: Undo Reverted
Undid revision 994253340 by Pppery (talk) It is 99% finished now? Stop cherry-picking wording from the RfC.
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{high use}}
{{high use}}
{{warning|From the [[Wikipedia:Templates for discussion/Log/2017 September 15#Template:Cite Q|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."}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Lua|Module:Cite Q|Module:WikidataIB|Module:Wd|Module:String}}
{{Lua|Module:Cite Q|Module:WikidataIB|Module:Wd|Module:String}}

Revision as of 20:27, 14 December 2020

Usage

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

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=; using that parameter with no value displays them all. The same applies to multiple editors - see the test-case pages.

Citations of papers which have been retracted (is retracted by (P5824)) will appear in Category:Cite Q - cites a retracted work.

Citations of papers which have been replaced (replaced by (P1366)) will appear in Category:Cite Q - cites a replaced work.

Future developments

  • 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.

Parameters

  • |1= = Wikidata QID for the article

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.

Blank

<ref name="">{{Cite Q| XXQIDXX }}</ref>

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.

Bibliographic parameters

Identifier parameters

Examples

{{Cite Q|Q15625490}}
Jeffrey T. Williams; Kent E. Carpenter; James L. Van Tassell; Paul Hoetjes; Wes Toller; Peter Etnoyer; Michael Smith (21 May 2010). "Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles". PLOS One. 5 (5). Bibcode:2010PLoSO...510676W. doi:10.1371/JOURNAL.PONE.0010676. ISSN 1932-6203. PMC 2873961. PMID 20505760. Wikidata Q15625490.{{cite journal}}: CS1 maint: unflagged free DOI (link)
{{Cite Q|Q15625490|page=42}}
Jeffrey T. Williams; Kent E. Carpenter; James L. Van Tassell; Paul Hoetjes; Wes Toller; Peter Etnoyer; Michael Smith (21 May 2010). "Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles". PLOS One. 5 (5): 42. Bibcode:2010PLoSO...510676W. doi:10.1371/JOURNAL.PONE.0010676. ISSN 1932-6203. PMC 2873961. PMID 20505760. Wikidata Q15625490.{{cite journal}}: CS1 maint: unflagged free DOI (link)
{{Cite Q|Q15625490|access-date=18 May 2017}}
Jeffrey T. Williams; Kent E. Carpenter; James L. Van Tassell; Paul Hoetjes; Wes Toller; Peter Etnoyer; Michael Smith (21 May 2010). "Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles". PLOS One. 5 (5). Bibcode:2010PLoSO...510676W. doi:10.1371/JOURNAL.PONE.0010676. ISSN 1932-6203. PMC 2873961. PMID 20505760. Wikidata Q15625490. Retrieved 18 May 2017.{{cite journal}}: CS1 maint: unflagged free DOI (link)
{{Cite Q|Q15625490|quote=lorem ipsum}}
Jeffrey T. Williams; Kent E. Carpenter; James L. Van Tassell; Paul Hoetjes; Wes Toller; Peter Etnoyer; Michael Smith (21 May 2010). "Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles". PLOS One. 5 (5). Bibcode:2010PLoSO...510676W. doi:10.1371/JOURNAL.PONE.0010676. ISSN 1932-6203. PMC 2873961. PMID 20505760. Wikidata Q15625490. lorem ipsum{{cite journal}}: CS1 maint: unflagged free DOI (link)
{{Cite Q|Q25766745}}
Andy Mabbett (2010), Chris Charlesworth (ed.), Pink Floyd: The Music and the Mystery, Omnibus Press, OCLC 762731304, OL 16228023W, Wikidata Q25766745
{{Cite Q|Q25766745 |chapter=The Final Cut}} (with chapter specified)
Andy Mabbett (2010), "The Final Cut", in Chris Charlesworth (ed.), Pink Floyd: The Music and the Mystery, Omnibus Press, OCLC 762731304, OL 16228023W, Wikidata Q25766745
{{Cite Q|Q25766745 |pages=48-52}} (with pages)
Andy Mabbett (2010), Chris Charlesworth (ed.), Pink Floyd: The Music and the Mystery, Omnibus Press, pp. 48–52, OCLC 762731304, OL 16228023W, Wikidata Q25766745
{{Cite Q|Q15625490|access-date=18 May 2017}}
Jeffrey T. Williams; Kent E. Carpenter; James L. Van Tassell; Paul Hoetjes; Wes Toller; Peter Etnoyer; Michael Smith (21 May 2010). "Biodiversity Assessment of the Fishes of Saba Bank Atoll, Netherlands Antilles". PLOS One. 5 (5). Bibcode:2010PLoSO...510676W. doi:10.1371/JOURNAL.PONE.0010676. ISSN 1932-6203. PMC 2873961. PMID 20505760. Wikidata Q15625490. Retrieved 18 May 2017.{{cite journal}}: CS1 maint: unflagged free DOI (link)
{{Cite Q|Q25766745|mode=cs1}}
Andy Mabbett (2010). Chris Charlesworth (ed.). Pink Floyd: The Music and the Mystery. Omnibus Press. OCLC 762731304. OL 16228023W. Wikidata Q25766745.
{{Cite Q|Q25766745|mode=cs2}}
Andy Mabbett (2010), Chris Charlesworth (ed.), Pink Floyd: The Music and the Mystery, Omnibus Press, OCLC 762731304, OL 16228023W, Wikidata Q25766745
{{Cite Q|Q25766745|author-mask=1}}
— (2010), Chris Charlesworth (ed.), Pink Floyd: The Music and the Mystery, Omnibus Press, OCLC 762731304, OL 16228023W, Wikidata Q25766745

For additional examples, see testcases and testcases/many names.

Module:Wd

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

{{Wikidata|references|raw|Q2978|P2046}}
https://www.destatis.de/DE/ZahlenFakten/LaenderRegionen/Regionales/Gemeindeverzeichnis/Administrativ/Aktuell/05Staedte.html. {{cite web}}: Missing or empty |title= (help) "Alle politisch selbständigen Gemeinden mit ausgewählten Merkmalen am 31.12.2018 (4. Quartal)". Federal Statistical Office. Archived from the original on 10 March 2019. Retrieved 10 March 2019.

currently causes the following to be invoked:

{{Cite Q|Q15707237|pages=242}}
Bavarian State Office for Statistics and Data, ed. (1991), Amtliches Ortsverzeichnis für Bayern (in German), Munich: Bavarian State Office for Statistics and Data, p. 242, Wikidata Q15707237

because an area (P2046) statement on Regensburg (Q2978) is referenced to be stated in (P248) Amtliches Ortsverzeichnis für Bayern (1991) (Q15707237) with page(s) (P304) = 242.

Issues

  • Properties
    • More properties/ parameters to add
    • Parameters with no equivalent property?
  • Internationalisation
  • Check/resolve handling of redirected QID
  • Render subtitle (P1680), following the title with a :
  • Order of precedence for rendering author names:
    1. object named as (P1932) qualifier on author (P50)
    2. subject named as (P1810) qualifier on author (P50)
    3. author name string (P2093)
    4. author (P50) label in English
    5. author (P50) label in any other language
  • 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
  • Consider case where author is given as et al. (Q311624)
    • If last author/editor is named "et al." (and variants), mute this entry and set display-authors/editors=etal instead before passing down to {citation}
  • Link to Wikisource should take priority over all URL properties, but only if accompanied by document file on Wikimedia Commons (P996). If not, document file on Wikimedia Commons (P996) should take precedence over URLs.
  • 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).
  • Consider including a link to Special:EntityUsage, in the form, say, Other cites or with a small icon.
  • 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}}
  • Convert WikiData's edition number (e.g., 1) into the ordinal (1st) expected by {{citation}}.
  • Make this fix unnecessary.
  • Add indication alongside citations of retracted/ replaced works
  • Consider cases where citing a retracted/ replaced work is deliberate
  • Make use of |archive-url=, |archive-date=, and consisder how to use |url-status=

Deferred

Feel free to tackle these; the core team working on Cite Q sees them as low priority, or too complex.

  • Resolve special case of newspaper articles
    • Is the following topic of "hint parameters" related to this?
  • Author names (Western-style, at least) should display as "Last, First Middle" to match Wikipedia house style
    • How to deal with Tussenvoegsels etc.
      • In Romance languages, it should be, e.g., "Quental, Antero de" instead of "de Quental, Antero"
  • Handle volume in a serial
    • Clarification needed: What is meant by this? |part=, or output format differences journal vs. magazine?
  • Is there a Pxxxx code for book series editors to add them to the list of "normal" editors?
    • resolve at Wikidata first

Done

  • Multiple author names treated as one blob
  • Linking author name(s)
  • Title for a book uses {{ #invoke:WikidataIB |getLink |{{{1}}} }} and may be expensive
  • Fix |ol= values
  • Need to add manual date for newspaper articles/ website articles.
  • Make publisher a link, where appropriate
  • Improve handing of unexpected multiple values
    • e.g. Handle multiple DOIs
  • Author name string (author name string (P2093)) values (e.g. on Q38000000)
  • Pseudonymous author personas such as P. D. Q. Bach or Mark Twain
  • Title not in English
  • Handle volume, issue and page(s) as qualifiers of published in (P1433)
  • Wider variety of examples/ test cases
  • If language of work or name is set (and not the local language); pass that; if not but language of title is set (and not the local language), use that
  • The url parameter should also pick up data from the properties full work available at URL (P953) and URL (P2699)
  • Linking title to Wikipedia article, if any
  • Fetch ISSN etc. from item about journal
  • Move Wikidata link before |quote= (and after other IDs like |pmid=)
    • Also fixes postscript character issues in conjunction with |mode=cs1 and with |quote=
  • Fix page evaluation code to accept comma- and semicolon-separated lists
  • Use canonical parameter names when calling down to {citation} (f.e. |page= rather than |p=)
  • Is there a Pxxxx code for SBNs (Standard Book Number to support |sbn= parameter?
    • Apparently not -> Add SBN property to WD. (Also add SICI and BICI properties corresponding with COinS &rft.sici and &rft.bici.)
  • Is there a Pxxxx code for JFM (Jahrbuch über die Fortschritte der Mathematik) to support |jfm= parameter?
  • Are there values of |others which are not illustrators? Possibly:
  • Add a tracking category for references with a replaced by (P1366) statement
  • Add a tracking category for references with a is retracted by (P5824) statement

Won't fix

  • Improve date formatting options
  • 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.
    • This is intended; please discuss on talk

Template data

Generate citations from Wikidata by passing the QID to this template

Template parameters

ParameterDescriptionTypeStatus
11

The Wikidata QID to use

Stringoptional