Difference between revisions of "Template:0/doc"
(moved lower) |
(figure dash) |
||
Line 28: | Line 28: | ||
'''Note:''' The null template, <code><nowiki>{{0|}}</nowiki></code>, used in the second to last line, produces the same alignment effect as omitting the template entirely. However, the null template can be useful for preserving the alignment within the wikicode. | '''Note:''' The null template, <code><nowiki>{{0|}}</nowiki></code>, used in the second to last line, produces the same alignment effect as omitting the template entirely. However, the null template can be useful for preserving the alignment within the wikicode. | ||
− | Note also [[OpenType]] fonts feature tnum/pnum [[CSS]] {{em|{{code|font-variant-numeric:tabular-nums|css}}}}, {{code|font-variant-numeric:proportional-nums|css}}, {{Unichar|2007|FIGURE SPACE|ulink=General Punctuation|html=numsp|nlink=figure space}}, {{Unichar|2008|PUNCTUATION SPACE|ulink=General Punctuation|html=puncsp|nlink=whitespace character#PSP}} | + | Note also [[OpenType]] fonts feature tnum/pnum [[CSS]] {{em|{{code|font-variant-numeric:tabular-nums|css}}}}, {{code|font-variant-numeric:proportional-nums|css}}, {{Unichar|2007|FIGURE SPACE|ulink=General Punctuation|html=numsp|nlink=figure space}}, {{Unichar|2008|PUNCTUATION SPACE|ulink=General Punctuation|html=puncsp|nlink=whitespace character#PSP}} and {{Unichar|2012|FIGURE DASH|ulink=General Punctuation|html=|nlink=dash#Figure dash}}. |
==TemplateData== | ==TemplateData== |
Revision as of 23:16, 11 June 2020
![]() | This is a documentation subpage for Template:0. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This template inserts an invisible (visibility:hidden and color:transparent) zero (0) character. It is used for padding statistics and other numbers in table columns so that they line up properly.
The invisible zero may in fact be replaced by any other string (which regardless, is made invisible), by specifying the string as the first optional parameter. This is useful to "visually pad out" equivalent length rows in numeric columns in such tables. This is accomplished by inserting extra invisible zeroes, thousands separators, or decimal points prefixing and suffixing the numeric field, (adjusted to pad to the length of the largest numeric value) like in example one.
Examples
Input | Displays as |
---|---|
|
|
Note: The null template, {{0|}}
, used in the second to last line, produces the same alignment effect as omitting the template entirely. However, the null template can be useful for preserving the alignment within the wikicode.
Note also OpenType fonts feature tnum/pnum CSS font-variant-numeric:tabular-nums
, font-variant-numeric:proportional-nums
, Template:Unichar, Template:Unichar and Template:Unichar.
TemplateData
TemplateData for 0
This template inserts an invisible (visibility:hidden and color:transparent) zero (0) character. It is used for padding statistics and other numbers in table columns so that they line up properly. The invisible zero may in fact be replaced by any other string (which regardless, is made invisible), by specifying the string as the first optional parameter. This is useful to "visually pad out" equivalent length rows in numeric columns in such tables. This is accomplished by inserting extra invisible zeroes, thousands separators, or decimal points prefixing and suffixing the numeric field, (adjusted to pad to the length of the largest numeric value).
Parameter | Description | Type | Status | |
---|---|---|---|---|
Hidden string | 1 | no description
| String | optional |