Template:E/doc: Difference between revisions
genesis, port unchanged from Meta-wiki+cat w/{{Meta-wiki} |
m typo fix, my bad |
||
| Line 30: | Line 30: | ||
* {{tl|val}} | * {{tl|val}} | ||
{{Meta-wiki}} | {{Meta-wiki}} | ||
< | <includeonly> | ||
<!-- ADD CATEGORIES BELOW THIS LINE --> | <!-- ADD CATEGORIES BELOW THIS LINE --> | ||
[[Category:Formatting templates|{{PAGENAME}}]] | [[Category:Formatting templates|{{PAGENAME}}]] | ||
{{FAB-todo|[[Category:Mathematics templates|{{PAGENAME}}]]}} | {{FAB-todo|[[Category:Mathematics templates|{{PAGENAME}}]]}} | ||
</includeonly> | </includeonly> | ||
Latest revision as of 23:13, 5 July 2013
|
The {{e}} and {{10^}} templates are intended to facilitate and make uniform scientific notation numbers. The {{10^}} template works exactly as described below except that it does not generate a multiplication (“×”) symbol.
Basic usage
To render 3.14 × 10−12, instead of writing 3.14 × 10<sup>−12</sup> you can write 3.14{{e|-12}}:
Template:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/w gives a×10b [1]
Template:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/w gives 10b [2]
Template:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/wTemplate:Xpd/w gives 10−12 [3]
Delimitation
The template uses the delimitation logic of the {{val}} template. That is, typing 1.2{{e|12341}} will produce a delimited exponent (1.2×1012,341). See #Forcing text display to turn this off.
Text and number recognition
By default, the template recognizes both text and numbers. That is, typing 3.14{{e|-12}} will produce 3.14×10−12, with the proper minus sign (−), rather than with a hyphen (-). However, typing A{{e|-BC}} will produce A×10-BC since BC is not a number. In those cases, you need to write A{{e|−BC}} to produce the correct A×10−BC.
A minus sign also has to be provided for cases like 1.2×101 − 2 (1.2{{e|1 − 2}}).
Explicit plus sign
To explicitly display the + character, write 1.2{{e|4|plus}} which will produce 1.2×10+4.
Forcing text display
To force the template to display the input as text, and forgo the automatic delimitation and the recognition of the hyphen as a minus sign, write 1.2{{e|-42342|text}}, which will display 1.2 × 10-42342 instead of 1.2×10−42,342. This can also be used as an alternative to explicitly display the plus sign (1.2{{e|+4|text}} gives 1.2×10+4), but remember that you also lose delimitation if you do it this way.
See also
- {{val}}
This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.
|
|---|