Difference between revisions of "Template:GRT/doc"

From blackwiki
Jump to navigation Jump to search
imported>Trappist the monk
m (keep sandbox out of cats;)
imported>DePiep
 
(One intermediate revision by one other user 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==
  <code><nowiki>{{</nowiki>GRT|''number''|disp=|link=}}</code>
+
  <code><nowiki>{{</nowiki>GRT|{{var|number}}|disp=|link=}}</code>
  
 
;Parameters
 
;Parameters
:'''number''': numerical value of the gross register tonnage;  
+
:'''{{var|number}}''': numerical value of the gross register tonnage;  
 
:'''disp''': controls how the template will render in the page:
 
:'''disp''': controls how the template will render in the page:
 
::{{para|disp}} when empty or omitted, displays the abbreviated form:
 
::{{para|disp}} when empty or omitted, displays the abbreviated form:
 
:::<code><nowiki>{{GRT|36,000|disp=}}</nowiki></code> → {{GRT|36,000|disp=}}
 
:::<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. Equivalent to the deprecated {{para|first|yes}};
+
::{{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}}
 
:::<code><nowiki>{{GRT|36,000|disp=long}}</nowiki></code> → {{GRT|36,000|disp=long}}
 
::{{para|disp|adj}} creates the adjectival form:
 
::{{para|disp|adj}} creates the adjectival form:
Line 29: Line 27:
 
::{{para|link|off}} instances of the rendered template are not linked to the gross register tonnage article:
 
::{{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}}
 
:::<code><nowiki>{{GRT|36,000|disp=long|link=off}}</nowiki></code> → {{GRT|36,000|disp=long|link=off}}
:{{xtd|'''first'''}}: (deprecated) controls how the template will render in the page:
 
::{{xtd|{{para|first}}}} (deprecated) when empty or omitted or
 
::{{xtd|{{para|first|short}}}} (deprecated) displays the abbreviated form:
 
:::<code><nowiki>{{GRT|36,000|first=}}</nowiki></code> → {{GRT|36,000|first=}}
 
::{{xtd|{{para|first|yes}}}} (deprecated) creates a verbose description suitable for the first occurrence on a page. Equivalent to {{para|disp|long}};
 
:::<code><nowiki>{{GRT|36,000|first=yes}}</nowiki></code> → {{GRT|36,000|first=yes}}
 
::{{xtd|{{para|first|off}}}} (deprecated) creates an unlinked verbose description. Equivalent to {{para|disp|long}}{{para|link|off}};
 
:::<code><nowiki>{{GRT|36,000|first=off}}</nowiki></code> → {{GRT|36,000|first=off}}
 
  
 
==Examples==
 
==Examples==
Line 59: Line 49:
 
{{DWT/doc/related}}
 
{{DWT/doc/related}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<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.