Difference between revisions of "Template:Cite Q/doc"
(add all invoke references) |
imported>NMaia |
||
| (121 intermediate revisions by 17 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| + | {{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: | + | {{Lua|Module:Cite Q|Module:WikidataIB|Module:Wd|Module:String}} |
| + | {{Uses Wikidata}} | ||
== Usage == | == Usage == | ||
| − | A | + | A wrapper for {{Tl|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 {{para|display-authors}}; using that parameter with no value displays them all. The same applies to multiple editors - see the test-case pages. | ||
=== Future developments === | === Future developments === | ||
| − | |||
* Once robust the functionality should be merged into {{Tl|Citation}} | * Once robust the functionality should be merged into {{Tl|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 [[WP:CITEVAR|CiteVar]] wars! | * 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 [[WP:CITEVAR|CiteVar]] wars! | ||
| + | * We should have a [[:mw:Global templates|global template repository]], so the code can be used by multiple wikis, without having to manually copy it after every update. | ||
===Parameters === | ===Parameters === | ||
* {{para|1}} = Wikidata QID for the article | * {{para|1}} = Wikidata QID for the article | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | Additionally, any named parameter used in {{tl|citation}} may be entered and will overwrite the value in Wikidata. Using such parameters, with a value of <code>unset</code>, will suppress display of data from Wikidata. | |
=== Blank === | === Blank === | ||
| − | :<code><nowiki>{{Cite Q| XXQIDXX | + | :<code><nowiki><ref name="">{{Cite Q| XXQIDXX }}</ref></nowiki></code> |
=== Reference naming === | === Reference naming === | ||
| Line 42: | Line 36: | ||
:<code><nowiki><ref name="Williams-2010">{{Cite Q|Q15625490}}</ref></nowiki></code> | :<code><nowiki><ref name="Williams-2010">{{Cite Q|Q15625490}}</ref></nowiki></code> | ||
| − | === | + | ===Parameter / entity map=== |
| + | This section lists where each of the template's supported parameters gets its data. | ||
| + | |||
| + | {{Columns-start}} | ||
| + | ====Bibliographic parameters==== | ||
| + | *{{para|at}} = {{WDP|P958}} | ||
| + | *{{para|author''n''}} = {{WDP|P50}}; {{WDP|P2093}} | ||
| + | *{{para|chapter}} = {{WDP|P792}} | ||
| + | <!-- *{{para|contributor''n''}} = {{WDP|P2680}}, {{WDP|P1891}} --> | ||
| + | *{{para|edition}} = {{WDP|P393}} | ||
| + | *{{para|editor''n''}} = {{WDP|P98}}; {{WDP|P5769}} | ||
| + | *{{para|issue}} = {{WDP|P433}} | ||
| + | *{{para|journal}} = {{WDP|P1433}} | ||
| + | *{{para|language}} = {{WDP|P407}} | ||
| + | *{{para|pages}} = {{WDP|P304}} | ||
| + | *{{para|place}} = {{WDP|P1071}} (for written-at place) | ||
| + | *{{para|publication-date}} = {{WDP|P577}} (treated like {{para|date}} unless both are given) | ||
| + | *{{para|publication-place}} = {{WDP|P291}} (for publication place, treated like {{para|place}} unless both are given) | ||
| + | *{{para|publisher}} = {{WDP|P123}} | ||
| + | *{{para|series}} = {{WDP|P179}} | ||
| + | *{{para|title}} = {{WDP|P1476}} (Wikidata label) | ||
| + | *{{para|translator''n''}} = {{WDP|P655}} | ||
| + | *{{para|url}} = {{WDP|P953}}, {{WDP|P856}}, {{WDP|P2699}} | ||
| + | *{{para|version}} = {{WDP|P348}} | ||
| + | *{{para|volume}} = {{WDP|P478}} | ||
| + | *{{para|others}} = {{WDP|P86}}, {{WDP|P110}}, {{WDP|P2679}}, {{WDP|P371}}, {{WDP|P175}} | ||
| + | {{Column}} | ||
| − | + | ====Identifier parameters==== | |
| + | *{{para|asin}} = {{WDP|P5749}} (add {{para|asin-tld}} for some locales) | ||
| + | *{{para|arxiv}} = {{WDP|P818}} | ||
| + | *{{para|bibcode}} = {{WDP|P819}} (add {{para|bibcode-access}} to indicate free) | ||
| + | *{{para|biorxiv}} = {{WDP|P3951}} | ||
| + | *{{para|citeseerx}} = {{WDP|P3784}} | ||
| + | *{{para|doi}} = {{WDP|P356}} (add {{para|doi-access}} to indicate free; add {{para|doi-broken-date}} if deprecated) | ||
| + | *{{para|hdl}} = {{WDP|P1184}} (add {{para|hdl-access}} to indicate free) | ||
| + | *{{para|isbn}} = {{WDP|P212}} (falls back to {{WDP|P957}}) | ||
| + | *{{para|ismn}} = {{WDP|P1208}} | ||
| + | *{{para|issn}} = {{WDP|P236}} | ||
| + | *{{para|jstor}} = {{WDP|P888}} (add {{para|jstor-access}} to indicate free) | ||
| + | *{{para|lccn}} = {{WDP|P1144}} | ||
| + | *{{para|mr}} = {{WDP|P889}} | ||
| + | *{{para|oclc}} = {{WDP|P243}} | ||
| + | *{{para|ol}} = {{WDP|P648}} (add {{para|ol-access}} to indicate free) | ||
| + | *{{para|osti}} = {{WDP|P3894}} (add {{para|osti-access}} to indicate free) | ||
| + | *{{para|pmc}} = {{WDP|P932}} (add {{para|pmc-embargo-date}} if embargoed) | ||
| + | *{{para|pmid}} = {{WDP|P698}} | ||
| + | *{{para|rfc}} = {{WDP|P892}} | ||
| + | *{{para|ssrn}} = {{WDP|P893}} | ||
| + | *{{para|s2cid}} = {{WDP|P8299}} (add {{para|s2cid-access}} to indicate free) | ||
| + | *{{para|zbl}} = {{WDP|P894}} | ||
| + | {{Columns-end}} | ||
| − | === | + | === Examples === |
;<code><nowiki>{{Cite Q|Q15625490}}</nowiki></code> | ;<code><nowiki>{{Cite Q|Q15625490}}</nowiki></code> | ||
| Line 56: | Line 99: | ||
;<code><nowiki>{{Cite Q|Q15625490|quote=lorem ipsum}}</nowiki></code> | ;<code><nowiki>{{Cite Q|Q15625490|quote=lorem ipsum}}</nowiki></code> | ||
:{{Cite Q|Q15625490|quote=lorem ipsum}} | :{{Cite Q|Q15625490|quote=lorem ipsum}} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
;<code><nowiki>{{Cite Q|Q25766745}}</nowiki></code> | ;<code><nowiki>{{Cite Q|Q25766745}}</nowiki></code> | ||
:{{Cite Q|Q25766745}} | :{{Cite Q|Q25766745}} | ||
;<code><nowiki>{{Cite Q|Q25766745 |chapter=The Final Cut}}</nowiki></code> (with chapter specified) | ;<code><nowiki>{{Cite Q|Q25766745 |chapter=The Final Cut}}</nowiki></code> (with chapter specified) | ||
:{{Cite Q|Q25766745 |chapter=The Final Cut}} | :{{Cite Q|Q25766745 |chapter=The Final Cut}} | ||
| − | ;<code><nowiki>{{Cite Q|Q25766745 |pages =48-52}}</nowiki></code> (with pages) | + | ;<code><nowiki>{{Cite Q|Q25766745 |pages=48-52}}</nowiki></code> (with pages) |
| − | :{{Cite Q|Q25766745 |pages =48-52 | + | :{{Cite Q|Q25766745 |pages=48-52}} |
| − | + | ;<code><nowiki>{{Cite Q|Q15625490|access-date=18 May 2017}}</nowiki></code> | |
| − | + | :{{Cite Q|Q15625490|access-date=18 May 2017}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | ;<code><nowiki>{{Cite Q|Q15625490|access-date=18 May 2017 | ||
| − | :{{Cite Q|Q15625490|access-date=18 May 2017 | ||
;<code><nowiki>{{Cite Q|Q25766745|mode=cs1}}</nowiki></code> | ;<code><nowiki>{{Cite Q|Q25766745|mode=cs1}}</nowiki></code> | ||
:{{Cite Q|Q25766745|mode=cs1}} | :{{Cite Q|Q25766745|mode=cs1}} | ||
;<code><nowiki>{{Cite Q|Q25766745|mode=cs2}}</nowiki></code> | ;<code><nowiki>{{Cite Q|Q25766745|mode=cs2}}</nowiki></code> | ||
:{{Cite Q|Q25766745|mode=cs2}} | :{{Cite Q|Q25766745|mode=cs2}} | ||
| + | ;<code><nowiki>{{Cite Q|Q25766745|author-mask=1}}</nowiki></code> | ||
| + | :{{Cite Q|Q25766745|author-mask=1}} | ||
| + | |||
| + | For additional examples, see [[Template:Cite Q/testcases|testcases]] and [[Template:Cite Q/testcases/many names|testcases/many names]]. | ||
| − | == | + | == Module:Wd == |
| − | ;<code><nowiki>{{Cite Q| | + | [[Module:Wd]] can automatically cause this template to be invoked, e.g., |
| − | :{{Cite Q| | + | ;<code><nowiki>{{Wikidata|references|raw|Q2978|P2046}}</nowiki></code> |
| + | :{{Wikidata|references|raw|Q2978|P2046}} | ||
| + | currently causes the following to be invoked: | ||
| + | ;<code><nowiki>{{Cite Q|Q15707237|pages=242}}</nowiki></code> | ||
| + | :{{Cite Q|Q15707237|pages=242}} | ||
| + | because an {{wikidata entity link|P2046}} statement on {{wikidata entity link|Q2978}} is referenced to be {{wikidata entity link|P248}} {{wikidata entity link|Q15707237}} with {{wikidata entity link|P304}} = 242. | ||
| + | {{hatnote|See [[d:Q2978#P2046]]}} | ||
== Issues == | == Issues == | ||
| + | * Render {{Wikidata entity link|P1680}}, following the title with a <code>:</code> | ||
| + | * More properties/ parameters to add | ||
| + | * Parameters with no equivalent property? | ||
| + | * Check/resolve handling of redirected QID | ||
| + | * Resolve special case of newspaper articles | ||
| + | ** Is the following topic of "hint parameters" related to this? | ||
| + | * Improve date formatting options | ||
| + | * Handle volume in a serial | ||
| + | ** What is meant by this? |part=, or output format differences journal vs. magazine? | ||
| + | * Order of precedence for rendering author names: | ||
| + | *# {{Wikidata entity link|P1932}} qualifier on {{Wikidata entity link|P50}} | ||
| + | *# {{Wikidata entity link|P2093}} | ||
| + | *# {{Wikidata entity link|P50}} label in English | ||
| + | *# {{Wikidata entity link|P50}} label in any other language | ||
| + | ** <s>Regardless of which of the above is used, link to the author biography article if available, via {{Wikidata entity link|P50}} (matched via {{Wikidata entity link|P1545}} if applicable)</s> | ||
| + | * Author names (Western-style, at least) should display as "Last, First Middle" to match Wikipedia house style | ||
| + | ** How to deal with [[Tussenvoegsel]]s etc. | ||
| + | * Are there values of {{para||others}} which are not illustrators? Possibly: | ||
| + | ** <s>{{WDP|P2679}}</s> | ||
| + | ** <s>{{WDP|1891}}</s> | ||
| + | *** Fails for very high numbers | ||
| + | ** <s>{{WDP|P371}}</s> | ||
| + | ** <s>{{WDP|P175}}</s> | ||
| + | * Add a tracking category for references with a {{WDP|P1366}} statement | ||
| + | * Add a tracking category for references with a {{WDP|P5824}} statement | ||
| + | * 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 | ||
| + | * Links to sister projects: Wikisource, if a transcription project exists; Wikibooks; Wikiversity (esp. the Wikijournals there); perhaps more | ||
| + | **Avoid <code><nowiki><ref name="dicc">{{Cite Q|Q100160262}} {{cite wikisource|wslanguage=pt|wslink=Diccionario Bibliographico Brazileiro/Francisco Antonio de Almeida|title=Transcription}}</ref></nowiki></code>! | ||
| + | * Consider case where author is given as {{Q|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} | ||
| + | *** Disputed; see [[Template talk:Citation#Et al]] | ||
| + | * {{WDP|P996}} should take priority over all URL properties | ||
| + | ** What if also on Wikisource? | ||
| + | * <s>Where there is a Wikipedia article about the work cited, link the title to that, overriding the URL if necessary (example: [[:d:Q25766745]])</s> | ||
| + | ** Ditto for editions of works | ||
| + | * Fix unnecessary piping of author/editor and journal links if link and label are the same, f.e. <nowiki>[[Author|Author]]</nowiki> -> <nowiki>[[Author]]</nowiki>, <nowiki>[[Journal|Journal]]</nowiki> -> <nowiki>[[Journal]]</nowiki> 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 | ||
| + | * Is there a Pxxxx code for book series editors to add them to the list of "normal" editors? | ||
| + | * 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. | ||
| + | * Fix invocation with {{para|qid|}} instead of unnamed parameter. At present <nowiki>{{cite Q|qid=Q12345}}</nowiki> instead of <nowiki>{{cite Q|Q12345}}</nowiki> gives an error. | ||
| + | ** This is intended; please discuss on talk | ||
| + | * 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, [[Special:EntityUsage/Q101607488|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) | ||
| + | |||
| + | ===Done=== | ||
* <s>Multiple author names treated as one blob</s> | * <s>Multiple author names treated as one blob</s> | ||
* <s>Linking author name(s)</s> | * <s>Linking author name(s)</s> | ||
| − | * Title for a book uses <code><nowiki>{{ #invoke: | + | * <s>Title for a book uses <code><nowiki>{{ #invoke:WikidataIB |getLink |{{{1}}} }}</nowiki></code> and may be expensive</s> |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
* <s>Fix {{para|ol}} values</s> | * <s>Fix {{para|ol}} values</s> | ||
| − | |||
| − | |||
| − | |||
| − | |||
* <s>Need to add manual date for newspaper articles/ website articles.</s> | * <s>Need to add manual date for newspaper articles/ website articles.</s> | ||
| − | * | + | * <s>Make publisher a link, where appropriate</s> |
| − | * | + | * <s>Improve handing of unexpected multiple values</s> |
| − | * | + | ** <s>e.g. Handle multiple DOIs</s> |
| + | * <s>Author name string ({{Wikidata entity link|P2093}}) values (e.g. on [[d:Q38000000|Q38000000]])</s> | ||
| + | * <s>Pseudonymous author personas such as [[P. D. Q. Bach]] or [[Mark Twain]]</s> | ||
| + | * <s>Title not in English</s> | ||
| + | * <s>Handle volume, issue and page(s) as qualifiers of {{Wikidata entity link|P1433}}</s> | ||
| + | * <s>Wider variety of examples/ test cases</s> | ||
| + | * <s>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</s> | ||
| + | * <s>The <code>url</code> parameter should also pick up data from the properties {{Wikidata property link|953}} and {{Wikidata property link|2699}}</s> | ||
| + | * <s>Linking title to Wikipedia article, if any</s> | ||
| + | * <s>Fetch ISSN etc. from item about journal</s> | ||
| + | * <s>Move Wikidata link before {{para|quote}} (and after other IDs like {{Para|pmid}})</s> | ||
| + | ** <s>Also fixes postscript character issues in conjunction with {{para|mode|cs1}} and with {{para|quote}}</s> | ||
| + | * <s>Fix page evaluation code to accept comma- and semicolon-separated lists</s> | ||
| + | * <s>Use canonical parameter names when calling down to {citation} (f.e. |page= rather than |p=)</s> | ||
| + | * <s>Is there a Pxxxx code for SBNs ([[Standard Book Number]] to support |sbn= parameter?</s> | ||
| + | **<s>Apparently not</s> -> Add SBN property to WD. (Also add [[Serial Item and Contribution Identifier|SICI]] and [[Book Item and Component Identifier|BICI]] properties corresponding with COinS &rft.sici and &rft.bici.) | ||
| + | * <s>Is there a Pxxxx code for JFM ([[Jahrbuch über die Fortschritte der Mathematik]]) to support |jfm= parameter?</s> | ||
| + | **<s>{{WDP|P894}}? No, Zbl uses the same resolving link, but it is a different ID.</s> | ||
| + | |||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
[[Category:Templates that wrap Citation]] | [[Category:Templates that wrap Citation]] | ||
| − | [[Category:Wikidata | + | [[Category:Templates using data from Wikidata]] |
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 13:08, 23 November 2020
| This is a documentation subpage for Template:Cite Q. It contains usage information, categories and other content that is not part of the original template page. |
| This template is used on approximately 43,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.
Transclusion count updated automatically (see documentation). |
| 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: |
Contents
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.
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
|at== Template:WDP|authorn== Template:WDP; Template:WDP|chapter== Template:WDP|edition== Template:WDP|editorn== Template:WDP; Template:WDP|issue== Template:WDP|journal== Template:WDP|language== Template:WDP|pages== Template:WDP|place== Template:WDP (for written-at place)|publication-date== Template:WDP (treated like|date=unless both are given)|publication-place== Template:WDP (for publication place, treated like|place=unless both are given)|publisher== Template:WDP|series== Template:WDP|title== Template:WDP (Wikidata label)|translatorn== Template:WDP|url== Template:WDP, Template:WDP, Template:WDP|version== Template:WDP|volume== Template:WDP|others== Template:WDP, Template:WDP, Template:WDP, Template:WDP, Template:WDP
Identifier parameters
|asin== Template:WDP (add|asin-tld=for some locales)|arxiv== Template:WDP|bibcode== Template:WDP (add|bibcode-access=to indicate free)|biorxiv== Template:WDP|citeseerx== Template:WDP|doi== Template:WDP (add|doi-access=to indicate free; add|doi-broken-date=if deprecated)|hdl== Template:WDP (add|hdl-access=to indicate free)|isbn== Template:WDP (falls back to Template:WDP)|ismn== Template:WDP|issn== Template:WDP|jstor== Template:WDP (add|jstor-access=to indicate free)|lccn== Template:WDP|mr== Template:WDP|oclc== Template:WDP|ol== Template:WDP (add|ol-access=to indicate free)|osti== Template:WDP (add|osti-access=to indicate free)|pmc== Template:WDP (add|pmc-embargo-date=if embargoed)|pmid== Template:WDP|rfc== Template:WDP|ssrn== Template:WDP|s2cid== Template:WDP (add|s2cid-access=to indicate free)|zbl== Template:WDP
Examples
{{Cite Q|Q15625490}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q15625490|page=42}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{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).
{{Cite Q|Q15625490|quote=lorem ipsum}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{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).
{{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).
{{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).
{{Cite Q|Q25766745|mode=cs1}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745|mode=cs2}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
{{Cite Q|Q25766745|author-mask=1}}- Lua error in Module:Cite_Q at line 53: attempt to index field 'wikibase' (a nil value).
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}}- Template:Wikidata
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).
because an Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2046) statement on Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q2978) is referenced to be Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P248) Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q15707237) with Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P304) = 242.
Issues
- Render Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1680), following the title with a
: - More properties/ parameters to add
- Parameters with no equivalent property?
- Check/resolve handling of redirected QID
- Resolve special case of newspaper articles
- Is the following topic of "hint parameters" related to this?
- Improve date formatting options
- Handle volume in a serial
- What is meant by this? |part=, or output format differences journal vs. magazine?
- Order of precedence for rendering author names:
- Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1932) qualifier on Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P50)
- Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2093)
- Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P50) label in English
- Lua error in Module:Wd at line 196: 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 196: attempt to index field 'wikibase' (a nil value). (P50) (matched via Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (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 etc.
- Are there values of
|otherswhich are not illustrators? Possibly:Template:WDPTemplate:WDP- Fails for very high numbers
Template:WDPTemplate:WDP
- Add a tracking category for references with a Template:WDP statement
- Add a tracking category for references with a Template:WDP statement
- 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
- 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 Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (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}
- Disputed; see Template talk:Citation#Et al
- 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}
- Template:WDP should take priority over all URL properties
- What if also on Wikisource?
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
- 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
- Is there a Pxxxx code for book series editors to add them to the list of "normal" editors?
- 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.
- 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
- 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)
Done
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
Author name string (Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2093)) values (e.g. on Q38000000)Pseudonymous author personas such as P. D. Q. Bach or Mark TwainTitle not in EnglishHandle volume, issue and page(s) as qualifiers of Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1433)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 thatTheurlparameter should also pick up data from the properties Template:Wikidata property link and Template:Wikidata property linkLinking title to Wikipedia article, if anyFetch ISSN etc. from item about journalMove Wikidata link before|quote=(and after other IDs like|pmid=)Also fixes postscript character issues in conjunction with|mode=cs1and with|quote=
Fix page evaluation code to accept comma- and semicolon-separated listsUse 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?Is there a Pxxxx code for JFM (Jahrbuch über die Fortschritte der Mathematik) to support |jfm= parameter?Template:WDP? No, Zbl uses the same resolving link, but it is a different ID.