Templat:In to cm

Daripada Wikipedia, ensiklopedia bebas.
Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]
Pendokumenan templat berikut ditransklusikan daripada Templat:In to cm/doc [sunting]

This template is intended to perform inch-to-centimeter conversions. It converts single values, ranges, as well as two- and three-dimensional measurements.

Accepted parameters[sunting sumber]

Italicized parameters are optional:

  • num, or l (length), or from, or first unnamed parameter is a required parameter, which specifies the number of inches to be converted to centimeters (for single value conversions), or length (for two- and three-dimensional conversions), or start of range (for range conversions). Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • w (width), or to, or second unnamed parameter is a parameter specifying width (for dimensional conversions) or end of range (for range conversions) in inches to be converted to centimeters. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • h (height) or third unnamed parameter is a parameter specifying height (for three-dimensional conversions) in inches to be converted to centimeters. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • convtype (conversion type) can take values of either range or dim. Range is only meaningful when two values are supplied for conversion. The default value is dim.
  • abbr can take values of either mos, yes, or no. Mos will show the names of the units as specified in the Manual of Style for dates and numbers (inches, cm); yes will show the abbreviated names of the units (in, cm); and no will show the full names of the units (inches, centimeters). With dimensional conversions, all values will be separated with the "by" preposition when the parameter is set to no, and with the "×" sign when the parameter is set to yes. When the parameter is set to mos, inch values will be separated with the "by" preposition, and the converted values in centimeters—with the "×" sign. The default value is mos.
  • spell can take values of American or Commonwealth and is only meaningful when abbr is set to no. American will use "centimeters", and Commonwealth—"centimetres". The default value is American.
  • precision is the number of decimal digits in the converted value. The default value is 0 for converted values equal or more than 10 and 1 for converted values of less than 10.
  • wiki specifies whether the names of the units should be wikified or not and can take values of either yes or no. The default value is no.

Capitalization of the parameters is unimportant.

Usage and examples[sunting sumber]

Single value conversion[sunting sumber]

Usage
{{in to cm | num | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{in to cm|1}} → 1 inch (2.5 cm)
Short notation: {{in to cm|1|abbr=yes}} → 1 in (2.5 cm)
Full notation: {{in to cm|num=1|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 1 inch (2.54 centimetres)

Range conversions[sunting sumber]

Usage
{{in to cm | from | to | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{in to cm|10|20|convtype=range}} → Templat:In to cm range
Short notation: {{in to cm|10|20|convtype=range|abbr=yes}} → Templat:In to cm range
Full notation: {{in to cm|from=10|to=20|convtype=range|abbr=no|spell=Commonwealth|precision=1|wiki=yes}} → Templat:In to cm range

Two-dimensional conversions[sunting sumber]

Usage
{{in to cm | l | w | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{in to cm|10|20}} → Templat:In to cm 2D
Short notation: {{in to cm|10|20|abbr=yes}} → Templat:In to cm 2D
Full notation: {{in to cm|l=10|w=20|convtype=dim|abbr=no|spell=Commonwealth|precision=1|wiki=yes}} → Templat:In to cm 2D

Three-dimensional conversions[sunting sumber]

Usage
{{in to cm | l | w | h | convtype | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{in to cm|1|2|3}} → Templat:In to cm 3D
Short notation: {{in to cm|1|2|3|abbr=yes}} → Templat:In to cm 3D
Full notation: {{in to cm|l=1|w=2|h=3|convtype=dim|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → Templat:In to cm 3D

</noinclude>

See also[sunting sumber]