Difference between revisions of "Template:Citation/core"
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<cite style="font-style:normal" class="{{{Citation class| | <cite style="font-style:normal" class="{{{Citation class|}}}" | ||
{{ | {{ | ||
#if:{{{Ref|}}} | #if:{{{Ref|}}} | ||
|{{#ifeq:{{{Ref|}}}|none||id="{{anchorencode:{{{Ref|}}}}}"}} | |{{#ifeq:{{{Ref|}}}|none||id="{{anchorencode:{{{Ref|}}}}}"}} | ||
|id="CITEREF{{anchorencode:{{#if:{{{Surname1|}}} | |{{#if:{{{Surname1|}}}{{{EditorSurname1|}}} | ||
|id="CITEREF{{anchorencode:{{#if:{{{Surname1|}}} | |||
|{{{Surname1}}}{{{Surname2|}}}{{{Surname3|}}}{{{Surname4|}}} | |||
|{{{EditorSurname1|}}}{{{EditorSurname2|}}}{{{EditorSurname3|}}}{{{EditorSurname4|}}} | |||
}}{{{Year|{{{Date|}}}}}}}}" | |||
}} | |||
}}>{{ | }}>{{ | ||
<!--============ Author or editor and date ============--> | <!--============ Author or editor and date ============--> | ||
Line 144: | Line 146: | ||
}}{{ | }}{{ | ||
#if: {{{Date|}}} | #if: {{{Date|}}} | ||
| ({{{Date}}}){{ | | ({{date|{{{Date}}}|{{{DateFormat|dmy}}}}}){{ | ||
#if:{{{YearNote|}}} | #if:{{{YearNote|}}} | ||
| [{{{YearNote}}}] | | [{{{YearNote}}}] | ||
Line 192: | Line 194: | ||
}}, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:{{{Sep|,}}}|.||.}}{{ | }}, ed{{#if:{{{EditorSurname2|}}}|s}}{{#ifeq:{{{Sep|,}}}|.||.}}{{ | ||
#if: {{{Date|}}} | #if: {{{Date|}}} | ||
| ({{{Date}}}) | | ({{date|{{{Date}}}|{{{DateFormat|dmy}}}}}) | ||
}} | }} | ||
}} | }} | ||
Line 322: | Line 324: | ||
}}{{#if:{{{format|}}} | }}{{#if:{{{format|}}} | ||
| ({{{format}}}) | | ({{{format}}}) | ||
}}{{#if: {{{Periodical|}}} | }}{{ | ||
#if: {{{Periodical|}}}|{{ | |||
#if:{{{IncludedWorkTitle|}}}{{{Title|}}}|{{{Sep|,}}} }}''{{{Periodical}}}''{{ | |||
#if: {{{Series|}}} | #if: {{{Series|}}} | ||
|{{{Sep|,}}} {{{Series}}} | |{{{Sep|,}}} {{{Series}}} | ||
Line 412: | Line 413: | ||
|{{ | |{{ | ||
#if: {{{Date|}}} | #if: {{{Date|}}} | ||
|{{{Sep|,}}} {{{Date}}} | |{{{Sep|,}}} {{date|{{{Date}}}|{{{DateFormat|dmy}}}}} | ||
}} | }} | ||
}}{{ | }}{{ | ||
Line 424: | Line 425: | ||
|{{ | |{{ | ||
#if: {{{Surname1|}}} | #if: {{{Surname1|}}} | ||
|{{{Sep|,}}} {{{PublicationDate}}} | |{{{Sep|,}}} {{date|{{{PublicationDate}}}|{{{DateFormat|dmy}}}}} | ||
| (published {{{PublicationDate}}}) | | (published {{date|{{{PublicationDate}}}|{{{DateFormat|dmy}}}}}) | ||
}} | }} | ||
|{{ | |{{ | ||
#if: {{{Periodical|}}} | #if: {{{Periodical|}}} | ||
|{{{Sep|,}}} {{{PublicationDate}}} | |{{{Sep|,}}} {{date|{{{PublicationDate}}}|{{{DateFormat|dmy}}}}} | ||
| (published {{{PublicationDate}}}) | | (published {{date|{{{PublicationDate}}}|{{{DateFormat|dmy}}}}}) | ||
}} | }} | ||
}} | }} | ||
Line 446: | Line 447: | ||
#if:{{{DOI|}}} | #if:{{{DOI|}}} | ||
|{{{Sep|,}}} [[Digital object identifier|doi]]:{{#if: {{{DoiBroken|}}} | |{{{Sep|,}}} [[Digital object identifier|doi]]:{{#if: {{{DoiBroken|}}} | ||
| {{#tag:nowiki|{{{DOI}}}}} (inactive {{date|{{{DoiBroken|}}}}}) {{#ifeq: {{NAMESPACE}} | {{ns:0}} | [[Category:Pages with DOIs broken since {{#time: Y | {{{DoiBroken|}}} }}]] }} | | {{#tag:nowiki|{{{DOI}}}}} (inactive {{date|{{{DoiBroken|}}}|{{{DateFormat|dmy}}}}}) {{#ifeq: {{NAMESPACE}} | {{ns:0}} | [[Category:Pages with DOIs broken since {{#time: Y | {{{DoiBroken|}}} }}]] }} | ||
| <span class="neverexpand">[http://dx.doi.org/{{urlencode:{{{DOI}}}}} {{#tag:nowiki|{{{DOI}}}}}]</span> | | <span class="neverexpand">[http://dx.doi.org/{{urlencode:{{{DOI}}}}} {{#tag:nowiki|{{{DOI}}}}}]</span> | ||
}} | }} | ||
Line 483: | Line 484: | ||
#if: {{{Archive|}}} | #if: {{{Archive|}}} | ||
|{{{Sep|,}}} {{{Archive}}} | |{{{Sep|,}}} {{{Archive}}} | ||
|{{ | |||
#if:{{{OriginalURL|}}} | |||
|{{{Sep|,}}} {{#ifeq:{{{Sep}}}|.|A|a}}rchived from {{#if:{{{OriginalURL|}}}|{{link|{{{OriginalURL}}}|the original}}|the original <span class=error>(unspecified URL)</span>[[Category:Articles with broken citations]]}}{{ | |||
#if:{{{ArchiveDate|}}} | |||
| on {{date|{{{ArchiveDate}}}|{{{DateFormat|dmy}}}}} | |||
|. <span class=error>You must specify the date the archive was made using the {{para|archivedate}} parameter</span>{{#if: {{NAMESPACE}}|| [[Category:Articles with broken citations]]}} | |||
}} | |||
|{{#if:{{{ArchiveDate|}}}|{{{Sep|,}}} {{#ifeq:{{{Sep}}}|.|A|a}}rchived on {{date|{{{ArchiveDate}}}|{{{DateFormat|dmy}}} }}; <span class=error>no {{para|archiveurl}} specified</span> [[Category:Articles with broken citations]]}} | |||
}} | |||
}}{{ | }}{{ | ||
<!--============ URL and AccessDate ============--> | <!--============ URL and AccessDate ============--> |
Latest revision as of 13:31, 9 February 2009
[edit] Template documentation
This documentation is transcluded from Template:Citation/core/doc. (edit | history)
This template has a sandbox (edit) for editors to experiment.
This template has a sandbox (edit) for editors to experiment.
About this template
Template:Citation/core can be thought of as an engine producing consistent output for Wikipedia's citations. Templates such as {{citation}} provide this core template with a list of parameters, which it uses to produce a formatted text (HTML) output, which contains embedded COinS metadata. This metadata allows many readers to find cited references more easily, or to extract their details to a reference manager.
The presence of a central template makes individual citation templates simpler to code and amend, and produces a consistent look throughout the encyclopaedia.
Templates using this 'engine'
Changes to this central template can affect the output of several 'upstream' templates. A list of templates using citation/core is provided below for testing purposes.
- Template:Citation
- Template:Cite book
- Template:Cite journal
- Template:Cite web
- Template:Cite encyclopedia
- Template:Cite mailing list
- Template:Cite news
Parameter details
- |AccessDate= date when the |URL= was accessed.
- |Archive= details of an archived copy of the source; the calling template will pass on a string such as "archived from the original on 02-02-2002". The URL passed as |IncludedWorkURL= may therefore end up being the URL of the source, or the URL of the archive copy, as determined by the calling template.
- |At= page reference within the source.
- |Authorlink1= title of an existing Wikipedia article about the first author.
- |Authorlink2=, |Authorlink3=, ..., |Authorlink9= title of an existing Wikipedia article about up to eight additional authors.
- |Bibcode= A Bibcode id
- |DOI= Digital object identifier.
- |Date= date of the authorship, if different from date of publication.
- |DoiBroken= Date the DOI is broken
- |Edition= number or name of the edition, if not the first; for example: |Edition=2nd.
- |EditorGiven1= first editor's first or given name(s).
- |EditorGiven2=, |EditorGiven3=, |EditorGiven4= second, third, and fourth editors' first or given name(s).
- |EditorSurname1= first editor's surname or last name.
- |EditorSurname2=, |EditorSurname3=, |EditorSurname4= second, third, and fourth editor' surname or last name.
- |Editorlink1= title of an existing Wikipedia article about the first editor.
- |Editorlink2=, |Editorlink3=, |Editorlink4= title of an existing Wikipedia article about the second, third, and fourth editor.
- |format= file format of the source, if not the common format.
- |Given1= first author's first or given name(s).
- |Given2=, |Given3=, ..., |Given9= up to eight additional authors' first or given name(s).
- |ID= miscellaneous identifier, other than |DOI=, |ISBN=, |ISSN=, |OCLC=, |PMID=, or |PMC=.
- |ISBN= International Standard Book Number.
- |ISSN= International Standard Serial Number identifying the periodical.
- |IncludedWorkTitle= title of the contribution, chapter, or other included work.
- |IncludedWorkURL= URL of the contribution or chapter, or other included work.
- |Issue= issue number of the periodical.
- |language= specifies the language in which the source is written, if not English.
- |laydate= Date of a lay summary
- |laysummary= Summary of the source in a layman-friendly journal - for instance a BBC news article about a paper in Nature.
- |OCLC=Online Computer Library Center ID number.
- |Other= Other details to be inserted in a particular place
- |PMC= PubMed Central article number for full-text free repository of an article.
- |PMID= PubMed Unique Identifier.
- |Periodical= name of the periodical, journal, or magazine. This parameter controls whether or not the template will generate a citation in the style appropriate to a periodical, jorunal, magazine, or other serial publication.
- |Place= place where the item was created.
- |PublicationDate= date of publication.
- |PublicationPlace= city of publication.
- |Publisher= name of the publisher.
- |quote= text to be quoted from the source.
- |Ref= A reference name - if the citation is referred to using the Havard referencing suite of templates (LINK!)
- |Sep= specifies the punctuation mark used to separate fields. This usually defaults to a period, but may occasionally be a comma.
- |Series= series of which this periodical is a part.
- |Surname1= first author's surname or last name.
- |Surname2=, |Surname3=, ..., |Surname9= up to eight additional authors' surname or last name.
- |Title= title of the article in the periodical.
- |URL= Uniform Resource Locator of an online location where the article can be found.
- |Volume= volume number of a multi-volume book or compilation.
- |YearNote= Note to accompany the year. Example: First published 1886
- |Year= year of authorship or publication.
Category:
- Citation templates