Template:Citation Style documentation/display: Difference between revisions

From Climate Change AI Wiki
Content added Content deleted
imported>Trappist the monk
m (Update separator to reflect Lua-based citation operation;)
 
(44 intermediate revisions by 15 users not shown)
Line 1: Line 1:
* <span id="csdoc_display"></span><b id="csdoc_mode">mode</b>: Sets element separator, default terminal punctuation, and certain capitalization according to the value provided. For {{para|mode|cs1}}, element separator and terminal punctuation is a period (<code>.</code>); where appropriate, initial letters of certain words are capitalized ('Retrieved...'). For {{para|mode|cs2}}, element separator is a comma (<code>,</code>); terminal punctuation is omitted; where appropriate, initial letters of certain words are not capitalized ('retrieved...'). To override default terminal punctuation use '''postscript'''.
* '''author-mask''': Replaces the name of the first author with [[dash|em dashes]] or text. Set '''author-mask''' to a numeric value to set the dash in em spaces; 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. Primarily intended for use in bibliographies for some styles where multiple works by a single author are listed. Do not use in a list generated by {{tl|reflist}}, {{tag|references|s}} or similar as there is no control as to the order that references will display.
* <b id="csdoc_author-mask">author-mask</b>: Replaces the name of the first author with [[dash#Em dash|em dashes]] or text. Set '''author-mask''' to a numeric value ''n'' to set the dash ''n'' em spaces wide; set '''author-mask''' to a text value to display the text without a trailing author separator; for example, "with". You must still include the values for all authors for metadata purposes. Primarily intended for use with bibliographies or bibliography styles where multiple works by a single author are listed sequentially such as {{sfnote|lc=y}}. Do not use in a list generated by {{tlx|reflist}}, {{tag|references|s}} or similar as there is no control of the order in which references are displayed. You can also use '''editor-mask''' and '''translator-mask''' in the same way. Mask parameters can take a number in the name of the parameter (e.g. {{para|author<sub>n</sub>-mask}}) to specify which author the mask should apply to.
* '''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 encoded as &amp;#32; do not use an asterisk (*), colon (:) or hash (#) as they will be interpreted as wikimarkup.
* <b id="csdoc_display-authors"><span id="csdoc_displayauthors"></span>display-authors</b>: Controls the number of author names that are displayed when a citation is published. To change the displayed number of authors, set '''display-authors''' to the desired number. For example, {{para|display-authors|2}} will display only the first two authors in a citation. By default, all authors are displayed. {{para|display-authors|etal}} displays all authors in the list followed by et al. Aliases: '''displayauthors'''.
* '''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 encoded as &amp;#32; do not use an asterisk (*), 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."; for example, use {{para|display-authors|2}} for only two authors. The "et al." may be suppressed altogether by setting {{para|display-authors|9}}.
* <b id="csdoc_display-editors"><span id="csdoc_displayeditors"></span>display-editors</b>: Controls the number of editor names that are displayed when a citation is published. To change the displayed number of editors, set '''display-editors''' to the desired number. For example, {{para|display-editors|2}} will display only the first two editors in a citation. By default, all editors are displayed. {{para|display-editors|etal}} displays all editors in the list followed by et al. Aliases: '''displayeditors'''.
* '''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 '''author-separator''' if set.
* <b id="csdoc_lastauthoramp">last-author-amp</b>: Switches the separator between the last two names of the author list to space ampersand space (<code> & </code>) when set to <code>y</code>, <code>yes</code>, or <code>true</code>. Example: {{para|last-author-amp|yes}}
* '''postscript''': The closing punctuation for the citation; {{#if: {{{cs2|}}}|defaults to none|defaults to a period (.); if the parameter is present, but blank, no terminating punctuation will be used}}. Ignored if '''quote''' is defined.
* <b id="csdoc_postscript">postscript</b>: Controls the closing punctuation for a citation; defaults to {{#if: {{{cs2|}}}|none|a period (<code>.</code>); for no terminating punctuation, specify {{para|postscript|none}} – leaving {{para|postscript}} empty is the same as omitting it, but is ambiguous}}. Additional text or templates beyond the terminating punctuation may generate an error message. {{para|postscript}} is ignored if '''quote''' is defined.
* '''separator''': The punctuation used to separate lists of authors, editors, etc. Defaults to a {{#if: {{{cs2|}}}|comma (,)|period (.)}}; if the parameter is present but blank, no separator punctuation will be used; do not use an asterisk (*), colon (:) or hash (#) as they will be interpreted as wikimarkup. In Lua-based CS1 citations, when the parameter is present but blank, separator punctuation is set to a period.

Latest revision as of 01:59, 16 September 2020

  • mode: Sets element separator, default terminal punctuation, and certain capitalization according to the value provided. For Template:Para, element separator and terminal punctuation is a period (.); where appropriate, initial letters of certain words are capitalized ('Retrieved...'). For Template:Para, element separator is a comma (,); terminal punctuation is omitted; where appropriate, initial letters of certain words are not capitalized ('retrieved...'). To override default terminal punctuation use postscript.
  • author-mask: Replaces the name of the first author with em dashes or text. Set author-mask to a numeric value n to set the dash n em spaces wide; set author-mask to a text value to display the text without a trailing author separator; for example, "with". You must still include the values for all authors for metadata purposes. Primarily intended for use with bibliographies or bibliography styles where multiple works by a single author are listed sequentially such as Template:Sfnote. Do not use in a list generated by Template:Tlx, Template:Tag or similar as there is no control of the order in which references are displayed. You can also use editor-mask and translator-mask in the same way. Mask parameters can take a number in the name of the parameter (e.g. Template:Para) to specify which author the mask should apply to.
  • display-authors: Controls the number of author names that are displayed when a citation is published. To change the displayed number of authors, set display-authors to the desired number. For example, Template:Para will display only the first two authors in a citation. By default, all authors are displayed. Template:Para displays all authors in the list followed by et al. Aliases: displayauthors.
  • display-editors: Controls the number of editor names that are displayed when a citation is published. To change the displayed number of editors, set display-editors to the desired number. For example, Template:Para will display only the first two editors in a citation. By default, all editors are displayed. Template:Para displays all editors in the list followed by et al. Aliases: displayeditors.
  • last-author-amp: Switches the separator between the last two names of the author list to space ampersand space ( & ) when set to y, yes, or true. Example: Template:Para
  • postscript: Controls the closing punctuation for a citation; defaults to a period (.); for no terminating punctuation, specify Template:Para – leaving Template:Para empty is the same as omitting it, but is ambiguous. Additional text or templates beyond the terminating punctuation may generate an error message. Template:Para is ignored if quote is defined.