https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Chem_molar_mass/format&feed=atom&action=history
テンプレート:Chem molar mass/format - 版の履歴
2024-03-29T02:32:50Z
このウィキのこのページに関する変更履歴
MediaWiki 1.39.6
https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Chem_molar_mass/format&diff=43942&oldid=prev
WikiSysop: 1版 をインポートしました
2020-07-09T07:11:42Z
<p>1版 をインポートしました</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="ja">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← 古い版</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">2020年7月9日 (木) 16:11時点における版</td>
</tr><tr><td colspan="2" class="diff-notice" lang="ja"><div class="mw-diff-empty">(相違点なし)</div>
</td></tr></table>
WikiSysop
https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Chem_molar_mass/format&diff=43941&oldid=prev
bsd>DMacks: /* top */ {{{value|}}} comes as zero not blank (thanks User:Christian75!)
2020-06-24T04:11:15Z
<p><span dir="auto"><span class="autocomment">top: </span> {{{value|}}} comes as zero not blank (thanks <a href="/w/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Christian75&action=edit&redlink=1" class="new" title="「利用者:Christian75」 (存在しないページ)">User:Christian75</a>!)</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="ja">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← 古い版</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">2020年6月24日 (水) 13:11時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">1行目:</td>
<td colspan="2" class="diff-lineno">1行目:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{#iferror:{{{value|}}}|{{#if:{{{fixed|}}}|{{{fixed|}}}|<sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<del style="font-weight: bold; text-decoration: none;"><i></del>[[Wikipedia:WikiProject Chemicals/Molar mass#Cannot calculate molar mass|<span title="Cannot calculate molar mass from chemical formula <del style="font-weight: bold; text-decoration: none;">(atom counts not all numeric</del>)">cannot calculate</span>]]<del style="font-weight: bold; text-decoration: none;"></i></del>&#93;</sup>}}{{main other|[[Category:Articles with erroneous molar mass calculations]]<del style="font-weight: bold; text-decoration: none;">}}|</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{#if:{{{fixed|}}}|{{#ifexpr:{{{value|}}}>0|[[Category:Chem-molar-mass both hardcoded and calculated]]}}}}</ins>{{#iferror:{{{value|}}}<ins style="font-weight: bold; text-decoration: none;"><!--</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{yesno |{{{sortable|no}}}<!--</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> iferror: true</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">-->|no=<!--</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">--></ins>|{{#if:{{{fixed|}}}|<ins style="font-weight: bold; text-decoration: none;"><!-- error in fixed, return as is: --></ins>{{{fixed|}}}|<ins style="font-weight: bold; text-decoration: none;"><!-- error is in calculation: --></ins><sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<ins style="font-weight: bold; text-decoration: none;">''</ins>[[Wikipedia:WikiProject Chemicals/Molar mass#Cannot calculate molar mass|<span title="Cannot calculate molar mass from chemical formula)">cannot calculate</span>]]<ins style="font-weight: bold; text-decoration: none;">''</ins>&#93;</sup>}}{{main other|[[Category:Articles with erroneous molar mass calculations]]}}<!--</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">-->{{#ifexpr:{{#expr:{{formatnum:{{{value|0}}}|R}}}}>0</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> |{{#if:{{{fixed|}}} |{{{fixed|}}}<!--</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> and categorize for maintenance because two values are entered:</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -->{{main other|{{#if:{{{catname|}}}<!--</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -->|[[{{#invoke:String|replace|source=Category:{{{catname|}}}<!--</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -->|pattern=^Category%:[Cc]ategory%:|replace=Category:|plain=false}}]]}}</del>}}<!--</div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>-->|{{#ifeq:{{{<del style="font-weight: bold; text-decoration: none;">round</del>|<del style="font-weight: bold; text-decoration: none;">x</del>}}}|<del style="font-weight: bold; text-decoration: none;">no</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> iferror:false</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|{{{<del style="font-weight: bold; text-decoration: none;">value</del>|<del style="font-weight: bold; text-decoration: none;">0</del>}}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> prefix: hidden sortkey ntsh</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|{{#invoke:<del style="font-weight: bold; text-decoration: none;">math</del>|<del style="font-weight: bold; text-decoration: none;">precision_format </del>|{{{<del style="font-weight: bold; text-decoration: none;">value</del>|<del style="font-weight: bold; text-decoration: none;">0</del>}}} |{{{<del style="font-weight: bold; text-decoration: none;">round</del>|<del style="font-weight: bold; text-decoration: none;">2</del>}}} }}<del style="font-weight: bold; text-decoration: none;">}}<!--</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> buggy: this way, sorted is the non-rounded value...</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">-->&nbsp;</del>{{<del style="font-weight: bold; text-decoration: none;">#if:</del>{<del style="font-weight: bold; text-decoration: none;">{{unit</del>|}}<del style="font-weight: bold; text-decoration: none;">} |{{{unit|</del>}}} |<del style="font-weight: bold; text-decoration: none;">g·mol<sup>−1</del></<del style="font-weight: bold; text-decoration: none;">sup</del>><del style="font-weight: bold; text-decoration: none;">}}</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>-->|{{#ifeq:{{{<ins style="font-weight: bold; text-decoration: none;">sortable</ins>|<ins style="font-weight: bold; text-decoration: none;">no</ins>}}}|<ins style="font-weight: bold; text-decoration: none;">yes|{{ntsh</ins>|<ins style="font-weight: bold; text-decoration: none;">1=</ins>{{<ins style="font-weight: bold; text-decoration: none;">#if:</ins>{<ins style="font-weight: bold; text-decoration: none;">{{fixed</ins>|}}}|{{#invoke:<ins style="font-weight: bold; text-decoration: none;">String</ins>|<ins style="font-weight: bold; text-decoration: none;">match</ins>|<ins style="font-weight: bold; text-decoration: none;">s=</ins>{{{<ins style="font-weight: bold; text-decoration: none;">fixed</ins>|}}} |<ins style="font-weight: bold; text-decoration: none;">pattern=^[%d%.%-%−]+ |plain=false |nomatch=</ins>{{{<ins style="font-weight: bold; text-decoration: none;">fixed</ins>|<ins style="font-weight: bold; text-decoration: none;">0</ins>}}}}} <ins style="font-weight: bold; text-decoration: none;">|</ins>{{{<ins style="font-weight: bold; text-decoration: none;">value</ins>|<ins style="font-weight: bold; text-decoration: none;">0</ins>}}} }} |<ins style="font-weight: bold; text-decoration: none;">debug=no</ins><<ins style="font-weight: bold; text-decoration: none;">!-- set to =yes to test</ins>/<ins style="font-weight: bold; text-decoration: none;">show the hidden key --</ins>>}} }}<!--</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">}}</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> round the value:</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> |{{{fixed|}</del>}} }}<!--</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> parameter round can be: yes, no, smart, number.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> rounding number cannot be greater than smart (=smart number of decimals), so use min(,).</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">--></del>|<del style="font-weight: bold; text-decoration: none;">yes=<!--</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> smart number cannot be empty, but is covered with "</ins>|<ins style="font-weight: bold; text-decoration: none;">2" here</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> --><del style="font-weight: bold; text-decoration: none;">{{ntsh|1=</del>{{#if:{{{fixed|}}} |<del style="font-weight: bold; text-decoration: none;">{{#invoke:String|match|s=</del>{{{fixed|}}} |<del style="font-weight: bold; text-decoration: none;">pattern=^[%d%.%-%−]+ |plain=false |nomatch=</del>{{<del style="font-weight: bold; text-decoration: none;">{fixed|0}}} }} |</del>{{{value|0}}}<!--</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> -->{{#if:{{{fixed|}}}|{{{fixed|}}}|</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> -->|debug=</del>no<del style="font-weight: bold; text-decoration: none;">}} }}<!-- in a sandbox</del>, <del style="font-weight: bold; text-decoration: none;">set debug=yes to show the hidden sortkey number.</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{<ins style="font-weight: bold; text-decoration: none;">#ifexpr:</ins>{{{value|0}}}<ins style="font-weight: bold; text-decoration: none;">=0|</ins><!-- no <ins style="font-weight: bold; text-decoration: none;">input</ins>, <ins style="font-weight: bold; text-decoration: none;">no value output </ins>--><ins style="font-weight: bold; text-decoration: none;">|</ins>{{<ins style="font-weight: bold; text-decoration: none;">val|</ins>{{#<ins style="font-weight: bold; text-decoration: none;">invoke</ins>:<ins style="font-weight: bold; text-decoration: none;">math|precision_format |</ins>{{{value|0}}} </div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>-->{{<del style="font-weight: bold; text-decoration: none;">#ifexpr:</del>{{#<del style="font-weight: bold; text-decoration: none;">expr:{{formatnum</del>:{{{value|0}}}<del style="font-weight: bold; text-decoration: none;">|R}}}}>0</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>|{{#<ins style="font-weight: bold; text-decoration: none;">switch</ins>:{{{<ins style="font-weight: bold; text-decoration: none;">round</ins>|<ins style="font-weight: bold; text-decoration: none;">smart</ins>}}}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del>|{{#<del style="font-weight: bold; text-decoration: none;">if</del>:{{{<del style="font-weight: bold; text-decoration: none;">fixed</del>|}}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> |yes={{min|2</ins>|{{{<ins style="font-weight: bold; text-decoration: none;">smart_round</ins>|<ins style="font-weight: bold; text-decoration: none;">2}}</ins>}}}<!-- <ins style="font-weight: bold; text-decoration: none;">min(2, smart) </ins>--></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del>|{{{<del style="font-weight: bold; text-decoration: none;">fixed</del>|}}}<!--</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>|<ins style="font-weight: bold; text-decoration: none;">no=</ins>{{{<ins style="font-weight: bold; text-decoration: none;">smart_round</ins>|<ins style="font-weight: bold; text-decoration: none;">2</ins>}}}<ins style="font-weight: bold; text-decoration: none;"><!-- smart --></ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del>-->|{{<del style="font-weight: bold; text-decoration: none;">#ifeq:</del>{<del style="font-weight: bold; text-decoration: none;">{{round</del>|<del style="font-weight: bold; text-decoration: none;">x</del>}}}|<del style="font-weight: bold; text-decoration: none;">no</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> |</ins>|<ins style="font-weight: bold; text-decoration: none;">default</ins>|<ins style="font-weight: bold; text-decoration: none;">smart=</ins>{{{<ins style="font-weight: bold; text-decoration: none;">smart_round</ins>|<ins style="font-weight: bold; text-decoration: none;">2</ins>}}}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|{{{<del style="font-weight: bold; text-decoration: none;">value</del>|<del style="font-weight: bold; text-decoration: none;">0</del>}}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>|<ins style="font-weight: bold; text-decoration: none;">#default=</ins>{{<ins style="font-weight: bold; text-decoration: none;">min</ins>|{{{<ins style="font-weight: bold; text-decoration: none;">round</ins>|0}}}|{{{<ins style="font-weight: bold; text-decoration: none;">smart_round</ins>|2}}}}}<!-- <ins style="font-weight: bold; text-decoration: none;">when number; min(number, smart) </ins>--><ins style="font-weight: bold; text-decoration: none;">}}</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|{{<del style="font-weight: bold; text-decoration: none;">#invoke:math|precision_format </del>|{{{<del style="font-weight: bold; text-decoration: none;">value</del>|0}}} |{{{<del style="font-weight: bold; text-decoration: none;">round</del>|2}}<del style="font-weight: bold; text-decoration: none;">} }}</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">}} </ins>}} }} }}<!--</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">}} }}</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> |{{{fixed|</del>}}}<!--</div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>-->}} }} }}<!--</div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> iferror: close</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">-->}}<!--</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> suffix: if sort=no then add unit</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">-->{{#ifexpr:{{{value|0}}}=0||{{#ifeq:|{{{sortable|unk}}}|no|&nbsp;{{#if:{{{unit|}}} |{{{unit|}}}|g·mol<sup>−1</sup>}}}}}}<!--</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> suffixes, will always show:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> suffixes, will always show:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-->{{{ref|}}}{{#if:{{{comment|}}}|&#x20;{{{comment|}}}}}<!--</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-->{{{ref|}}}{{#if:{{{comment|}}}|&#x20;{{{comment|}}}}}<!--</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">--><noinclude></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">{{documentation|1=Template:Chem molar mass/doc}}</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div></noinclude></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">-xxx-> <small>(debug:smart_round={{{smart_round|(blank)}}})</small><!--</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">--><noinclude>{{documentation|1=Template:Chem molar mass/doc}}</ins></noinclude></div></td></tr>
</table>
bsd>DMacks
https://bsd.neuroinf.jp/w/index.php?title=%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88:Chem_molar_mass/format&diff=31097&oldid=prev
WikiSysop: 1版
2015-08-05T10:16:06Z
<p>1版</p>
<p><b>新規ページ</b></p><div>{{#iferror:{{{value|}}}|{{#if:{{{fixed|}}}|{{{fixed|}}}|<sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<i>[[Wikipedia:WikiProject Chemicals/Molar mass#Cannot calculate molar mass|<span title="Cannot calculate molar mass from chemical formula (atom counts not all numeric)">cannot calculate</span>]]</i>&#93;</sup>}}{{main other|[[Category:Articles with erroneous molar mass calculations]]}}|<br />
{{yesno |{{{sortable|no}}}<!--<br />
-->|no=<!--<br />
-->{{#ifexpr:{{#expr:{{formatnum:{{{value|0}}}|R}}}}>0<br />
|{{#if:{{{fixed|}}} |{{{fixed|}}}<!--<br />
and categorize for maintenance because two values are entered:<br />
-->{{main other|{{#if:{{{catname|}}}<!--<br />
-->|[[{{#invoke:String|replace|source=Category:{{{catname|}}}<!--<br />
-->|pattern=^Category%:[Cc]ategory%:|replace=Category:|plain=false}}]]}}}}<!--<br />
<br />
-->|{{#ifeq:{{{round|x}}}|no<br />
|{{{value|0}}}<br />
|{{#invoke:math|precision_format |{{{value|0}}} |{{{round|2}}} }}}}<!--<br />
-->&nbsp;{{#if:{{{unit|}}} |{{{unit|}}} |g·mol<sup>−1</sup>}}<br />
}}<br />
|{{{fixed|}}} }}<!--<br />
<br />
-->|yes=<!--<br />
-->{{ntsh|1={{#if:{{{fixed|}}} |{{#invoke:String|match|s={{{fixed|}}} |pattern=^[%d%.%-%−]+ |plain=false |nomatch={{{fixed|0}}} }} |{{{value|0}}}<!--<br />
-->|debug=no}} }}<!-- in a sandbox, set debug=yes to show the hidden sortkey number.<br />
-->{{#ifexpr:{{#expr:{{formatnum:{{{value|0}}}|R}}}}>0<br />
|{{#if:{{{fixed|}}}<br />
|{{{fixed|}}}<!--<br />
-->|{{#ifeq:{{{round|x}}}|no<br />
|{{{value|0}}}<br />
|{{#invoke:math|precision_format |{{{value|0}}} |{{{round|2}}} }}<br />
}} }}<br />
|{{{fixed|}}}<!--<br />
-->}} }} }}<!--<br />
<br />
suffixes, will always show:<br />
-->{{{ref|}}}{{#if:{{{comment|}}}|&#x20;{{{comment|}}}}}<!--<br />
--><noinclude><br />
{{documentation|1=Template:Chem molar mass/doc}}<br />
<br />
</noinclude></div>
WikiSysop