Difference between revisions of "Template:Cite Q/doc"

From blackwiki
Jump to navigation Jump to search
imported>Matthiaspaul
imported>Matthiaspaul
Line 133: Line 133:
 
* Check/resolve handling of redirected QID
 
* Check/resolve handling of redirected QID
 
* Resolve special case of newspaper articles
 
* Resolve special case of newspaper articles
 +
** Is the following topic of "hint parameters" related to this?
 
* 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.
 
* 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)
 
* 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)
 
* Improve date formatting options
 
* Improve date formatting options
 
* Handle volume in a serial
 
* 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:
 
* Order of precedence for rendering author names:
 
*# {{Wikidata entity link|P1932}} qualifier on {{Wikidata entity link|P50}}
 
*# {{Wikidata entity link|P1932}} qualifier on {{Wikidata entity link|P50}}
Line 147: Line 149:
 
* Are there values of {{para||others}} which are not illustrators? Possibly:
 
* Are there values of {{para||others}} which are not illustrators? Possibly:
 
** <s>{{WDP|P2679}}</s>
 
** <s>{{WDP|P2679}}</s>
 +
** <s>{{WDP|1891}}</s>
 
*** Fails for very high numbers
 
*** Fails for very high numbers
** <s>{{WDP|1891}}</s>
 
 
** <s>{{WDP|P371}}</s>
 
** <s>{{WDP|P371}}</s>
 
** <s>{{WDP|P175}}</s>
 
** <s>{{WDP|P175}}</s>

Revision as of 15:43, 18 November 2020

Template:Uses Wikidata

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 [[:mediawiki:|Global templates|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}}
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

Done