Template:Val/doc: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>SkyLined →Purpose: Added "nowrap" remark |
meta>Mike Peel m Add sort key to category link |
||
Line 1: | Line 1: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | <includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
==Purpose== | ==Purpose== | ||
Line 26: | Line 25: | ||
:<code><nowiki>{{ScientificValue|1.234|0.05|e=5}}</nowiki></code> -> {{ScientificValue|1.234|0.05|e=5}} | :<code><nowiki>{{ScientificValue|1.234|0.05|e=5}}</nowiki></code> -> {{ScientificValue|1.234|0.05|e=5}} | ||
:<code><nowiki>{{ScientificValue|1.234|+0.05|-0.04|e=-23|u=ms<sup>-1</sup>}}</nowiki></code> -> {{ScientificValue|1.234|+0.05|-0.04|e=-23|u=ms<sup>-1</sup>}} | :<code><nowiki>{{ScientificValue|1.234|+0.05|-0.04|e=-23|u=ms<sup>-1</sup>}}</nowiki></code> -> {{ScientificValue|1.234|+0.05|-0.04|e=-23|u=ms<sup>-1</sup>}} | ||
[[Category:Wikipedia formatting templates|{{PAGENAME}}]] |
Revision as of 19:37, 27 March 2008
Template:Template doc page viewed directly
Purpose
To easily present values in scientific notation, including uncertainty. Wraps entire result in "nowrap" block, so it never gets broken in seperate pieces at the end of a line.
Arguments
- 1 The value
or
- 1 The value
- 2 The uncertainty
or
- 1 The value
- 2 The upper limit of uncertainty
- 3 The lower limit of uncertainty (must be a negative value)
and you can use the following named arguments:
- e The exponent for power of 10.
- u The units for the number.
Examples
{{ScientificValue|1.234}}
-> Template:ScientificValue{{ScientificValue|1.234|e=10|u=m}}
-> Template:ScientificValue{{ScientificValue|1.234|0.005}}
-> Template:ScientificValue{{ScientificValue|1.234|+0.005|-0.001}}
-> Template:ScientificValue{{ScientificValue|1.234|0.05|e=5}}
-> Template:ScientificValue{{ScientificValue|1.234|+0.05|-0.04|e=-23|u=ms<sup>-1</sup>}}
-> Template:ScientificValue