Difference between revisions of "Template:Chembox CalcTemperatures"

From blackwiki
Jump to navigation Jump to search
imported>Mark Arsten
m (Protected Template:Chembox CalcTemperatures: Highly visible template ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
imported>DePiep
(Update Template:Chembox suite templates per WT:Chembox changes c.s.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#if:{{{temp1|}}}<!--
+
{{#invoke:string |replace |source={{{temp_text|}}} |pattern=([%<%>%~])%&%#x20%;$ |replace=%1&nbsp; |plain=false |no_category=true |ignore_errors=true}}<!--
-->|{{#if:{{{temp2|}}}<!-- Range temp input
+
-->{{#switch:{{{temp_unit|}}}
  -->| {{convert|{{{temp1|}}}|{{{range|to}}}|{{{temp2|}}}|{{{unit|}}}|C F K|disp=output only}}<!-- Single temp input
+
|=
  -->| {{convert|{{{temp1|}}}|{{{unit|}}}|C F K|disp=output only}}<!--
+
|C={{convert|{{{temp_C|}}} {{{temp_F|}}}{{{temp_K|}}} |C |F K}}
  -->}}<!--
+
|F|K={{convert|{{{temp_F|}}} {{{temp_K|}}} |{{{temp_unit|}}} |C F K |disp=output only}} }}<!--
-->|{{{defaultvalue|}}}<!-- No temp input, so use the text value
+
Note: this setup triggers a {convert} error when multiple temp inputs (C, F, K)
-->}}<!--
+
-->{{{temp_ref|}}}&#x20;{{{temp_notes|}}}<!--
tracking checks:
+
--><noinclude>{{documentation}}</noinclude>
-->{{#if:{{{track1|}}}|<!--
 
TRACK1: input overload (too many input numbers)
 
-->{{#ifeq:{{{temp1|}}}{{{temp2|}}}|{{{track1|}}}|| [[Category:Chemboxes with conversion issues|{{{trackcatsort|9}}}1]]}} }}<!--
 
 
 
-->{{#if:{{{track1|}}}|<!--
 
TRACK2: uses both number and text input
 
-->{{#if:{{{defaultvalue|}}}| [[Category:Chemboxes with conversion issues|{{{trackcatsort|9}}}2]]}} }}<!--
 
 
 
-->{{#if:{{{track1|}}}|<!--
 
TRACK3: temperature by range (is not an error)
 
-->{{#if:{{{temp2|}}}| [[Category:Chemboxes with conversion issues|R{{{trackcatsort|9}}}]]}} }}<!--
 
--><noinclude>
 
 
 
{{documentation}}
 
</noinclude>
 

Latest revision as of 13:28, 6 February 2015

Template documentation[view] [edit] [history] [purge]

Values for Melting point, Boiling point (properties) and Flash point, Autoignition temperature (hazards) can convert temperatures into the set of °C, °F and K. They also can produce a temperature range, like 10 to 20 °C (50 to 68 °F; 283 to 293 K). Also, unformatted texts can be entered.

Usage

This parameter list:

Four or less parameters are needed to present temperature data:

|MeltingPt=Decomposes when >
|MeltingPtC=50
|MeltingPt_ref=<ref>[www.example.com]</ref>
|MeltingPt_notes=My notes<ref>[www.chemspider.com]</ref>

Decomposes when >_50 °C (122 °F; 323 K)[1]_My notes[2]

The options for conversion:
|MeltingPtC=50
|MeltingPtF=50
|MeltingPtK=50
Temperature range:
|MeltingPtC=50 to 70
|MeltingPtF=50 to 70
|MeltingPtK=50 to 70


50 °C (122 °F; 323 K)
10 °C; 50 °F; 283 K
−223.2 °C; −369.7 °F; 50.0 K

50 to 70 °C (122 to 158 °F; 323 to 343 K)
10 to 21 °C; 50 to 70 °F; 283 to 294 K
−223.2 to −203.2 °C; −369.7 to −333.7 °F; 50.0 to 70.0 K

| Section = {{Chembox Properties
| MeltingPt =
| MeltingPtC =
| MeltingPtF =
| MeltingPtK =
| MeltingPt_ref =
| MeltingPt_notes =

| BoilingPt =
| BoilingPtC =
| BoilingPtF =
| BoilingPtK =
| BoilingPt_ref =
| BoilingPt_notes =
  }}

Template:Pre2

| Section = {{Chembox Hazards
| FlashPt =
| FlashPtC =
| FlashPtF =
| FlashPtK =
| FlashPt_ref =
| FlashPt_notes =

| AutoignitionPt =
| AutoignitionPtC =
| AutoignitionPtF =
| AutoignitionPtK =
| AutoignitionPt_ref =
| AutoignitionPt_notes =
  }}

Template:Pre2

See also

Template:Navbox Chembox