Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template:Cite Q

Permanently protected template
From Wikipedia, the free encyclopedia
Template documentation[view] [edit] [history] [purge]
WarningThis template is used onapproximately 17,000 pages and changes may be widely noticed. Test changes in the template's/sandbox or/testcases subpages, or in your ownuser subpage. Consider discussing changes on thetalk page before implementing them.
From theTfD 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 usesLua:
This template uses one or moreWikidata properties; see§ Parameter / entity map for details.

This template, a wrapper for{{Citation}}, returns a formatted citation from statements stored on aWikidata item (referred to by itsQ identifier orQID) describing a citable source such as a scholarly article.

You can read about the template in:

Mike Peel;Andy Mabbett (14 January 2021)."Automatically maintained citations with Wikidata and Cite Q".Diff.Wikidata Q104831003.

Note: While Wikipediadoes not regard Wikidata as a reliable source, citations using Cite Q arenot citing Wikidata; they cite the individual work stated, using metadata about that work, which is held on Wikidata for convenience.

Usage

For example, Wikidata itemBiodiversity assessment of the fishes of Saba Bank atoll, Netherlands Antilles(Q15625490), which uses the Wikidata QIDQ15625490, is a scholarly item. To cite this as a source:

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

An example of an article using this template forall of its references isSouth Pole Telescope; an example using Harvard style citations isSuffix 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 toall displays them all. The same applies to multiple editors – see the test-case pages.

You can also use{{Cite Q bulleted}} if you want to have a bullet returned before the citation (useful for automatic lists)

Parameters

  • |1= = WikidataQID 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 ofunset, will suppress display of data from Wikidata.

Blank

<ref name="">{{Cite Q|Q00000000}}</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

Archival 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 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 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. Retrieved18 May 2017.
{{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 Q|Q25766745}}
Andy Mabbett (2010),Chris Charlesworth (ed.),Pink Floyd: The Music and the Mystery, London:Omnibus Press,OCLC 762731304,OL 16228023W,Wikidata Q25766745
{{Cite Q|Q25766745 |chapter=The Final Cut}} (with chapter specified)
Andy Mabbett (2010), "The Final Cut", inChris Charlesworth (ed.),Pink Floyd: The Music and the Mystery, London: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, London: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. Retrieved18 May 2017.
{{Cite Q|Q25766745|mode=cs1}}
Andy Mabbett (2010).Chris Charlesworth (ed.).Pink Floyd: The Music and the Mystery. London: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, London: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, London:Omnibus Press,OCLC 762731304,OL 16228023W,Wikidata Q25766745
{{Cite Q|Q25766745|editor=unset}}
Andy Mabbett (2010),Pink Floyd: The Music and the Mystery, London:Omnibus Press,OCLC 762731304,OL 16228023W,Wikidata Q25766745

For an example of a bibliography, updated periodically byListeriabot, seeUser:Mike Peel/publications.

For additional examples, seetestcases andtestcases/many names.

Searching

Finding all citations

Citations for specific a work (for exampleReference to Some of the Works Executed in Stained Glass(Q106612012)) can be searched using the stringinsource:Q106612012, resulting in[1].

To avoid most extraneous results (such as this documentation page), useinsource:Q|Q106612012 OR insource:Q |Q106612012 (again, without quotes), and limit the namespaces:[2].

Find the Wikidata entry

The Wikidata item for a citation is linked in the content created by this template. Links are not visible in the edit window when using the source editor, but can be seen inpreviews.

To navigate to the Wikidata entry, copy the QID and search the preview panel or the rendered article to find the link to Wikidata. Alternatively, prefix the QID withd: and place the result in thesearch bar.

Matching existing citation formats

The template used with a single parameter, the QID of the article on Wikidata, will produce a citation using the default display parameters fromTemplate: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 atWP: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:

  1. Order of first and last names of authors and editors:
    A typical output might be:
    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. Seed: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]]&nbsp;[[: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:
  2. Punctuation:
    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:
  3. Italicisation in titles:
    Titles drawn from Wikidata cannot contain formatting, so editors using{{Cite Q}} may have to add appropriate formatting.
    {{Citation}} will automatically apply italicisation to titles of books, etc. so that does not need to be added:
    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:

Module:Wd

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

{{Wikidata|references|raw|Q2978|P2046|P585=1987-05-25}}
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

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 anarea(P2046) statement onRegensburg(Q2978) is referenced to bestated in(P248)Amtliches Ortsverzeichnis für Bayern (1991)(Q15707237) withpage(s)(P304) = 242.

Issues

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 moreCiteVar wars!
  • We should have aglobal template repository, so the code can be used by multiple wikis, without having to manually copy it after every update.

To do list

  • Properties
    • More properties/ parameters to add
    • Parameters with no equivalent property?
  • Internationalisation
  • Check/resolve handling of redirected QID
  • Order of precedence for rendering author names:
    1. object named as(P1932) qualifier onauthor(P50)
    2. subject named as(P1810) qualifier onauthor(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
  • Link to Wikisource should take priority over all URL properties, but only if accompanied bydocument 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 toSpecial: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 asvarious authors(Q2818964), the label should start with an upper case letter
    • Quick and dirty workaround:{{ucfirst:{{Cite Q|xxxx}}
  • Makethis 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 consider how to use|url-status=
  • Usetitle in HTML(P6833), where present.
  • Ability to cite chapters, perTemplate talk:Cite Q#Cite Q chapter broken
  • Use something likeliteral translation(P2441) so that|trans-title=is used to provide the English translated title, if present, in addition to the non-English original title.

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 withTussenvoegsels 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. onQ38000000)
  • Pseudonymous author personas such asP. D. Q. Bach orMark Twain
  • Title not in English
  • Handle volume, issue and page(s) as qualifiers ofpublished 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
  • Theurl parameter should also pick up data from the propertieswork available at URL(P953) andURL(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 addSICI andBICI 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 areplaced by(P1366) statement
  • Add a tracking category for references with aretracted by(P5824) statement
  • Rendersubtitle(P1680), following the title with a:
  • Convert WikiData's edition number (e.g.,1) into the ordinal (1st) expected by{{citation}}.

Won't fix

Tracking categories

See also

Template data

Generate citations from Wikidata by passing the QID to this template

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
QID1

The Wikidata QID of the cited source

Stringrequired
Authorauthor

Use for Last, First format

Example
Prymachenko, Maria
Stringoptional
Author Linkauthorlink

Wikipedia article title, use with Author

Example
Maria Prymachenko
Stringoptional
The abovedocumentation istranscluded fromTemplate:Cite Q/doc.(edit |history)
Editors can experiment in this template'ssandbox(edit |diff) andtestcases(edit) pages.
Add categories to the/doc subpage.Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Cite_Q&oldid=1039878250"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp