Template:GT/sandbox
< Template:GT
Jump to navigation
Jump to search
Revision as of 20:47, 24 March 2018 by imported>WOSlinker (tag fix)
| This is the template sandbox page for Template:GT (diff). See also the companion subpage for test cases. |
Purpose
To show gross tonnage in a consistent manner that is compliant with WP:MOSNUM. In particular it:
- standardizes capitalization and spelling (i.e. GT, Gt, gt, G.T., g.t. and so forth),
- standardizes the link to the definition,
- links to gross tonnage on the first use in an article,
- uses the abbreviation GT, i.e. "XXX GT" on subsequent uses in the article,
- inserts where needed
Note! Gross tonnage is a dimensionless index calculated with a mathematical formula. While this template allows, for the sake of backwards compatibility, the use of "tons" as the unit for gross tonnage, this is not correct and should not be used in future articles.
Usage
{{GT|number|disp=|link=}}
- Parameters
- number: numerical value of the gross tonnage;
- disp: controls how the template will render in the page:
|disp=when empty or omitted, displays the abbreviated form:{{GT|36,000|disp=}}→ 36,000 GT
|disp=longcreates a verbose description suitable for the first occurrence on a page{{GT|36,000|disp=long}}→ 36,000 gross tonnage (GT)
|disp=adjcreates the adjectival form:{{GT|36,000|disp=adj}}→ 36,000-gross tonnage (GT)
- link: controls when the template output is linked to the gross tonnage article
|link=when empty or omitted, links to the gross tonnage article; this is the default;{{GT|36,000|disp=long|link=}}→ 36,000 gross tonnage (GT)
|link=offinstances of the rendered template are not linked to the gross tonnage article:{{GT|36,000|disp=long|link=off}}→ 36,000 gross tonnage (GT)
Examples
| Input | Displays as |
| {{GT|36000|disp=long}} | 36,000 gross tonnage (GT) |
| {{GT|36000|disp=long|link=off}} | 36,000 gross tonnage (GT) |
| {{GT|36000|disp=adj}} | 36,000-gross tonnage (GT) |
| {{GT|36000|disp=adj|link=off}} | 36,000-gross tonnage (GT) |
| {{GT|36000|disp=}} | 36,000 GT |
| {{GT|36000}} | 36,000 GT |
| {{GT|36000|link=off}} | 36,000 GT |
- 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.
| The above documentation is transcluded from Template:GT/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |