Difference between revisions of "Template:Infobox IPA/format numbers"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>DePiep
Line 1: Line 1:
 
{{#switch: {{{format type|}}}
 
{{#switch: {{{format type|}}}
 
| format character =<!--
 
| format character =<!--
-->{{#if: {{{a|}}}|&#{{{a|}}};}}{{#if: {{{b|}}}|&#{{{b|}}};}}{{#if: {{{c|}}}|&#{{{c|}}};}}{{#if: {{{d|}}}|&#{{{d|}}};}}
+
-->{{#if: {{{a|}}}|&#{{{a|}}};}}{{#if: {{{b|}}}|&#{{{b|}}};}}<!--
 +
-->{{#if: {{{c|}}}|&#{{{c|}}};}}{{#if: {{{d|}}}|&#{{{d|}}};}}
 +
 
 
| format check decimals=<!--
 
| format check decimals=<!--
 
-->{{#iferror:{{#expr:0{{{a|}}}}}|{{error|decimal1{{=}}{{{a|}}} is not numeric|tag=span}}<br>|}}<!--
 
-->{{#iferror:{{#expr:0{{{a|}}}}}|{{error|decimal1{{=}}{{{a|}}} is not numeric|tag=span}}<br>|}}<!--
Line 8: Line 10:
 
-->{{#iferror:{{#expr:0{{{d|}}}}}|{{error|decimal4{{=}}{{{d|}}} is not numeric|tag=span}}|}}
 
-->{{#iferror:{{#expr:0{{{d|}}}}}|{{error|decimal4{{=}}{{{d|}}} is not numeric|tag=span}}|}}
 
<!-- do not use the template {{IPA}} before inputting in IPAsym-->
 
<!-- do not use the template {{IPA}} before inputting in IPAsym-->
 +
 
| format html =<!--  
 
| format html =<!--  
 
-->{{#if: {{{a|}}}|&amp;#{{{a|}}};}}{{#if: {{{b|}}}|{{zwsp}}&amp;#{{{b|}}};}}{{#if: {{{c|}}}|{{zwsp}}&amp;#{{{c|}}};}}{{#if: {{{d|}}}|{{zwsp}}&amp;#{{{d|}}};}}
 
-->{{#if: {{{a|}}}|&amp;#{{{a|}}};}}{{#if: {{{b|}}}|{{zwsp}}&amp;#{{{b|}}};}}{{#if: {{{c|}}}|{{zwsp}}&amp;#{{{c|}}};}}{{#if: {{{d|}}}|{{zwsp}}&amp;#{{{d|}}};}}
<!-- Unicode uses &#x2008; (punctuation space). any input {{{unicode|}}} overrules stringing together numbers (this is different from the switch value, 'format type=format unicode') -->
+
<!-- Unicode uses &#x2008; (punctuation space) -->
 +
 
 
| format unicode =<!--  
 
| format unicode =<!--  
 
-->{{#if: {{{unicode|}}} | {{{unicode|}}} |<!--  
 
-->{{#if: {{{unicode|}}} | {{{unicode|}}} |<!--  
Line 18: Line 22:
 
   -->{{#if: {{{d|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{d|}}}|no}}|4|0}}}}<!--
 
   -->{{#if: {{{d|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{d|}}}|no}}|4|0}}}}<!--
 
-->}}
 
-->}}
 +
 
| #default =<!-- blank-->
 
| #default =<!-- blank-->
 +
 
}}<noinclude>
 
}}<noinclude>
 
Formatting from decimal codes.
 
Formatting from decimal codes.
 
Using named input "a, b, c, d" to prevent spaces sticking with numbers
 
Using named input "a, b, c, d" to prevent spaces sticking with numbers
 
</noinclude>
 
</noinclude>

Revision as of 11:05, 26 January 2011

Formatting from decimal codes. Using named input "a, b, c, d" to prevent spaces sticking with numbers