Jump to content

Module:Cite/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
deps
Line 8: Line 8:


===Examples===
===Examples===
This module requires only one parameter: the first positional parameter. That parameter takes as a value, the canonical name of a cs1 template without the <code>cite</code> prefix: <code>cite book</code> → <code>book</code>, <code>cite web</code> → <code>web</code>. To replace {{tlx|citation}} templates, use <code>citation</code>.
This module requires no parameters but does require the canonical name of a cs1 template without the <code>cite</code> prefix: <code>cite book</code> → <code>book</code>, <code>cite web</code> → <code>web</code>. To replace {{tlx|citation}} templates, use <code>citation</code>.


The structure for calls to this module:
The structure for calls to this module:
:<code>{{<nowiki/>{{color|#00F|#invoke}}:cite |cite |&lt;{{var|template name}}>|&lt;{{var|cs1 parameters}}>}}</code>
:<code>{{<nowiki/>{{color|#00F|#invoke}}:cite |&lt;{{var|template name}}>|&lt;{{var|cs1 parameters}}>}}</code>
where:
where:
:<code>{{color|#00F|#invoke}}:cite</code> – calls this module: Module:cite
:<code>{{color|#00F|#invoke}}:cite</code> – calls this module: Module:cite
:<code>|cite</code> – is the function in Module:cite that is to be executed: <code>cite()</code>
:<code>|&lt;{{var|template name}}></code> – is the canonical name of the template without the <code>cite</code> prefix; this is the <code><nowiki>#invoke:</nowiki></code> function call; case insensitive
:<code>|&lt;{{var|template name}}></code> – is the canonical name of the template without the <code>cite</code> prefix
:<code>|&lt;{{var|cs1 parameters}}></code> – are all of the parameters required by {{tld|cite &lt;template name>}}
:<code>|&lt;{{var|cs1 parameters}}></code> – are all of the parameters required by {{tld|cite &lt;template name>}}


Line 22: Line 21:
::{{cite book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}
::{{cite book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}
write:
write:
:<syntaxhighlight lang="wikitext" inline="1">{{#invoke:cite |cite |book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}</syntaxhighlight>
:<syntaxhighlight lang="wikitext" inline="1">{{#invoke:cite |book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}</syntaxhighlight>
::{{#invoke:cite |cite |book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}
::{{#invoke:cite |book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}



==TemplateData==
==TemplateData==

Revision as of 22:37, 29 April 2025

Citation Style 1 templates
{{Cite arXiv}}arXiv preprints
{{Cite AV media}}audio and visual media
{{Cite AV media notes}}AV media liner notes
{{Cite bioRxiv}}bioRxiv preprints
{{Cite book}}books and chapters
{{Cite CiteSeerX}}CiteSeerX papers
{{Cite conference}}conference papers
{{Cite document}}short, stand-alone, offline documents
{{Cite encyclopedia}}edited collections
{{Cite episode}}radio or TV episodes
{{Cite interview}}interviews
{{Cite journal}}academic journals
{{Cite magazine}}magazines, periodicals
{{Cite mailing list}}public mailing lists
{{Cite map}}maps
{{Cite medRxiv}}medRxiv preprints
{{Cite news}}news articles
{{Cite newsgroup}}online newsgroups
{{Cite podcast}}podcasts
{{Cite press release}}press releases
{{Cite report}}reports
{{Cite serial}}audio or video serials
{{Cite sign}}signs, plaques
{{Cite speech}}speeches
{{Cite SSRN}}SSRN papers
{{Cite tech report}}technical reports
{{Cite thesis}}theses
{{Cite web}}web sources not covered by the above
See alsoSpecific-source templates
Citation Style 1 wrapper templates

Usage

This module may be used to replace any of the cs1|2 templates in articles that are nearing the post-expand include size limit. Such use should only be done to prevent an article from exceeding the PEIS limit. If necessary, this module may be used in templates that wrap a cs1|2 template.

Examples

This module requires no parameters but does require the canonical name of a cs1 template without the cite prefix: cite bookbook, cite webweb. To replace {{citation}} templates, use citation.

The structure for calls to this module:

{{#invoke:cite |<template name>|<cs1 parameters>}}

where:

#invoke:cite – calls this module: Module:cite
|<template name> – is the canonical name of the template without the cite prefix; this is the #invoke: function call; case insensitive
|<cs1 parameters> – are all of the parameters required by {{cite <template name>}}

To go from {{cite book}}:

{{cite book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}
EB Green (1915). Title. PseudoRandom.

write:

{{#invoke:cite |book |author=EB Green |date=1915 |title=Title |publisher=PseudoRandom}}
EB Green (1915). Title. PseudoRandom.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Cite in articles based on its TemplateData.

TemplateData for Cite

This module for use on articles that are approaching the post-expand include size limit. For all other usage information, see [[Module:Cite]].

Template parameters

ParameterDescriptionTypeStatus
11

canonical name (without the 'cite' prefix) of the template to be replaced; to replace 'cite book', use 'book'.

Stringrequired