Difference between revisions of "Template:Infobox islands/density"
Jump to navigation
Jump to search
imported>AGK m (Changed protection level of Template:Infobox islands/density: Highly-visible template (between 1900 and 4000 transclusions) ([edit=autoconfirmed] (indefinite) [move=sysop] (indefinite))) |
imported>Yaris678 m (Changed protection level for "Template:Infobox islands/density": For consistency with Template:Infobox islands. An increase of edit protection and decrease of move protection. ([Edit=Require template editor access] (indefinite) [Move=Require t...) |
(No difference)
| |
Revision as of 12:46, 13 March 2017
This is a subtemplate of {{Infobox islands}}, and should not be used directly.
Usage
| Input | Output |
|---|---|
{{Infobox islands/density|km2=85}} |
85 /km2 (Expression error: Unrecognized punctuation character "[". /sq mi) |
{{Infobox islands/density|sqmi=220}} |
220 /sq mi (Expression error: Unrecognized punctuation character "[". /km2) |
{{Infobox islands/density|m2=25}} |
25 /m2 (Expression error: Unrecognized punctuation character "[". /sq ft) |
{{Infobox islands/density|sqft=2}} |
2 /sq ft (Expression error: Unrecognized punctuation character "[". /m2) |
{{Infobox islands/density|km2=85|sqmi=220}} |
85 /km2 (220 /sq mi) |
{{Infobox islands/density|m2=25|sqft=2}} |
25 /m2 (2 /sq ft) |
{{Infobox islands/density|km2=85|m2=25}} |
85 /km2 (Expression error: Unrecognized punctuation character "[". /sq mi) |
{{Infobox islands/density|sqmi=220|sqft=2}} |
220 /sq mi (Expression error: Unrecognized punctuation character "[". /km2) |
{{Infobox islands/density|m2=25|sqmi=220|sqft=2}} |
220 /sq mi (Expression error: Unrecognized punctuation character "[". /km2) |
{{Infobox islands/density|km2=85|sqmi=220|sqft=2}} |
85 /km2 (220 /sq mi) |
{{Infobox islands/density|km2=85|m2=25|sqft=2}} |
85 /km2 (Expression error: Unrecognized punctuation character "[". /sq mi) |
{{Infobox islands/density|km2=85|m2=25|sqmi=220}} |
85 /km2 (220 /sq mi) |
{{Infobox islands/density|km2=85|m2=25|sqmi=220|sqft=2}} |
85 /km2 (220 /sq mi) |
{{convert|85|/km2|abbr=on}}→ 85/km2 (220/sq mi){{convert|220|/sqmi|abbr=on}}→ 220/sq mi (85/km2)
Code
The code uses {{precision}} to determine the level of precision. The logic is to give preference to km2/sqmi over m2/sqft. If both km2 and sqmi are specified, then no conversion takes place. Similarly, if both m2 and sqft are specified (and km2/sqmi are not specified), then no conversion takes place.
See also
- {{convert}}
- {{Infobox islands/area}}
- {{Infobox islands/length}}
| The above documentation is transcluded from Template:Infobox islands/density/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |