Difference between revisions of "Template:E/doc"
[unchecked revision] | [unchecked revision] |
(10to template …using wikEd) |
(examples) |
||
Line 4: | Line 4: | ||
The {{Tl|e}} and {{tl|10to}} templates are intended to facilitate and make uniform [[scientific notation]] numbers. The {{tl|10to}} template works exactly as described below except that it does not generate a multiplication (“×”) symbol. | The {{Tl|e}} and {{tl|10to}} templates are intended to facilitate and make uniform [[scientific notation]] numbers. The {{tl|10to}} template works exactly as described below except that it does not generate a multiplication (“×”) symbol. | ||
=== Basic usage === | === Basic usage === | ||
− | To render {{xt|3.14 × 10<sup>−12</sup>}}, instead of writing {{xt|<nowiki>3.14&nbsp;×&nbsp;10<sup>&minus;12</sup></nowiki>}} you can write {{xt|<nowiki>3.14{{e|-12}}</nowiki>}} | + | To render {{xt|3.14 × 10<sup>−12</sup>}}, instead of writing {{xt|<nowiki>3.14&nbsp;×&nbsp;10<sup>&minus;12</sup></nowiki>}} you can write {{xt|<nowiki>3.14{{e|-12}}</nowiki>}}: |
+ | |||
+ | {{xpd5op3c|a|||||e|b}} | ||
+ | |||
+ | {{xpd5op3c|a|||||10to|b}} | ||
=== Delimitation === | === Delimitation === |
Revision as of 07:43, 17 June 2010
The {{e}} and {{10to}} templates are intended to facilitate and make uniform scientific notation numbers. The {{10to}} template works exactly as described below except that it does not generate a multiplication (“×”) symbol.
Contents
Basic usage
To render Template:Xt, instead of writing Template:Xt you can write Template:Xt:
Delimitation
The template uses the delimitation logic of the {{val}} template. That is, typing Template:Xt will produce a delimited exponent (Template:Xt). See #Forcing text display to turn this off.
Text and number recognition
By default, the template recognizes both text and numbers. That is, typing Template:Xt will produce Template:Xt, with the proper minus sign (Template:Xt), rather than with a hyphen (Template:Xt). However, typing Template:Xt will produce Template:Xt since Template:Xt is not a number. In those cases, you need to write Template:Xt to produce the correct Template:Xt.
A minus sign also has to be provided for cases like Template:Xt (Template:Xt).
Explicit plus sign
To explicitly display the Template:Xt character, write Template:Xt which will produce Template:Xt.
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 Template:Xt, which will display Template:Xt instead of Template:Xt. This can also be used as an alternative to explicitly display the plus sign (Template:Xt gives Template:Xt), but remember that you also lose delimitation if you do it this way.
See also
- Template:Tim
- {{val}}
- {{scinote}}