Template:Unit/Doc/Data: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>David Yamakuchi
imported>David Yamakuchi
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Examples of {{Tl|Unit}} displayed on a /Data page ==
== Example of the {{Tl|Unit}} template displayed on a /Data page ==
<pre>Nitrogen BP:[[Nitrogen/Boiling point|{{Round1|{{#expr:{{:Nitrogen/Boiling point}}}}}}]]<br />
Or rather not displayed, as it were.  The {{Tl|Unit}} template truncates the alpha characters from the number on /Data pages so they can be used in <nowiki>{{#expr:}}</nowiki> functions.
Oxygen BP:[[Oxygen/Boiling point|{{Round1|{{:Oxygen/Boiling point}}}}]]<br /></pre>
<pre>{| border="1"
|-
|colspan="2"|<font size=2em>'''Boiling points °C'''</font>
|-
|[[Carbon]]:
| {{:Carbon/Boiling point}}
|-
|[[Nitrogen]]:
| {{:Nitrogen/Boiling point}}
|-
|[[Oxygen]]:
| {{:Oxygen/Boiling point}}
|}</pre>
{| border="1"
|-
|colspan="2"|<font size=2em>'''Boiling points °C'''</font>
|-
|[[Carbon]]:
| {{:Carbon/Boiling point}}
|-
|[[Nitrogen]]:
| {{:Nitrogen/Boiling point}}
|-
|[[Oxygen]]:
| {{:Oxygen/Boiling point}}
|}


Nitrogen BP:[[Nitrogen/Boiling point|{{Round1|{{#expr:{{:Nitrogen/Boiling point}}}}}}]]<br />
<pre><font size=1em>
Oxygen BP:[[Oxygen/Boiling point|{{Round1|{{:Oxygen/Boiling point}}}}]]<br />
{| border="1"
 
|-
<pre>Nitrogen BP:[[Nitrogen/Boiling point|{{#expr:{{:Nitrogen/Boiling point}} round 0}}]]<br />
|colspan="2"|'''Boiling points °C'''
Oxygen BP:[[Oxygen/Boiling point|{{#expr:{{:Oxygen/Boiling point}} round 0}}]]
|-
{{:Oxygen/Boiling point/Unit}}<br /></pre>
|[[Carbon]]:
 
| {{#expr:{{:Carbon/Boiling point}} round 0}}
Nitrogen BP:[[Nitrogen/Boiling point|{{#expr:{{:Nitrogen/Boiling point}} round 0}}]]<br />
|-
Oxygen BP:[[Oxygen/Boiling point|{{#expr:{{:Oxygen/Boiling point}} round 0}}]]
|[[Nitrogen]]:
{{:Oxygen/Boiling point/Unit}}<br />
| {{#expr:{{:Nitrogen/Boiling point}} round 0}}
|-
|[[Oxygen]]:
| {{#expr:{{:Oxygen/Boiling point}} round 0}}
|}</font></pre>
<font size=1em>
{| border="1"
|-
|colspan="2"|'''Boiling points °C'''
|-
|[[Carbon]]:
| {{#expr:{{:Carbon/Boiling point}} round 0}}
|-
|[[Nitrogen]]:
| {{#expr:{{:Nitrogen/Boiling point}} round 0}}
|-
|[[Oxygen]]:
| {{#expr:{{:Oxygen/Boiling point}} round 0}}
|}</font>

Latest revision as of 17:09, 23 June 2008

Example of the {{Unit}} template displayed on a /Data page

Or rather not displayed, as it were. The {{Unit}} template truncates the alpha characters from the number on /Data pages so they can be used in {{#expr:}} functions.

{| border="1"
|-
|colspan="2"|<font size=2em>'''Boiling points °C'''</font>
|-
|[[Carbon]]:
| {{:Carbon/Boiling point}}
|-
|[[Nitrogen]]:
| {{:Nitrogen/Boiling point}}
|-
|[[Oxygen]]:
| {{:Oxygen/Boiling point}}
|}
Boiling points °C
Carbon: 3800 °C


Nitrogen: -195.79 °C
Oxygen: -182.962 °C
<font size=1em>
{| border="1"
|-
|colspan="2"|'''Boiling points °C'''
|-
|[[Carbon]]:
| {{#expr:{{:Carbon/Boiling point}} round 0}}
|-
|[[Nitrogen]]:
| {{#expr:{{:Nitrogen/Boiling point}} round 0}}
|-
|[[Oxygen]]:
| {{#expr:{{:Oxygen/Boiling point}} round 0}}
|}</font>

Boiling points °C
Carbon: Expression error: Unrecognized punctuation character "°".
Nitrogen: Expression error: Unrecognized punctuation character "°".
Oxygen: Expression error: Unrecognized punctuation character "°".