Template:Source-attribution/doc: Difference between revisions

Content deleted Content added
 
(25 intermediate revisions by 12 users not shown)
Line 1:
{{Documentation subpage}}
{{High-use}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
=== Usage ===
This template should be placed in the [[WP:LAYOUT#References|References section]] of an article if the article incorporates text from a source that is not under copyright and there is no source specific template listed in [[:Category:Attribution templates]].
 
:<nowiki>{{Source-attribution|</nowiki>''source and other details''|no-icon=y |pl=y |inline=y<nowiki>}}</nowiki>
This template takes one parameter, the name of the ''source'', along with any other details which are needed to identify the work:
:<nowiki>{{Source-attribution|</nowiki>''source and other details''<nowiki>}}</nowiki>
 
The four parameters are:
=== Examples ===
*{{code|1}} (unnamed) = ''{{code|source name and other identifying details}}'' — The name of the ''source'', along with any other details which are needed to identify the work (the argument (the text) can also be another template such as {{tlx|cite book}})
A text string can be passed as the parameter:
*{{code|no-icon}}={{code|y}} — remove the leading icon (alternative {{code|noicon}} and the argument can be any string such as {{green|''yes''}} or {{green|''1''}} etc)
:<code><nowiki>{{Source-attribution|</nowiki>'''<nowiki>''Handbook to the cathedrals of England'', by Richard John (1869)</nowiki>'''<nowiki>}}</nowiki></code>
*<code>pl</code>=<code>y</code> — changes the wording from "{{green|from a publication}}" to "{{green|from publications}}" (alternative {{code|plural}} and the argument can be any string such as {{green|''yes''}} or {{green|''1''}} etc).
*{{code|inline}}={{code|y}} — change the wording of the prescript from "{{green|This article...}}" to "{{green|One or more of the preceding sentences...}}" (alternative {{code|sentence}} and the argument can be any string such as {{green|''yes''}} or {{green|''1''}} etc). It is intended for use in inline citations.
 
==TemplateData==
or a citation template, like {{tl|cite book}} can be used:
<templatedata>
:<code><nowiki>{{Source-attribution|</nowiki>'''<nowiki> {{cite book |last1=King |first1=Richard John |title=Handbook to the cathedrals of England |volume=Vol. 1, Part 2. |year=1869 |publisher=J. Murray}}</nowiki>'''<nowiki> }}</nowiki></code>
{
"params": {
"1": {
"label": "Source",
This "description": template takes one parameter, the"The name of the ''source'', along with any other details which are needed to identify the work:",
"type": "content",
"suggested": true
},
"inline": {
"aliases": [
"sentence"
],
"label": "Inline?",
"description": "Set to y to change \"This article\" to \"One or more of the preceding sentences\"",
"type": "boolean",
"suggested": false
},
"no-icon": {
"aliases": [
"noicon"
],
"label": "No icon?",
"description": "Set to y to remove the leading icon",
"type": "boolean",
"suggested": false
},
"pl": {
"aliases": [
"plural"
],
"label": "Plural?",
"description": "Set to y to change \"from a publication\" to \"from publications\"",
"type": "boolean"
}
},
"paramOrder": [
"1",
"no-icon",
"pl",
"inline"
],
"description": "Adds a notice that an article incorporates information from a public ___domain source"
}
</templatedata>
 
=== Examples ===
These would display as:
#Using {{para|no-icon|y}}, as in <code><nowiki><ref>{{Source-attribution|no-icon=y}}</ref></nowiki></code>, removes the leading icon <ref>{{Source-attribution|no-icon=y}}</ref>
:{{Source-attribution|''Handbook to the cathedrals of England'', by Richard John (1869)}}
#A text string with no parameters (and followed by a citation), such as <code><nowiki><ref>{{Source attribution}} {{cite book|last=Offa |first=Anne |year=1066|title=An Old Book}}</ref></nowiki></code>, would display as <ref>{{Source attribution}} {{cite book|last=Offa |first=Anne |year=1066|title=An Old Book}}</ref>
:{{Source-attribution|{{cite book |last1=King |first1=Richard John |title=Handbook to the cathedrals of England |volume=Vol. 1, Part 2. |year=1869 |publisher=J. Murray}} }}
#The template with a citation as the unnamed parameter, e.g. <code><nowiki><ref>{{Source-attribution|{{cite book |title= Handbook to the cathedrals of England |first=Richard |last=John |date=1869}} }}</ref></nowiki></code>, shows as <ref>{{Source-attribution|{{cite book |title= Handbook to the cathedrals of England |first=Richard |last=John |date=1869}} }}</ref>
#Using {{para|pl|y}}, as in <code><nowiki><ref>{{Source-attribution|pl=y|John, Richard (1869). ''Handbook to the cathedrals of England''; and {{cite book|last=Offa |first=Anne |year=1066|title=An Old Book}}}}</ref></nowiki></code>, shows as <ref>{{Source-attribution|pl=yes|John, Richard (1869). ''Handbook to the cathedrals of England''; and {{cite book|last=Offa |first=Anne |year=1066|title=An Old Book}}}}</ref>
#Using {{para|inline|y}}, as in <code><nowiki><ref>{{Source-attribution|inline=y|''Handbook to the cathedrals of England'', by Richard John (1869)}}</ref></nowiki></code>, shows as <ref>{{Source-attribution|inline=yes|''Handbook to the cathedrals of England'', by Richard John (1869)}}</ref>
#Using all four parameters simultaniously <code><nowiki><ref>{{Source-attribution|''sources and other details''|no-icon=y |pl=y |inline=y}}</ref></nowiki></code><ref>{{Source-attribution|''sources and other details''|no-icon=y |pl=y |inline=y}}</ref>
In the references section, these appear as
{{reflist-talk}}
 
=== Hidden category ===
This template includes a hidden category—[[:Category:Source attribution]]—which does not appear at the bottom of an article page but does contain any article page that contains this template.
 
=== See also ===
*{{tl|Free-content attribution}} — prescript for a source that meets the definition of a [[Definition of Free Cultural Works|free cultural work]]
*{{tl|citation-attribution}} a template that can be placed at the end of a sentence, sentences or a paragraph that incorporates text from a source that is not under copyright. It is an alternative to this template if only a few sentences or a paragraph has been copied.
* [[Wikipedia:Template_index/Sources_of_articles#Other]]
 
<includeonly>{{Sandbox other||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->