Template:Convert/LoffAoffDpreunitSoff



The Template:Convert/LoffAoffDpreunitSoff, for "disp=preunit", invokes Template:Convert/ to display the converted result, with the first preunit text from parameter, and the 2nd pre-unit text from parameter (else ), and the unit symbol (if any, else the unit name) for the output unit.

If parameter 4 is a plus sign ("+"), then no space is inserted before the plus sign.


 * Examples
 * {&#123;convert|4|m|ft|disp=preunit|+ }} &rarr; 4 m
 * {&#123;convert|4|m|ft|disp=preunit|+ | or more }} &rarr; 4 m
 * {&#123;convert|9|m|ft|disp=preunit|+ |+ |1}} &rarr; 9 m
 * {&#123;convert|40|kg|lb|disp=preunit|exact | |3}} &rarr; 40 kg
 * {&#123;convert|40|kg|lb|disp=preunit|exact |&amp;#32;|3}} &rarr; 40 kg

Note that leaving parameter 5 as blank will repeat the preunit text from parameter 4, and allow parameter 6 to set the rounding (here 3 decimal digits). To omit the 2nd preunit text, then code parameter 5 as a space character, "&amp;#32;".


 * See also
 * Template:Convert/LoffAoffDxSoff - for "disp=x" with text after units