Difference between revisions 32084417 and 32084423 on nlwiki

<!-- {{Documentation subpage}} -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->

<!-- {{For2|the <sup>''&#91;citation needed&#93;''</sup> template|{{tl|citation needed}}}} -->
The '''Citation''' template generates a citation for a book, periodical, contribution in a collective work, patent, or a web page. It determines the citation type by examining which parameters are used.

(contracted; show full)| jaar = 1995
| auteur = NASA
| archiveurl = http://web.archive.org/web/20071013232332/
http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html
| archivedate = October 13, 2007
}}
</pre>
| 
<nowiki>{{Citation | url = http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | titel = Earth's Atmosphere | accessdate = October 25, 2007 | uitgeverij = [[National Aeronautics and Space Administration]] | jaar = 1995 | auteur = NASA | archiveurl = http://web.archive.org/web/20071013232332/http://liftoff.msfc.nasa.gov/academy/space/atmosphere.html | archivedate = October 13, 2007}}</nowiki>
|}

===Journals, newspapers, magazines, or other periodicals===
{| class="wikitable"
| Journal article
| <pre>{{Citation
| achternaam = Hill
(contracted; show full)
* <code><nowiki>{{Citation |auteur=Sigmund Freud |titel=Civilization and Its Discontents |jaar=1930 |ref=CivDis}}</nowiki></code>
which generates the citation:
* 
<nowiki>{{Citation |auteur=Sigmund Freud |titel=Civilization and Its Discontents |jaar=1930 |ref=CivDis}}</nowiki>
Then, the markup "<code><nowiki>([[#CivDis|Freud 1930]])</nowiki></code>" generates a parenthetical reference "([[#CivDis|Freud 1930]])" containing a wikilink to the citation (try clicking on the wikilink).

===Anchors for Harvard referencing templates===
IDs compatible with Harvard referencing templates such as {{tl|harv}} are computed from the last names of the authors and the year of the cited source. For example, the markup "<code><nowiki>{{harv|Wright|Evans|1851|p=ix}}</nowiki></code>" generates the Harvard reference "<nowiki>{{harv|Wright|Evans|1851|p=ix}}</nowiki>", which wikilinks to the citation whose markup and appearance are shown below:
* <code><nowiki>{{Citation |achternaam1=Wright |voornaam1=Thomas |achternaam2=Evans |voornaam2=R. H. |titel=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |uitgeverij=Henry G. Bohn |jaar=1851 |oclc=59510372}}</nowiki></code>
* <nowiki>{{Citation |achternaam1=Wright |voornaam1=Thomas |achternaam2=Evans |voornaam2=R. H. |titel=Historical and Descriptive Account of the Caricatures of James Gillray |location=London |uitgeverij=Henry G. Bohn |jaar=1851 |oclc=59510372}}</nowiki>
In this example the {{tl|citation}} template defines, and the {{tl|harv}} template uses, the HTML ID "<code>CITEREFWrightEvans1851</code>", composed by concatenating the string "<code>CITEREF</code>" with the last names of the authors and the year. The {{tl|harvid}} template can be used to generate such IDs, for example, <code><nowiki>{{harvid|Wright|Evans|1851}}</nowiki></code> generates "<code><nowiki>{{harvid|Wright|Eva(contracted; show full) this citation cannot be combined with the Harvard reference "<code><nowiki>{{harv|Freud|1923}}</nowiki></code>". To make these {{tl|citation}} and {{tl|harv}} invocations compatible, either replace "<nowiki>{{para|author|Sigmund Freud}}</nowiki>" with "<nowiki>{{para|first|Sigmund}}</nowiki> <nowiki>{{para|last|Freud}}</nowiki>", or add "<nowiki>{{para|ref|<nowiki>{{harvid|Freud|1923}}</nowiki>
</nowiki>}}" to the {{tl|citation}} invocation, or add the same ref parameter (say, "<nowiki>{{para|ref|EgoId}}</nowiki>") to both the {{tl|citation}} and the {{tl|harv}} invocations.

Similarly, the year is used, as specified by <nowiki>{{para|year}}</nowiki>. If no year is given, this template attempts to derive the year from <nowiki>{{para|date}}</nowiki> (or, if no date is given, from <nowiki>{{para|publication-date}}</nowiki>) by applying the [[mw:Help:Extension:ParserFunctions##time|MediaWiki#time function]]. This heuristic works with many common date formats (American, International and ISO standard format YYYY-MM-DD as listed in [[WP:MOS]]), but may not work as expected with other formats, so when in doubt it may be safer to use <nowiki>{{para|year}}</nowiki>. Note that if only a year, say 2005, is known you must use <nowiki>{{para|year|2005}}</nowiki> rather than <nowiki>{{para|date|2005}}</nowiki>.

===IDs must be unique===
Names, years, and hand-specified IDs must be chosen so that the IDs are unique within a page; otherwise the HTML will not conform to the W3C standards, and any references to the citations will not work reliably. For example, suppose a page contains the following two citations with {{tl|harv}}-compatible IDs:
* <nowiki>{{Citation |achternaam1=Montes |voornaam1=G. |achternaam2=Halterman |voornaam2=J. S. |jaar=2008a |journal=Pediatrics |volume=121 |issue=4 |pages=e821–6 |titel=Association of Childhood Autism Spectrum Disorders and Loss of Family Income |doi=10.1542/peds.2007-1594 |pmid=18381511 |url= http://pediatrics.aappublications.org/cgi/content/full/121/4/e821}}
* </nowiki>
* <nowiki>{{Citation |achternaam1=Montes |voornaam1=G. |achternaam2=Halterman |voornaam2=J. S. |jaar=2008b |journal=Pediatrics |volume=122 |issue=1 |pages=e202–8 |titel=Child Care Problems and Employment Among Families with Preschool-aged Children with Autism in the United States |doi=10.1542/peds.2007-3037 |pmid=18595965 |url= http://pediatrics.aappublications.org/cgi/content/full/122/1/e202}}</nowiki>

If these citations were altered to say "2008" rather than "2008a" and "2008b", the resulting page would not work, because the two different citations would both attempt to use the ID "<code>CITEREFMontesHalterman2008</code>". To avoid this problem, distinguish the citations by appending suffixes to the years, ''e.g.'', "<nowiki>{{para|year|2008a}}</nowiki>" and "<nowiki>{{para|year|2008b}}</nowiki&g(contracted; show full)
==Tools==
See [[Wikipedia:Citing sources#Citation templates and tools]] for a list of tools that can help create a reference in the "citation" format.

<!-- {{UF-COinS}}
{{Wikipedia referencing}} -->
<includeonly>
</includeonly>