Difference between revisions of "Template:0/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>DixonDBot
m (Migrating 18 interwiki links, now provided by Wikidata on d:Q5409700)
blackwiki>Magioladitis
m (no interwikis anymore using AWB (9494))
Line 1: Line 1:
{{Bots|deny=JAnDbot}}
 
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<includeonly>{{Interwikitmp-grp|commons=0}}</includeonly>
 
<includeonly>{{Interwikitmp-grp|commons=0}}</includeonly>
 +
 
=== Usage ===
 
=== 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.
 
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.
Line 23: Line 23:
 
{{0|00,0}}24.{{0|00}} km<br />
 
{{0|00,0}}24.{{0|00}} km<br />
 
{{0|00,}}212.5{{0|0}} km<br />
 
{{0|00,}}212.5{{0|0}} km<br />
{{0|0}}3,212.51 km<br />
+
{{0|0}}3,212.51&nbsp;km<br />
{{0|}}16,789.01 km<br />
+
{{0|}}16,789.01&nbsp;km<br />
20,111.05 km<br />
+
20,111.05&nbsp;km<br />
 
|}
 
|}
 
'''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.
Line 33: Line 33:
 
[[Category:Typing-aid templates|{{PAGENAME}}]]
 
[[Category:Typing-aid templates|{{PAGENAME}}]]
 
[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]
 
[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
 
</includeonly>
 
</includeonly>

Revision as of 19:49, 25 September 2013


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

{{0|00,0}}12{{0|.00}} km
{{0|00,0}}24.{{0|00}} km
{{0|00,}}212.5{{0|0}} km
{{0|0}}3,212.51 km
{{0|}}16,789.01 km
20,111.05 km

00,012.00 km
00,024.00 km
00,212.50 km
03,212.51 km
16,789.01 km
20,111.05 km

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.