Difference between revisions of "Template:Epi/ftom"

From blackwiki
Jump to navigation Jump to search
imported>Jimp
m (moved Template:Ftom to Template:Epi/ftom: This is really a subroutine of {{epi}})
imported>Buaidh
(-->|{{!}}rowspan={{{r|1}}} align={{{a|center}}}{{!}}<!--)
Line 1: Line 1:
 
{{#if:{{{1|}}}<!--
 
{{#if:{{{1|}}}<!--
   -->|{{!}}align={{{a|center}}}{{!}}<!--
+
   -->|{{!}}rowspan={{{r|1}}} align={{{a|center}}}{{!}}<!--
 
           -->{{#ifeq:{{{1}}}|#<!--
 
           -->{{#ifeq:{{{1}}}|#<!--
 
                   -->|{{{s|}}}{{{p|}}}{{nk|0|sea level}}<!--
 
                   -->|{{{s|}}}{{{p|}}}{{nk|0|sea level}}<!--

Revision as of 16:24, 26 September 2014

Template documentation[view] [edit] [history] [purge]

Use

This template creates one sortable cell of a sortable table displaying a measurement formatted in international feet (of exactly 0.3048 meter) followed with the same measurement formatted in meters. This template is an alternative to Template:Epi/moft for the United States.

The syntax of this template is:

{{epi/ftom|var1|a=|d=|l=|p=|r=|s=}}

where:

  • var1 is a real number representing the measurement in meters (may not contain a thousands separator), # for sea level, or NA if not available.
  • a is an optional alignment parameter:
    • a=left yields left alignment
    • a=center yields center alignment (default)
    • a=right yields right alignment
  • d is an optional integer representing the number of decimal places of feet to display (default=0)
  • e is an optional integer representing the number of decimal places of meters to display (default=d)
  • l is an optional lines parameter:
    • l=1 yields a single-line display
    • l=2 yields a double-line display (default)
  • p is an optional prefix to display before each number, e.g. about , ~, >, < (default is no prefix)
  • r is an optional integer representing the number of rows to span (default=1)
  • s is an optional style parameter:
    • s= yields regular style (default)
    • s='' yields italic style
    • s=''' yields bold style
    • s=''''' yields bold italic style

Example

The use of this template is illustrated in the sortable table below:

Peak Wikitext Elevation
Mount McKinley {{epi/ftom|6193.536}} Template:Nk
Mount Saint Elias {{epi/ftom|5488.838}} Template:Nk
Mount Foraker {{epi/ftom|5303.520}} Template:Nk

See also