Difference between revisions of "Template:GRT/doc"

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(change cat)
imported>DePiep
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
 
__NOTOC__
 
__NOTOC__
 
==Purpose==
 
==Purpose==
 
To show [[gross register tonnage]] in a consistent manner that is compliant with [[WP:MOSNUM]].  In particular it:
 
To show [[gross register tonnage]] in a consistent manner that is compliant with [[WP:MOSNUM]].  In particular it:
* capitalization and spelling are standardized (i.e. GRT, Grt, grt, G.R.T., g.r.t. and so forth),
+
* standardizes capitalization and spelling (i.e. GRT, Grt, grt, G.R.T., g.r.t. and so forth),
* the link to the definition is standardized,
+
* standardizes the link to the definition,
* spells out "XXX gross register tons" and introduces the abbreviation GRT on the first use in an article,
 
 
* links to gross register tonnage on the first use in an article,
 
* links to gross register tonnage on the first use in an article,
* uses the abbreviation GRT on subsequent uses in the article, and
+
* uses the abbreviation GRT, i.e. "{{GRT|XXX}}" on subsequent uses in the article,
* inserts a <nowiki>&amp;nbsp;</nowiki> between the number and the unit.
+
* inserts &amp;nbsp; where needed
'''Note!''' For ships built on or after 18 July 1982, use {{[[tl|GT]]}}.
+
'''Note!''' For ships built on or after 18 July 1982, use {{tl|GT}}.
  
 
==Usage==
 
==Usage==
  <tt><nowiki>{{</nowiki>GRT|''number''|''first=yes''<nowiki>}}</nowiki></tt>
+
  <code><nowiki>{{</nowiki>GRT|{{var|number}}|disp=|link=}}</code>
  
Specify <tt>''first=yes''</tt> to create a verbose description suitable for the first occurrence on a page.
+
;Parameters
 
+
:'''{{var|number}}''': numerical value of the gross register tonnage;
Specify <tt>''first=short''</tt> to create a linked ''GRT'' suitable for tables or infoboxes.
+
:'''disp''': controls how the template will render in the page:
 +
::{{para|disp}} when empty or omitted, displays the abbreviated form:
 +
:::<code><nowiki>{{GRT|36,000|disp=}}</nowiki></code> → {{GRT|36,000|disp=}}
 +
::{{para|disp|long}} creates a verbose description suitable for the first occurrence on a page
 +
:::<code><nowiki>{{GRT|36,000|disp=long}}</nowiki></code> → {{GRT|36,000|disp=long}}
 +
::{{para|disp|adj}} creates the adjectival form:
 +
:::<code><nowiki>{{GRT|36,000|disp=adj}}</nowiki></code> → {{GRT|36,000|disp=adj}}
 +
:'''link''': controls when the template output is linked to the [[gross register tonnage]] article
 +
::{{para|link}} when empty or omitted, links to the gross register tonnage article; this is the default;
 +
:::<code><nowiki>{{GRT|36,000|disp=long|link=}}</nowiki></code> → {{GRT|36,000|disp=long|link=}}
 +
::{{para|link|off}} instances of the rendered template are not linked to the gross register tonnage article:
 +
:::<code><nowiki>{{GRT|36,000|disp=long|link=off}}</nowiki></code> → {{GRT|36,000|disp=long|link=off}}
  
 
==Examples==
 
==Examples==
Line 23: Line 32:
 
|'''Input'''||'''Displays as'''
 
|'''Input'''||'''Displays as'''
 
|-
 
|-
|<nowiki> {{GRT|36,000|first=yes}} </nowiki> ||{{GRT|36,000|first=yes}}  
+
|<nowiki> {{GRT|36000|disp=long}} </nowiki> ||{{GRT|36000|disp=long}}
 +
|-
 +
|<nowiki> {{GRT|36000|disp=long|link=off}} </nowiki> ||{{GRT|36000|disp=long|link=off}}
 +
|-
 +
|<nowiki> {{GRT|36000|disp=adj}} </nowiki> ||{{GRT|36000|disp=adj}}
 +
|-
 +
|<nowiki> {{GRT|36000|disp=adj|link=off}} </nowiki> ||{{GRT|36000|disp=adj|link=off}}
 +
|-
 +
|<nowiki> {{GRT|36000|disp=}} </nowiki> ||{{GRT|36000|disp=}}  
 
|-
 
|-
|<nowiki> {{GRT|36,000|first=short}} </nowiki> ||{{GRT|36,000|first=short}}  
+
|<nowiki> {{GRT|36000}} </nowiki> ||{{GRT|36000}}  
 
|-
 
|-
|<nowiki> {{GRT|36,000}} </nowiki> ||{{GRT|36,000}}  
+
|<nowiki> {{GRT|36000|link=off}} </nowiki> ||{{GRT|36000|link=off}}  
 
|}
 
|}
  
 
{{DWT/doc/related}}
 
{{DWT/doc/related}}
  
<includeonly>
+
<includeonly>{{sandbox other||
[[Category:Ship templates]]
+
[[Category:Ship measurement templates]]
 +
}}
 
</includeonly>
 
</includeonly>

Latest revision as of 15:43, 11 March 2018

Purpose

To show gross register tonnage in a consistent manner that is compliant with WP:MOSNUM. In particular it:

  • standardizes capitalization and spelling (i.e. GRT, Grt, grt, G.R.T., g.r.t. and so forth),
  • standardizes the link to the definition,
  • links to gross register tonnage on the first use in an article,
  • uses the abbreviation GRT, i.e. "XXX GRT" on subsequent uses in the article,
  • inserts &nbsp; where needed

Note! For ships built on or after 18 July 1982, use {{GT}}.

Usage

{{GRT|number|disp=|link=}}
Parameters
number: numerical value of the gross register tonnage;
disp: controls how the template will render in the page:
|disp= when empty or omitted, displays the abbreviated form:
{{GRT|36,000|disp=}} → 36,000 GRT
|disp=long creates a verbose description suitable for the first occurrence on a page
{{GRT|36,000|disp=long}} → 36,000 gross register tons (GRT)
|disp=adj creates the adjectival form:
{{GRT|36,000|disp=adj}} → 36,000-gross register ton (GRT)
link: controls when the template output is linked to the gross register tonnage article
|link= when empty or omitted, links to the gross register tonnage article; this is the default;
{{GRT|36,000|disp=long|link=}} → 36,000 gross register tons (GRT)
|link=off instances of the rendered template are not linked to the gross register tonnage article:
{{GRT|36,000|disp=long|link=off}} → 36,000 gross register tons (GRT)

Examples

Input Displays as
{{GRT|36000|disp=long}} 36,000 gross register tons (GRT)
{{GRT|36000|disp=long|link=off}} 36,000 gross register tons (GRT)
{{GRT|36000|disp=adj}} 36,000-gross register ton (GRT)
{{GRT|36000|disp=adj|link=off}} 36,000-gross register ton (GRT)
{{GRT|36000|disp=}} 36,000 GRT
{{GRT|36000}} 36,000 GRT
{{GRT|36000|link=off}} 36,000 GRT
  1. REDIRECT Template:WPSHIPS: Measurement templates


  • From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.