Difference between revisions of "Template:GRT/doc"
Jump to navigation
Jump to search
imported>Trappist the monk m (keep sandbox out of cats;) |
imported>DePiep m (Category:Ship measurement templates (via WP:JWB)) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | |||
__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 | + | * standardizes capitalization and spelling (i.e. GRT, Grt, grt, G.R.T., g.r.t. and so forth), |
| − | * the link to the definition | + | * standardizes the link to the definition, |
| − | |||
* 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, | + | * uses the abbreviation GRT, i.e. "{{GRT|XXX}}" on subsequent uses in the article, |
| − | * inserts | + | * inserts   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| | + | <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 | + | ::{{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}} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Examples== | ==Examples== | ||
| Line 59: | Line 49: | ||
{{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
| File:Edit-copy green.svg | This is a documentation subpage for Template:GRT. It contains usage information, categories and other content that is not part of the original template page. |
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 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=longcreates a verbose description suitable for the first occurrence on a page{{GRT|36,000|disp=long}}→ 36,000 gross register tons (GRT)
|disp=adjcreates 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=offinstances 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 |
- 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.