Difference between revisions of "Template:Citation Style documentation/doc"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(quote: opt)
(display: lua)
 
(21 intermediate revisions by 3 users not shown)
Line 12: Line 12:
 
Each module of text is a subtemplate that can be edited using the link.
 
Each module of text is a subtemplate that can be edited using the link.
  
==Parameters==
+
==Section usage==
 +
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==
 +
Use {{tlx|csdoc|lead|content}} to create consistent content for the lead:
 +
 
 +
{{Citation Style documentation/edit|lead}}
 +
{{Citation Style documentation/opt|1=
 +
One unnamed parameter is used to create the trailing text.}}
 +
 
 +
{{markup
 +
|<nowiki>{{csdoc|lead|books}}</nowiki>
 +
|{{csdoc|lead|books}}
 +
}}
 +
 
 +
===Lua notice===
 +
{{Citation Style documentation/edit|lua}}
 +
 
 +
==Usage section==
 +
Start the usage section with {{tlx|csdoc|usage}}:
 +
:{{csdoc|usage}}
 +
 
 +
Parameters to copy are enclosed in tables created by sub-templates.
 +
 
 +
===Full horizontal style===
 +
* Start with {{tlx|csdoc|usage full}}
 +
* Precede the sample markup with <code>:</code> to create an indent
 +
* Enclose the sample in {{tag|code|content={{tag|nowiki}}}}
 +
* Close the table with {{tlx|end}}
 +
 
 +
{{pre2|<nowiki>
 +
{{csdoc|usage full}}
 +
:<code>&lt;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=}}&lt;/nowiki></code>
 +
{{end}}</nowiki>
 +
}}
 +
{{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}}
 +
 
 +
===Most commonly used horizontal style===
 +
* Start with {{tlx|csdoc|usage common}}
 +
* Precede the sample markup with <code>:</code> to create an indent
 +
* Enclose the sample in {{tag|code|content={{tag|nowiki}}}}
 +
* Close the table with {{tlx|end}}
 +
 
 +
{{pre2|<nowiki>
 +
{{csdoc|usage common}}
 +
:<code>&lt;nowiki>{{cite book |last= |first= |authorlink= |title= |url= |accessdate= |year= |publisher= |location= |isbn= |page= |pages=}}&lt;/nowiki></code>
 +
{{end}}</nowiki>
 +
}}
 +
{{csdoc|usage common}}
 +
:<code><nowiki>{{cite book |last= |first= |authorlink= |title= |url= |accessdate= |year= |publisher= |location= |isbn= |page= |pages=}}</nowiki></code>
 +
{{end}}
 +
 
 +
===Full vertical style===
 +
The full vertical style is created in three columns: Vertical list, Prerequisites and Brief instructions / notes.
 +
 
 +
* Start with:
 +
{{pre2|<nowiki>
 +
{{csdoc|usage vertical}}
 +
<pre style="margin:0px;">
 +
</nowiki>}}
 +
* Create the vertical list column
 +
* Separate the next column with:
 +
{{pre2|<nowiki>
 +
</pre>
 +
{{csdoc|usage vertical mid}}
 +
<pre style="margin:0px;">
 +
</nowiki>}}
 +
* Create the prerequisites column; blank lines must include a <code>&amp;nbsp;</code>
 +
* Separate the next column with:
 +
{{pre2|<nowiki>
 +
</pre>
 +
{{csdoc|usage vertical mid}}
 +
<pre style="margin:0px;">
 +
</nowiki>}}
 +
* Create the instructions column; blank lines must include a <code>&amp;nbsp;</code>
 +
* End with:
 +
{{pre2|<nowiki>
 +
</pre>
 +
{{csdoc|usage vertical end}}
 +
</nowiki>}}
 +
 
 +
Example:
 +
{{pre2|<nowiki>
 +
{{csdoc|usage vertical}}
 +
<pre style="margin:0px;">
 +
{{cite book
 +
| last                  =
 +
| first                =
 +
| authorlink            =
 +
}}
 +
</pre>
 +
{{csdoc|usage vertical mid}}
 +
<pre style="margin:0px;">
 +
&amp;nbsp;
 +
&amp;nbsp;
 +
last
 +
&amp;nbsp;
 +
&amp;nbsp;
 +
</pre>
 +
{{csdoc|usage vertical mid}}
 +
<pre style="margin:0px;">
 +
&amp;nbsp;
 +
same as last1
 +
same as first1
 +
&amp;nbsp;
 +
&amp;nbsp;
 +
</pre>
 +
{{csdoc|usage vertical end}}
 +
</nowiki>}}
 +
{{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}}
 +
 
 +
===Sub-templates===
 +
 
 +
====Usage====
 +
{{Citation Style documentation/edit|usage}}
 +
{{end}}
 +
 
 +
====Usage full====
 +
{{Citation Style documentation/edit|usage full}}
 +
{{end}}
 +
 
 +
====Usage common====
 +
{{Citation Style documentation/edit|usage common}}
 +
{{end}}
 +
 
 +
====Usage vertical====
 +
{{Citation Style documentation/edit|usage vertical}}
 +
{{end}}
 +
 
 +
====Usage vertical mid====
 +
{{Citation Style documentation/edit|usage vertical mid}}
 +
{{end}}
 +
 
 +
====Usage vertical end====
 +
{{Citation Style documentation/edit|usage vertical end}}
 +
 
 +
==Examples section==
 +
When creating examples, use these styles for consistency:
 +
* A title before the example, formatted in bold by the use of <code><nowiki>'''</nowiki></code>
 +
* The sample markup for the example: preceded by <code>*</code> to create a bullet, then the markup enclosed in {{tag|code|content={{tag|nowiki}}}}
 +
* The live markup: preceded by <code>:</code> to create an indent
 +
 
 +
{{markup
 +
|<nowiki>
 +
'''Title'''
 +
*<code>&lt;nowiki>{{cite book |title=Mysterious book}}&lt;/nowiki></code>
 +
:{{cite book |title=Mysterious book}}</nowiki>
 +
|'''Title'''
 +
*<code><nowiki>{{cite book |title=Mysterious book}}</nowiki></code>
 +
:{{cite book |title=Mysterious book}}
 +
}}
 +
 
 +
==Parameters section==
  
 
===syntax===
 
===syntax===
Line 28: Line 226:
 
===required===
 
===required===
 
{{Citation Style documentation/edit|required}}
 
{{Citation Style documentation/edit|required}}
 +
 +
===deprecated===
 +
{{Citation Style documentation/edit|deprecated}}
 +
{{Citation Style documentation/opt|1=
 +
*{{para|date2|yes}} adds:
 +
** date2
 +
** month2
 +
** year2}}
  
 
===author===
 
===author===
 
{{Citation Style documentation/edit|author}}
 
{{Citation Style documentation/edit|author}}
 
{{Citation Style documentation/opt|1=
 
{{Citation Style documentation/opt|1=
*{{para|coauthors|yes}} adds the coauthors parameter.
+
*{{para|coauthors|yes}} adds "'''coauthors''': (deprecated) Names of of coauthors. Use the same format as the authors."
*{{para|others|yes}} adds the others parameter.
+
*{{para|others|yes}} adds "'''others''': To record other contributors to the work, such as "Illustrated by Smith" or "Trans. Smith"."
*{{para|aliases}} includes aliases for '''last'''.
+
*{{para|aliases}} add aliases for '''last'''.
 
}}
 
}}
  
Line 109: Line 315:
 
{{Citation Style documentation/opt|1=
 
{{Citation Style documentation/opt|1=
 
*{{para|work|no}} suppresses "; if '''work''' is defined, then '''publisher''' and '''location''' are enclosed in parentheses"
 
*{{para|work|no}} suppresses "; if '''work''' is defined, then '''publisher''' and '''location''' are enclosed in parentheses"
 +
*{{para|map|yes}} changes:
 +
** '''publisher''': Name of publisher. Displays before title. Do not wikilink—use publisher-link instead.
 +
** '''publisher-link''': Title of existing Wikipedia article about the publisher—not the publisher's website; do not wikilink.
 
}}
 
}}
  
Line 161: Line 370:
 
* '''cs2''': When set, changes:
 
* '''cs2''': When set, changes:
 
**'''postscript''' to "defaults to none"
 
**'''postscript''' to "defaults to none"
** '''separator''' to "Defaults to a comma (,)"}}
+
** '''separator''' to "Defaults to a comma (,)"
 +
* '''lua''': When set, changes descriptions to update Lua versions.}}
  
 
===map_series===
 
===map_series===
Line 180: Line 390:
 
===interview_interviewer===
 
===interview_interviewer===
 
{{Citation Style documentation/edit|interview_interviewer}}
 
{{Citation Style documentation/edit|interview_interviewer}}
 
===DVD-notes_date===
 
{{Citation Style documentation/edit|DVD-notes_date}}
 
  
 
===album_name===
 
===album_name===

Latest revision as of 11:45, 17 April 2013

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