Difference between revisions of "Template:Citation Style documentation"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(rv)
 
(35 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{#switch: {{{1|}}}
+
<includeonly>{{Citation Style documentation/{{{1|}}}
|syntax=
+
|aliases={{{aliases|}}}
Nested parameters rely on their parent parameters:
+
|aliases2={{{aliases2|}}}
*''parent''
+
|type_default={{{type_default|}}}
*OR: ''parent2''—may be used instead of ''parent''
+
|title_format={{{title_format|}}}
**''child''—may be used with ''parent'' (and is ignored if ''parent'' is not used)
+
|title_title={{{title_title|}}}
**OR: ''child2''—may be used instead of ''child'' (and is ignored if ''parent2'' is not used)
+
|contributor={{{contributor|}}}
|sep_period=
+
|coauthors={{{coauthors|}}}
By default, sets of fields are terminated with a period (.); this can be an issue when the last field in an abbreviation or initial with a period, as two periods then display. The only solution is to not include the last period in the value for the set of fields.
+
|date2={{{date2|}}}
|sep_comma=
+
|others={{{others|}}}
By default, sets of fields are terminated with a comma (,)
+
|cs2={{{cs2|}}}
|author=
+
|lua={{{lua|}}}
* '''last''': Surname of author. Do not wikilink— use '''authorlink''' instead. Where the surname is usually written first (e.g. as in Chinese) or for corporate authors, simply use '''last''' to include the same format as the source.
+
|map={{{map|}}}
** '''first''': Given or first names) of author, including title(s)— e.g. ''Firstname Middlename'' or ''Firstname M.'' or ''Dr. Firstname M., Sr.''. Do not wikilink— use '''authorlink''' instead.
+
|pmc={{{pmc|}}}
**OR: for multiple authors, use the '''first1''', '''last1'''  through '''first9''', '''last9''' for up to 9 authors. By default, if nine authors are defined, then only eight will show and "et al." will show in place of the last author.
+
|work={{{work|}}}
** '''authorlink''': Title of existing Wikipedia article about the author— not the author's website. Must not be wikilinked itself.
+
|department={{{department|}}}
**OR: for multiple authors, use '''authorlink1''' through '''authorlink9'''.
+
|began={{{began|}}}
|editor=
+
|link={{{link|}}}
* '''editor''': Name of editor(s). Do not wikilink any values in the editor value but use '''editor-link''' instead. If '''chapter''' is not specified, then "ed." displays after the editor's name(s). If '''chapter''' is specified, then "In" shows before the editor's name(s). This implies that the author is responsible only for part of the source (including the cited chapter) and the editor responsible for the whole source. If, however, the author(s) and editor(s) are responsible for the whole source, then the '''editor''' parameter or its alternates described below should not be used if the '''chapter''' parameter is being used. Instead, the editor(s) should be included in an '''author''' parameter with possibly "(ed.)" after the surname(s). Alternatively, the '''editor''' parameter may be used if the chapter detail is included in the '''title''' parameter instead of using the '''chapter''' parameter.
+
|2={{{2|}}}
*OR: alternatively '''editor-first''' and '''editor-last''' can be used in the same way as ''first'' and ''last''.
+
|3={{{3|}}}
*OR: for multiple editors up to four in number, use the '''editor1-first''', '''editor1-last''' through '''editor4-first''', '''editor4-last'''.
+
}}</includeonly><noinclude>
** '''editor-link''' or '''editor1-link''' through '''editor'4-link''': Title of existing Wikipedia article about the editor— not the editor's website. Must not be wikilinked itself.
+
{{documentation}}
|others=
+
</noinclude>
* '''others''': To record other contributors to the work, such as "Illustrated by Smith" or "Trans. Smith".
 
|title_italics=
 
{{Citation Style  documentation/titles}}
 
* '''title''': Title of source. Can be wikilinked to an existing Wikipedia article or '''url''' may be used to add an external link, but not both. Formatted in italics.
 
** '''trans_title''': If the source cited is in a foreign language, an English translation of the title can be given here. The template will display this in square brackets after the '''title''' field and it will link to the '''url''' field, if used. Use of the '''language''' parameter is recommended.
 
|title_quotes=
 
{{Citation Style  documentation/titles}}
 
* '''title''': Title of source. Can be wikilinked to an existing Wikipedia article or '''url''' may be used to add an external link, but not both. Formatted in quotes.
 
** '''trans_title''': If the source cited is in a foreign language, an English translation of the title can be given here. The template will display this in square brackets after the '''title''' field and it will link to the '''url''' field, if used. Use of the '''language''' parameter is recommended.
 
|chapter=
 
* '''chapter''': The chapter of the source, written in full. May be wikilinked or may use '''chapterurl''', but not both. Formatted in quotations.
 
** '''trans_chapter''': If the source cited is in a foreign language, an English translation of the chapter can be given here. The template will display this in square brackets after the '''chapter''' field and it will link to the '''chapterurl''' field, if used. Use of the '''language''' parameter is recommended.
 
|type=
 
* '''type''': Can be used to provide additional information about the publication type. Appears in parentheses following the title.{{#if:{{{type_default|}}}|&#32;Defaults to {{{type_default}}}.}}
 
|journal=
 
* '''journal''' or '''periodical''' or '''newspaper''' or '''magazine''': Name of the source.
 
|edition=
 
* '''edition''': When the publication has more than one edition. E.g.: "2nd", "Revised" etc. Displays " ed." after this field, so {{para|edition|2nd}} produces "2nd ed."
 
|series=
 
* '''series''' or '''version''': When the source is part of a series, such as a book series or a journal where the issue numbering has restarted.
 
|volume=
 
* '''volume''': For one publication published in several volumes. This template displays the text in this field in bold type after the '''title''' and '''series''' fields. An alternative is to include the volume information using '''title''' after the main title.
 
|issue=
 
* '''issue''': When the publication is one of a series that is published periodically.
 
|date=
 
* '''date''': Full date of publication edition being referenced, in the same format as other dates in citations in the same article. Must not be wikilinked. Use only the full date including month, day and year, else the anchor may be malformed.
 
*OR:  '''year''': Year of publication edition being referenced.
 
** '''month''': Name of the month of publication. If you also have the day, use '''date''' instead. Must not be wikilinked.
 
** '''origyear''': Original publication year, for display alongside the date or year. For clarity, please supply specifics, for instance {{para|origyear|First published 1859}} or {{para|origyear|Composed 1904}}.
 
|publisher=
 
* '''publisher''': Name of publisher; do not include corporate designation such as "Ltd" or "Inc".
 
** '''location''': Geographical place of publication.
 
|language=
 
* '''language''': The language the source is written in, if it is not English. Formatted in parentheses with "in" before the language name. Use the full language name and do not use icons or templates.
 
|pages=
 
* '''page''': Page in the source that supports the content.
 
* '''pages''': Pages in the source that supports the content; separate page ranges with an en dash (–); separate non-sequential pages with a comma (,). Do not use to indicate the total number of pages in the source.
 
* '''at''': For sources where a page number is inappropriate or insufficient; overridden by {{para|page}} or {{para|pages}}.
 
** Examples: page (p.) or pages (pp.); section (sec.), column (col.), paragraph (para.); track; hours, minutes and seconds; act, scene, canto, book, part, folio, stanza, back cover, liner notes, indicia, colophon, dust jacket, verse.
 
|time=
 
* '''time''': Time the event occurs in the source.
 
|id1=
 
* '''id''': A [[unique identifier]], used where none of the specialized identifiers are applicable. Wikilink as applicable.
 
|id2=
 
* '''arxiv''': [[ArXiv]]; must not be wikilinked.
 
* '''asin''': [[Amazon Standard Identification Number]]; must not be wikilinked.
 
* '''bibcode''': [[Bibcode]]; used by a number of astronomical data systems; e.g., ''1924MNRAS..84..308E''; must not be wikilinked.
 
* '''doi''': [[Digital object identifier]]; e.g., ''10.1038/news070508-7''; must not be wikilinked.
 
** '''doi_brokendate''': Date the DOI is broken; must not be wikilinked.
 
* '''isbn''': [[International Standard Book Number]] such as ''1-111-22222-9''; see [[Wikipedia:ISBN]] and [[ISBN#Overview|ISBN]]. Dashes in the ISBN are optional, but preferred. Use the 13-digit ISBN where possible; this can normally be found beneath the barcode as a number beginning 978 or 979. For sources with the older 9 digit SBN system, prefix the number with a zero; thus ''SBN 902888-45-5'' should be entered as {{para|isbn|0-902888-45-5}}; must not be wikilinked.
 
* '''issn''': [[International Standard Serial Number]]; eight characters may be split into two groups of four using a [[hyphen]], but not an [[Dash#En dash|N-dash]] or a space; must not be wikilinked. <!-- space separates URL from linkable text; n-dash is not recognised by WorldCat -->
 
* '''jfm''': [[Jahrbuch über die Fortschritte der Mathematik]]; must not be wikilinked.
 
* '''jstor''': [[JSTOR]]; mainly for use as part of an <code>id</code> option in a {{tl|cite journal}} reference; must not be wikilinked.
 
* '''lccn''': [[Library of Congress Control Number]]; must not be wikilinked.
 
* '''mr''': [[Mathematical Reviews]]; must not be wikilinked.
 
* '''oclc''': [[Online Computer Library Center]]; must not be wikilinked.
 
* '''ol''': [[Open Library]]; must not be wikilinked.
 
* '''osti''': [[Office of Scientific and Technical Information]]; must not be wikilinked.
 
* '''PMC''': [[PubMed Central]] article number for full-text free repository of an article; must not be wikilinked.
 
* '''PMID''': [[PubMed]] Unique Identifier; must not be wikilinked.
 
* '''rfc''': [[Request for Comments]]; must not be wikilinked.
 
* '''ssrn''': [[Social Science Research Network]]; must not be wikilinked.
 
* '''zbl''': [[Zentralblatt MATH]]; must not be wikilinked.
 
|url=
 
{{Citation Style  documentation/urls}}
 
* '''url''': URL of an online location where the text of the publication can be found. Cannot be used if '''title''' is wikilinked. If applicable, the link may point to the specific page(s) referenced. Do not link to any commercial booksellers (such as Amazon.com).
 
** '''format''': Format of the work referred to by '''url''', e.g. PDF. HTML is implied and should not be specified.
 
** '''accessdate''': Full date when URL was accessed. Should be in the same format as other dates in citations in the same article. Must not be wikilinked.
 
** '''archiveurl''': The URL of an [[Web archiving|archived]] copy of a web page, if (or in case) the url becomes unavailable. Typically used to refer to services like [[WebCite]] and the [[Internet Archive]]. Requires '''archivedate'''.
 
** '''archivedate''': Date when the item was archived. Do not be wikilinked. Requires '''archiveurl'''.
 
** '''deadurl''': To change the order with the title retaining the original link and the archive linked at the end, set {{para|deadurl|no}}
 
|chapterurl=
 
* '''chapterurl''': URL of an individual chapter of online source. Should be at the same site as '''url''', if any. If '''chapterurl''' is used, '''url''' should only be used if the beginning of the work and the cited chapter are on separate webpages at the site. '''chapter''' may be wikilinked or '''chapterurl''' used, but not both.
 
|quote=
 
* '''quote''': Relevant text quoted from the source; enclosed in quotes. When supplied, the citation terminator (a period by default) is suppressed, so the quote needs to include terminating punctuation.
 
|ref=
 
* '''ref''': ID for anchor. By default, no anchor is generated. The ordinary nonempty value {{para|ref|<var>ID</var>}} generates an anchor with the given <var>ID</var>; such a linkable reference can be made the target of [[Wikipedia:Citing sources/Further considerations#Wikilinks to full references|wikilinks to full references]], especially useful in short citations like [[Wikipedia:Citing sources#Shortened footnotes|shortened notes]] and [[Wikipedia:Parenthetical referencing|parenthetical referencing]]. The special value {{para|ref|harv}} generates an anchor suitable for the {{tl|harv}} template; see [[Template:Citation/doc#Anchors for Harvard referencing templates|anchors for Harvard referencing templates]].
 
|lay=
 
* '''laysummary''': Link to a non-technical summary (or review) of the source.
 
** '''laysource''': Name of the source, such as the magazine or journal.
 
** '''laydate''': Date of summary.
 
|display=
 
* '''author-mask''': Primarily intended for use in bibliographies for some styles where multiple works by a single author are listed. It replaces the name of the first author with a strike-thru dash (—) author-mask em in length. If {{para|author-mask|1}} then the dash will be one em in length and so on. Set author-mask to a text value to display a word instead:– for example, 'with'. You must still include the values for all authors for metadata purposes. Do not use in a list generated by {{tl|reflist}} or {{tag|references|s}} as there is no control as to the order that references will display.
 
* '''author-name-separator''': Changes the separator between last and first names; defaults to a comma and space (, ); if the parameter is present, but blank, no separator punctuation will be used; a space must be percent encoded as <code>&amp#32;</code>; do not use a semicolon (;), colon (:) or hash (#) as they will be interpreted as wikimarkup.
 
* '''author-separator''': Changes the separator between authors; defaults to a semicolon and space (; ); if the parameter is present, but blank, no separator punctuation will be used; a space must be percent encoded as <code>&amp#32;</code>; do not use a semicolon (;), colon (:) or hash (#) as they will be interpreted as wikimarkup.
 
* '''display-authors''': By default, the number of authors displayed is limited to 8; if 9 are provided, the ninth is displayed as "et al." This parameter allows display of fewer authors before the "et al." (e.g., {{para|display-authors|2}}; the "et al." may be suppressed by the use of {{para|display-authors|9}}.
 
* '''lastauthoramp''': When set to any value, changes the separator to use between the last two names in lists of authors to an ampersand (&); defaults to a semicolon and space (; ), else {{para|author-separator}} if set.
 
* '''postscript''': The closing punctuation for the citation; defaults to a period (.); if the parameter is present, but blank, no terminating punctuation will be used. Ignored if {{para|quote}} is specified.
 
* '''separator''': The punctuation used to separate lists of authors, editors, etc. Defaults to a period (.); if the parameter is present, but blank, no separator punctuation will be used; do not use a semicolon (;), colon (:) or hash (#) as they will be interpreted as wikimarkup.
 
}}
 
}}<noinclude>
 
{{documentation}}</noinclude>
 

Latest revision as of 06:41, 14 June 2016

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage[edit]

This template is used to build consistent documentation pages for Citation Style 1 templates.

For example: {{Citation Style documentation|author}} will show the author documentation.

Where a particular section of documentation is not appropriate for a certain template, simply add the text manually or create a new subtemplate.

Each module of text is a subtemplate that can be edited using the link.

Section usage[edit]

When creating template documentation, use the following order of sections and content:

  • Lead: a brief overview of the template intent
  • Usage: samples of blank parameters that can be copied and pasted
  • Examples: examples of various usage
  • Parameters: detailed descriptions of each parameter
    • Syntax: overview of the template syntax
    • Deprecated: list of deprecated parameters
    • Description: parameter descriptions separated by function in this general order:
      • Authors
      • Title
      • Date
      • Publisher
      • Edition, series, volume
      • In-source locations
      • URL
      • Anchor
      • Identifiers
      • Quote
      • Editors
      • Laysummary
      • Display options

Lead section[edit]

Use {{csdoc|lead|content}} to create consistent content for the lead:

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

Markup Renders as
[markup]

[rendering]

Lua notice[edit]

Template:Citation Style documentation/edit

Usage section[edit]

Start the usage section with {{csdoc|usage}}:

Template:Citation Style documentation/usage

Parameters to copy are enclosed in tables created by sub-templates.

Full horizontal style[edit]

  • Start with {{csdoc|usage full}}
  • Precede the sample markup with : to create an indent
  • Enclose the sample in <code><code class="nowrap" style=""><nowiki>...</nowiki></code></code>
  • Close the table with {{end}}
{{csdoc|usage full}}
:<code><nowiki>{{cite book |last1= |first1= |authorlink1= |last2= |first2= |authorlink2= |editor1-first= |editor1-last= |editor1-link= |others= |title= |trans_title= |url= |archiveurl= |archivedate= |format= |accessdate= |type= |edition= |series= |volume= |date= |year= |month= |origyear= |publisher= |location= |language= |isbn= |oclc= |doi= |id= |page= |pages= |at= |trans_chapter= |chapter= |chapterurl= |quote= |ref= |bibcode= |laysummary= |laydate= |author-mask= |author-name-separator= |author-separator= |display-authors= |separator= |postscript= |lastauthoramp=}}</nowiki></code>
{{end}}

Template:Citation Style documentation/usage full

{{cite book |last1= |first1= |authorlink1= |last2= |first2= |authorlink2= |editor1-first= |editor1-last= |editor1-link= |others= |title= |trans_title= |url= |archiveurl= |archivedate= |format= |accessdate= |type= |edition= |series= |volume= |date= |year= |month= |origyear= |publisher= |location= |language= |isbn= |oclc= |doi= |id= |page= |pages= |at= |trans_chapter= |chapter= |chapterurl= |quote= |ref= |bibcode= |laysummary= |laydate= |author-mask= |author-name-separator= |author-separator= |display-authors= |separator= |postscript= |lastauthoramp=}}

Template:End

Most commonly used horizontal style[edit]

  • Start with {{csdoc|usage common}}
  • Precede the sample markup with : to create an indent
  • Enclose the sample in <code><code class="nowrap" style=""><nowiki>...</nowiki></code></code>
  • Close the table with {{end}}
{{csdoc|usage common}}
:<code><nowiki>{{cite book |last= |first= |authorlink= |title= |url= |accessdate= |year= |publisher= |location= |isbn= |page= |pages=}}</nowiki></code>
{{end}}

Template:Citation Style documentation/usage common

{{cite book |last= |first= |authorlink= |title= |url= |accessdate= |year= |publisher= |location= |isbn= |page= |pages=}}

Template:End

Full vertical style[edit]

The full vertical style is created in three columns: Vertical list, Prerequisites and Brief instructions / notes.

  • Start with:
{{csdoc|usage vertical}}
<pre style="margin:0px;">
  • Create the vertical list column
  • Separate the next column with:
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px;">
  • Create the prerequisites column; blank lines must include a &nbsp;
  • Separate the next column with:
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px;">
  • Create the instructions column; blank lines must include a &nbsp;
  • End with:
</pre>
{{csdoc|usage vertical end}}

Example:

{{csdoc|usage vertical}}
<pre style="margin:0px;">
{{cite book
| last                  =
| first                 =
| authorlink            =
}}
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px;">
&nbsp;
&nbsp;
last
&nbsp;
&nbsp;
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px;">
&nbsp;
same as last1
same as first1
&nbsp;
&nbsp;
</pre>
{{csdoc|usage vertical end}}

Template:Citation Style documentation/usage vertical

{{cite book
| last                  =
| first                 =
| authorlink            =
}}

Template:Citation Style documentation/usage vertical mid

 
 
last
 
 

Template:Citation Style documentation/usage vertical mid

 
same as last1
same as first1
 
 

Template:Citation Style documentation/usage vertical end

Sub-templates[edit]

Usage[edit]

Template:Citation Style documentation/edit Template:End

Usage full[edit]

Template:Citation Style documentation/edit Template:End

Usage common[edit]

Template:Citation Style documentation/edit Template:End

Usage vertical[edit]

Template:Citation Style documentation/edit Template:End

Usage vertical mid[edit]

Template:Citation Style documentation/edit Template:End

Usage vertical end[edit]

Template:Citation Style documentation/edit

Examples section[edit]

When creating examples, use these styles for consistency:

  • A title before the example, formatted in bold by the use of '''
  • The sample markup for the example: preceded by * to create a bullet, then the markup enclosed in <code><code class="nowrap" style=""><nowiki>...</nowiki></code></code>
  • The live markup: preceded by : to create an indent
Markup Renders as
[markup]

[rendering]

Parameters section[edit]

syntax[edit]

Template:Citation Style documentation/edit

coins[edit]

Template:Citation Style documentation/edit

sep_period[edit]

Template:Citation Style documentation/edit

sep_comma[edit]

Template:Citation Style documentation/edit

required[edit]

Template:Citation Style documentation/edit

deprecated[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

author[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

editor[edit]

Template:Citation Style documentation/edit

title[edit]

Template:Citation Style documentation/edit

Template:Citation Style documentation/opt

web[edit]

Template:Citation Style documentation/edit

chapter[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

type[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

journal[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

edition[edit]

Template:Citation Style documentation/edit

series[edit]

Template:Citation Style documentation/edit

series_episode[edit]

Template:Citation Style documentation/edit

event[edit]

Template:Citation Style documentation/edit

agency[edit]

Template:Citation Style documentation/edit

volume[edit]

Template:Citation Style documentation/edit

date[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

publisher[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

newsgroup[edit]

Template:Citation Style documentation/edit

language[edit]

Template:Citation Style documentation/edit

pages[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

time[edit]

Template:Citation Style documentation/edit

id1[edit]

Template:Citation Style documentation/edit

id2[edit]

Template:Citation Style documentation/edit

url[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

chapterurl[edit]

Template:Citation Style documentation/edit

lay[edit]

Template:Citation Style documentation/edit

quote[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

ref[edit]

Template:Citation Style documentation/edit

ref2[edit]

Template:Citation Style documentation/edit

display[edit]

Template:Citation Style documentation/edit Template:Citation Style documentation/opt

map_series[edit]

Template:Citation Style documentation/edit

map_id[edit]

Template:Citation Style documentation/edit

map_pages[edit]

Template:Citation Style documentation/edit

interview_id[edit]

Template:Citation Style documentation/edit

interview_author[edit]

Template:Citation Style documentation/edit

interview_interviewer[edit]

Template:Citation Style documentation/edit

album_name[edit]

Template:Citation Style documentation/edit

album_artist[edit]

Template:Citation Style documentation/edit

season[edit]

Template:Citation Style documentation/edit

network[edit]

Template:Citation Style documentation/edit

transcript[edit]

Template:Citation Style documentation/edit

notestitle[edit]

Template:Citation Style documentation/edit

conference[edit]

Template:Citation Style documentation/edit

See also[edit]

Template:Citation Style 1