Thực đơn
Bản_mẫu:Val|1=1.234,5678
hoặc |1=1234,5678
, chứ không phải |1=1,234.5678
.Val stands for the number value that is its first parameter. Val specializes in scientific notations and uncertainty notations, and in a measurement value with physical units. It formats the number (with possible unit) according to the Manual of Style and keeps the expression from wrapping across lines.Express a numeral:Express a measurement value with a unit, for example {{val|4|ul=m/s2}}
→ 4 m/s2. The keyboard characters m/s2 are a "unit code" that |u=m/s2
marks up, or that |ul=m/s2
additionally links to its articulation.Because the unit spacing and markup is a style issue, Val provides these for you. There are a large number of unit codes that Val understands and keeps "up to code". A unit code is usually composed of one or more abbreviated unit names and the usual math symbols on the typical keyboard. See {{Val/units}}. Some unit-code flexibility is provided by having four parameters to work the unit-code system: whether to link one or not, (see Overlinking) , and whether to form a ratio or not with a unit code.To bypass the unit code system, if |u=
does not recognize your unit code, it will accept any wikitext and render it as usual.See below for § How to add units to the unit code system. Sometimes a number and unit code is not enough. A prefix or suffix are also available, |p=
and |s=
.See {{val/testcases}} to learn the val parameters by a example. It's comprehensive, and there's over 100 examples.{{val|1234567.1234567}}
→ 12345671234567{{val|.1234}}
→ 1234 (adds the zero){{val|+1234}}
→ +1234 (passes the plus) {{val|-1234}}
→ −1234 (replaces dash with minus){{val|1234}}
→ 1234 (four-digits pure){{val|11|22}}
→ 11±22{{Val|11|(22)}}
→ 11(22){{Val|11|22|33}}
→ 11+22{{Val|11|22|33|e=11}}
→ 11+22{{val|1234567.1234567|fmt=commas}}
→ 12345671234567.{{val|1234|fmt=gaps}}
→ 1234.|ul=
Link the unit.|u=
Don't link the unit. Also accepts wiki markup in lieu of a unit code.{{val|11|ul=m}}
→ 11 m|upl=
Link the per unit.|up=
Don't link the per unit.{{Val|11|ul=J/C|upl=F/m}}
→ 11 (J/C)/(F/m){{Val|11|upl=acre|p=$}}
→ $11/mẫu Anh{{Val|11|ul=km/s|upl=Mpc}}
→ 11 (km/s)/Mpc{{Val|11|ul=kg.m|upl=s-2}}
→ 11 (kg⋅m)/s−2{{Val|11|22|ul=m/s|p=<Prefix>}}
→ <Prefix>11±22 m/s{{Val|11|22|ul=m/s|p=<Prefix> }}
→ <Prefix> 11±22 m/s{{Val|11|22|ul=m/s|s=<Suffix>}}
→ 11±22 m/s<Suffix>{{Val|11|22|ul=m/s|s= <Suffix>}}
→ 11±22 m/s <Suffix>{{val|30|end={{ndash}}50|ul=km}}
→ 30 – 50 km{{val|30|end=–{{gaps|1|234|567}}|ul=km}}
→ 30–1234567 km{{val|1234567|fmt=commas|end={{ndash}}1,234,567|ul=km}}
→ 1234567 – 1,234,567 km{{val|11|ul=m/s|end=<END>}}
→ 11<END> m/s{{val|11|22|ul=m/s|end=<END>}}
→ 11<END>±22 m/s{{val|11|(22)|ul=m/s|end=<End>}}
→ 11<End>(22) m/s{{val|11|22|33|ul=m/s|end=<End>}}
→ 11<End>+22{{val|11|ul=m/s|end=<End>}}
→ 11<End> m/s{{val|11|22|ul=m/s|errend=<Errend>}}
→ 11±22<Errend> m/s.{{val|11|22|33|+errend=<Errend>|-errend=<Errend>}}
→ 11+22<Errend>|fmt=
(see above).A hidden sort key is added to the output for sorting in sortable tables. The sort key is based on the main value (parameter |1=
) and, if used, the exponent for the power of 10 (parameter |e=
) and/or units (parameters |u=
, |ul=
, |up=
and/or |upl=
). Where necessary, units are converted to base SI units for the purpose of the sort key, which is produced by {{ntsh}}. Several units are covered; see § How to add units for those which are not. To omit the sort key use |sortable=off
.{{val|1234567.1234567}}
→ 12345671234567{{val|.1234567}}
→ 1234567{{val|+1234567}}
→ +1234567{{val|-1234567}}
→ −1234567{{val|1.234|0.005}}
→ 1234±0005{{val|1.234|+0.005|-0.006}}
→ 1234+0005{{val|1.234|(5)}}
→ 1234(5){{val|1.234|u=m}}
→ 1234 m{{val|1.234|u=m2}}
→ 1234 m2{{val|1.234|ul=m}}
→ 1234 m{{val|123.4|ul=USgal}}
→ 1234 gal Mỹ{{val|12.34|ul=mpgimp}}
→ 1234 mpg‑Anh{{val|12.34|u=deg}}
→ 1234°{{val|1.234|0.005|u='}}
→ 1234′±0005′{{val|1.234|+0.005|-0.006|u="}}
→ 1234″+0005″{{val|1.234|e=5|ul=m}}
→ 1234×105 m{{val|1.234|0.056|e=7}}
→ (1234±0056)×107{{val|1.23456|+0.00007|-0.00008|e=-9|ul=m/s}}
→ 123456+000007{{val|1.234|0.056|e=7|ul=psi}}
→ (1234±0056)×107 psi{{val|1.234|(5)|e=-2}}
→ 1234(5)×10−2{{val|12.34|p=Δ }}
→ Δ 1234{{val|12.34|u=%|p=≅}}
→ ≅1234%{{val|12.34|0.25|s=%}}
→ 1234±025%{{val|1.234|e=7|ul=W|up=m2}}
→ 1234×107 W/m2Thực đơn
Bản_mẫu:ValLiên quan
Bản Máy Bản mở rộng Bản Mế Bản Motet Bản Mù Bản mạch chủ Bản mẫu Bản danh sách của Schindler Bảng mã IOC Bản quyền thể thao tại Việt NamTài liệu tham khảo
WikiPedia: Bản_mẫu:Val