Template:LCSR/doc

From blackwiki
< Template:LCSR
Revision as of 21:13, 19 January 2019 by imported>Bungle (documentation for template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

{{LCSR|Country (ISO)|Male rank|Male number|Female rank|Female number|Parameters (optional)}}

This template is used for managing table items on the article List of countries by suicide rate. It will automatically calculate the average and ratio from specified figures. In addition, it will detect if there is an associated article relating to suicide for that country and display a link if there is.

Parameters

  • |fn=NAME, optional, defines a reference to a footnote
  • |flag=no, optional, disables the flag icon (retains flag space)
  • |style=bold OR italic, optional, defines whether the row should be styled in italic or bold

Example

 {|class="wikitable sortable" style="text-align:right"
  |-
  !Country !! Both sexes !! Male<br>rank !! Male !! Female<br>rank !! Female !! Male:Female ratio
  {{LCSR|China|143|7.9|24|8.3|style=italic}}
  {{LCSR|Romania|85|13.9|141|2.4}}
  {{LCSR|Singapore|114|11.1|76|4.9|fn=legislation-b}}
  {{LCSR|Montenegro|102|12.6|108|3.6}}
  {{LCSR|Bulgaria|95|13.1|118|3.2}}
 |}
 {{notelist|refs=
{{efn|name=legislation-b|Suicide attempts are illegal in this country, and punishable by imprisonment or other penalties.   This might be the reason for the low suicide rate in these countries. See also [[Suicide legislation]].}}
}}

will create..

Country Both sexes Male
rank
Male Female
rank
Female Male:Female ratio
143 23x15px China Asia 7.9 24 8.3 {{{6}}} {{{7}}} Expression error: Unrecognized punctuation character "{".
85 23x15px Romania Europe 13.9 141 2.4 {{{6}}} {{{7}}} Expression error: Unrecognized punctuation character "{".
114 23x15px Singapore[lower-alpha 1] Asia 11.1 76 4.9 {{{6}}} {{{7}}} Expression error: Unrecognized punctuation character "{".
102 23x15px Montenegro Europe 12.6 108 3.6 {{{6}}} {{{7}}} Expression error: Unrecognized punctuation character "{".
95 23x15px Bulgaria Europe 13.1 118 3.2 {{{6}}} {{{7}}} Expression error: Unrecognized punctuation character "{".

Notes

  1. Suicide attempts are illegal in this country, and punishable by imprisonment or other penalties. This might be the reason for the low suicide rate in these countries. See also Suicide legislation.

Notes MUST have the original citation located directly within the respective notes section, within the notelist template.