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

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>Primefac
m (Protected "Template:Infobox IPA/format numbers": semi-protection of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access]...)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{#switch: {{{format type|}}}
 
{{#switch: {{{format type|}}}
 +
 
| format character =<!--
 
| format character =<!--
 
-->{{#if: {{{a|}}}|&#{{{a|}}};}}{{#if: {{{b|}}}|&#{{{b|}}};}}<!--
 
-->{{#if: {{{a|}}}|&#{{{a|}}};}}{{#if: {{{b|}}}|&#{{{b|}}};}}<!--
-->{{#if: {{{c|}}}|&#{{{c|}}};}}{{#if: {{{d|}}}|&#{{{d|}}};}}
+
-->{{#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 9: Line 10:
 
-->{{#iferror:{{#expr:0{{{c|}}}}}|{{error|decimal3{{=}}{{{c|}}} is not numeric|tag=span}}<br>|}}<!--
 
-->{{#iferror:{{#expr:0{{{c|}}}}}|{{error|decimal3{{=}}{{{c|}}} is not numeric|tag=span}}<br>|}}<!--
 
-->{{#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 =<!--just string them together with zero width space (&#x200B;)
-->{{#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|}}}|&#x200B;&amp;#{{{b|}}};}}{{#if: {{{c|}}}|&#x200B;&amp;#{{{c|}}};}}{{#if: {{{d|}}}|&#x200B;&amp;#{{{d|}}};}}<!--
<!-- Unicode uses &#x2008; (punctuation space) -->
+
-->
 
+
<!-- Using &#x2008; (punctuation space) between Unicode codes -->
| format unicode =<!--  
+
| format unicode =<!--just string them together with small space
-->{{#if: {{{unicode|}}} | {{{unicode|}}} |<!--  
+
-->{{#if: {{{unicode|}}} | {{{unicode|}}} |<!--
  -->{{#if: {{{a|}}}|U+{{padleft:{{hexadecimal|{{{a|}}}|no}}|4|0}}}}<!--  
+
-->{{#if: {{{a|}}}|U+{{padleft:{{hexadecimal|{{{a|}}}|no}}|4|0}}}}<!--
  -->{{#if: {{{b|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{b|}}}|no}}|4|0}}}}<!--  
+
-->{{#if: {{{b|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{b|}}}|no}}|4|0}}}}<!--
  -->{{#if: {{{c|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{c|}}}|no}}|4|0}}}}<!--  
+
-->{{#if: {{{c|}}}|&#x2008;U+{{padleft:{{hexadecimal|{{{c|}}}|no}}|4|0}}}}<!--
  -->{{#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 in input sticking with numbers
 
</noinclude>
 
</noinclude>

Latest revision as of 00:30, 19 January 2018

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