编辑“︁
Template:Val/doc
”︁(章节)
跳转到导航
跳转到搜索
这是
Val
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
== Arguments == There are four ways this template can be used: * <code><nowiki>{{</nowiki>val|''number''<nowiki>}}</nowiki></code> - for displaying values without uncertainty/significance. * <code><nowiki>{{</nowiki>val|''number''|''uncertainty''<nowiki>}}</nowiki></code> - for displaying values with uncertainty like so {{val|1234|56}}. * <code><nowiki>{{</nowiki>val|''number''|''upper uncertainty''|''lower uncertainty''<nowiki>}}</nowiki></code> - for displaying values with uncertainty like so {{val|1234|+56|-78}}. * <code><nowiki>{{</nowiki>val|''number''|(''significance'')<nowiki>}}</nowiki></code> - for displaying values with significance like so {{val|1234|(56)}}. They all take roughly the same arguments {| |valign=top| '''1''' || The value (must be a valid number) |- |valign=top| '''2''' || The (upper limit of) uncertainty (must be a valid number) or significance (must be a valid number in parenthesis) |- |valign=top| '''3''' || The lower limit of uncertainty (must be a valid negative number) |- |valign=top| '''e''' || The exponent for the power of 10 (optional). This will show up in the result as " × 10{{su|p=e}}". :Values (arguments '''1'''-'''3''' and '''e''') are run through code copied from {{tl|delimitnum}} for readability, except for argument '''2''' when it is surrounded by parenthesis. '''This currently causes an error for large numbers, numbers that require high precision and numbers that have zeros after the decimal point. This last issue is being addressed, the other issues require changes to the Wikipedia software.''' |- |valign=top| '''u''' / '''ul''' || The units for the number (optional, with/without a link to the page about the unit respectively). |- |valign=top| '''up''' / '''upl''' || The units per for the units (optional, requires '''u''' to be specified, with/without a link to the page about the unit respectively). :Units (specified by '''u''', '''ul''', '''up''' and '''upl''') are replaced by a more aesthetically pleasing HTML representation and get a link ('''ul''' and '''upl''' only, if they are in the list found in {{tl|val/units}} or if they are supported by {{tl|convert}}). You can specify units using just '''u'''; a good example is "ul=m/s", which gets translated to "[[Meter per second|m·s<sup>-1</sup>]]", or you can use '''u''' and '''up''', as in "u/up"; a good examples if "ul=m|up=s", which gets translated to "[[Meter|m]]/s". |- |valign=top| '''p''' || A prefix for the value (such as ∆, ⌀, etc.; optional). |- |valign=top| '''s''' || A suffix for the value (such as %, optional). :Prefixes (specified by '''p''') and suffixes (specified by '''s''') are put in front of or behind the value ''as is'': this includes spaces. They are inside the ''nowrap'' block and will always be on the same line as the value. The parameters that previously provided this functionality ('''h''' for header and '''f''' for footer) are ''deprecated'' and will be ignored. |- |- |valign=top| '''end''' || Appends something after the main value. For example, <nowiki>{{val|123.24|end=...}}</nowiki> gives {{val|123.24|end=...}} |- |valign=top| '''errend''' || Appends something after the uncertainty. For example, <nowiki>{{val|123.23|end=...|2.34|errend=...}}</nowiki> gives {{val|123.23|end=...|2.34|errend=...}} |- |align=top| {{nobr|'''+errend'''}} & {{nobr|'''-errend'''}} || Appends something after the positive/negative uncertainties. For example, <nowiki>{{val|123.23|end=...|+2.34|+errend=...|-1.23|-errend=...}}</nowiki> gives {{val|123.23|end=...|+2.34|+errend=...|-1.23|-errend=...}} |- |valign=top| '''nocategory''' || If set to any value, errors in the use of this template will not cause the page to be added to the [[:Category:Pages with incorrect formatting templates use|Pages with incorrect formatting templates use]] category. This is useful for documentation and test pages that do not need to be fixed. |} See {{tl|val/test}} for a list of examples of the correct output of {{tl|val}} and the errors it may return when incorrectly used.
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息