Difference between revisions of "Template:BScvt/doc"
Jump to navigation
Jump to search
imported>JJMC89 bot m (Replace BSicon(s): BRÜCKE→hSTRae) |
imported>Useddenim (→Examples: RDT → table) |
||
| Line 38: | Line 38: | ||
=== Examples === | === Examples === | ||
| − | { | + | {|class=wikitable |
| − | + | !Result | |
| − | + | !Input | |
| − | + | |- | |
| − | + | |align=right|{{BScvt|0}} | |
| − | + | |<code><nowiki>{{BScvt|0}}</nowiki></code> | |
| − | + | |- | |
| − | + | |align=right|{{BScvt|1.50|x}} | |
| − | + | |<code><nowiki>{{BScvt|1.50|x}}</nowiki></code> | |
| − | + | |- | |
| − | + | |align=right|{{BScvt|16.3|align=left}} | |
| − | + | |<code><nowiki>{{BScvt|16.3|align=left}}</nowiki></code> | |
| − | + | |- | |
| − | + | |align=right|{{BScvt|100.0|alt=italic}} | |
| − | + | |<code><nowiki>{{BScvt|100.0|alt=italic}}</nowiki></code> | |
| + | |- | ||
| + | |align=right|{{BScvt|150|line=-}} | ||
| + | |<code><nowiki>{{BScvt|150|line=-}}</nowiki></code> | ||
| + | |- | ||
| + | |align=right|{{BScvt|56; 12|in=mi; ch}} | ||
| + | |<code><nowiki>{{BScvt|56; 12|in=mi; ch}}</nowiki></code> | ||
| + | |- | ||
| + | |align=right|{{BScvt|125|in=yd}} | ||
| + | |<code><nowiki>{{BScvt|125|in=yd}}</nowiki></code> | ||
| + | |- | ||
| + | |align=right|{{BScvt|150|in=m}} | ||
| + | |<code><nowiki>{{BScvt|150|in=m}}</nowiki></code> | ||
| + | |- | ||
| + | |align=right|{{BScvt|50|in=ch}} | ||
| + | |<code><nowiki>{{BScvt|50|in=ch}}</nowiki></code> | ||
| + | |- | ||
| + | |align=right|{{BScvt|250|in=ch|x}} | ||
| + | |<code><nowiki>{{BScvt|250|in=ch|x}}</nowiki></code> | ||
| + | |} | ||
{{clear}} | {{clear}} | ||
Revision as of 14:06, 18 June 2019
| 40px | This is a documentation subpage for Template:BScvt. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
Contents
Usage
This template displays a distance as two lines of text in a text field of a route diagram created with {{BS-map}}. The template takes the input (in Imperial units) and calculates the metric equivalent.
- Inserting the optional second parameter (any character) reverses the units.
- Decimal values are supported.
- The template automatically adds the units after the values.
The text is right-aligned, but can be changed to left- by applying the parameter "align=left".
The alternate units can be changed to italic by applying the parameter "alt=italic".
A dividing line can be added by applying the parameter “|line=anything ”.
Units
The default units are miles for input and kilometres as output.
- Adding the named parameter
|in=(for input) will allow alternate input units:
in=Units Converts to mi;ch miles; chains kilometres yd yards metres ft feet ch chains m metres yards
- Whitespace for
mi;ch(in both the distance and the units) is allowed but not necessary.
Examples
| Result | Input | ||
|---|---|---|---|
|
{{BScvt|0}}
| ||
|
{{BScvt|1.50|x}}
| ||
|
{{BScvt|16.3|align=left}}
| ||
|
{{BScvt|100.0|alt=italic}}
| ||
|
{{BScvt|150|line=-}}
| ||
|
{{BScvt|56; 12|in=mi; ch}}
| ||
|
{{BScvt|125|in=yd}}
| ||
|
{{BScvt|150|in=m}}
| ||
|
{{BScvt|50|in=ch}}
| ||
|
{{BScvt|250|in=ch|x}}
|
See also
- {{BSsplit}}, for placing two lines of text in a text field.