Template:Cite Q/doc
This is a documentation subpage for Template:Cite Q. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
Usage
[edit source]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.
Future developments
[edit source]- 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 [[:mediawiki:|Global templates|lobal template repository]], so the code can be used by multiple wikis, without having to manually copy it after every update.g
Parameters
[edit source]|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
[edit source]<ref name="">{{Cite Q| XXQIDXX }}</ref>
Reference naming
[edit source]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
[edit source]This section lists where each of the template's supported parameters gets its data. P734}} Template:Columns-start
Bibliographic parameters
[edit source]|authorn=
= author (P50); author name string (P2093)|chapter=
= chapter (P792)|date=
= publication date (P577)|editorn=
= editor (P98)|issue=
= issue (P433)|journal=
= published in (P1433)|language=
= language of work or name (P407)|others=
= composer (P86), illustrator (P110)|place=
= place of publication (P291)|publisher=
= publisher (P123)|series=
= part of the series (P179)|title=
= title (P1476)|title=
= Wikidata label|url=
= full work available at URL (P953), official website (P856), URL (P2699)|volume=
= volume (P478)
Identifier parameters
[edit source]|arxiv=
= arXiv ID (P818)|bibcode=
= ADS bibcode (P819)|biorxiv=
= BioRxiv ID (P3951)|citeseerx=
= CiteSeerX article ID (former scheme) (P3784)|doi=
= DOI (P356)|hdl=
= Handle ID (P1184)|isbn=
= ISBN-13 (P212)|isbn=
= ISBN-10 (P957)|ismn=
= ISMN (P1208)|jstor=
= JSTOR article ID (P888)|lccn=
= Library of Congress Control Number (LCCN) (bibliographic) (P1144)|mr=
= Mathematical Reviews ID (P889)|oclc=
= OCLC control number (P243)|ol=
= Open Library ID (P648)|osti=
= OSTI article ID (P3894)|pmc=
= PMC publication ID (P932)|pmid=
= PubMed publication ID (P698)|ssrn=
= SSRN article ID (P893)
Examples
[edit 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). doi:10.1371/JOURNAL.PONE.0010676. Wikidata Q15625490. ISSN 1932-6203. PMID 20505760. PMC 2873961. http://europepmc.org/abstract/MED/20505760.
{{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. doi:10.1371/JOURNAL.PONE.0010676. Wikidata Q15625490. ISSN 1932-6203. PMID 20505760. PMC 2873961. http://europepmc.org/abstract/MED/20505760.
{{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). doi:10.1371/JOURNAL.PONE.0010676. Wikidata Q15625490. ISSN 1932-6203. PMID 20505760. PMC 2873961. http://europepmc.org/abstract/MED/20505760. Retrieved 18 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). doi:10.1371/JOURNAL.PONE.0010676. Wikidata Q15625490. ISSN 1932-6203. PMID 20505760. PMC 2873961. http://europepmc.org/abstract/MED/20505760. "lorem ipsum"
{{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). doi:10.1371/JOURNAL.PONE.0010676. Wikidata Q15625490. ISSN 1932-6203. PMID 20505760. PMC 2873961. http://europepmc.org/abstract/MED/20505760. Retrieved 18 May 2017.
{{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.
Module:Wd
[edit source]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. "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
[edit source]- Render subtitle (P1680), following the title with a
:
- More properties/ parameters to add
- Parameters with no equivalent property?
- Move Wikidata link before
|quote=
(and after other IDs like|pmid=
)- Can be achieved by passing to {{Citation}}'s
|id
parameter
- Can be achieved by passing to {{Citation}}'s
- Check/ resolve handling of redirected QID
- Resolve special case of newspaper articles
- Improve date formatting options
- Handle volume in a serial
- Order of precedence for rendering author names:
- object named as (P1932) qualifier on author (P50)
- author name string (P2093)
- author (P50) label in English
- author (P50) label in any other language
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)
- Author names (Western-style, at least) should display as "Last, First Middle" to match Wikipedia house style
- How to deal with Tussenvoegsels
- Are there values of
|others
which are not illustrators? Possibly:- signatories
- presenter
- performer
- Add a tracking category for references with a Template:WDP statement
- Add a tracking category for references with a Template:WDP statement
- 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>
!
- Avoid
- Consider case where author is given as et al. (Q311624)
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
Multiple author names treated as one blobLinking author name(s)Title for a book uses{{ #invoke:WikidataIB |getLink |{{{1}}} }}
and may be expensiveFix|ol=
valuesNeed to add manual date for newspaper articles/ website articles.Make publisher a link, where appropriateImprove handing of unexpected multiple valuese.g. Handle multiple DOIs
Handle author name string (author name string (P2093)) values (e.g. on Q38000000)Handle pseudonymous author personas such as P. D. Q. Bach or Mark TwainWhat to do if title not in EnglishNeed to handle volume, issue and page(s) as qualifiers of published in (P1433)Need wider variety of examples/ test casesIf 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 thatTheurl
parameter should also pick up data from the properties full work available at URL (P953) and URL (P2699)Linking title to Wikipedia article, if anyNeed to fetch ISSN etc. from item about journal