https://heald.nga.gov/mediawiki/index.php?title=Template:In5/doc&feed=atom&action=historyTemplate:In5/doc - Revision history2024-03-28T13:34:26ZRevision history for this page on the wikiMediaWiki 1.35.2https://heald.nga.gov/mediawiki/index.php?title=Template:In5/doc&diff=1383&oldid=prevEmily Pugh: 1 revision2012-04-18T18:05:24Z<p>1 revision</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:05, April 18, 2012</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Emily Pughhttps://heald.nga.gov/mediawiki/index.php?title=Template:In5/doc&diff=1382&oldid=prev187.124.252.137 at 20:10, December 15, 20112011-12-15T20:10:51Z<p></p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --><br />
<br />
The indenter '''Template:in5''' indents text by 5 spaces or<br />
the count specified by<br>parameter 1 (range: 1 to 50 spaces).<br />
<br><br><br />
:: Usage: &nbsp; {<font/>{in5}} {{in5}} <--indents by 5 spaces<br><br />
:: Usage: &nbsp; {<font/>{in5|8}} &nbsp; &nbsp; <--indents by 8 spaces<br><br />
:: Usage: &nbsp; {<font/>{in5|47}} &nbsp;&nbsp;<--indents by 47<br />
<br />
Spaces outside the double braces will add an extra space on either<br />
side,<br>such as the 12 spaces inserted by: " {<font/>{in5|10}} ".<br />
<br />
NOTE: The name "in5" was chosen because other names were debated, such as<br> the name "in" being redefined as 6 different uses.<br />
<br />
==Examples==<br />
The following are examples showing larger amounts of spacing:<br />
:: Example 1: <nowiki>xx{{in5|10}}yy{{in5|10}}</nowiki>zz, produces: xx{{in5|10}}yy{{in5|10}}zz<br />
:: Example 2: <nowiki>xx{{in5|10}}yy{{in5|15}}</nowiki>zz, produces: xx{{in5|10}}yy{{in5|15}}zz<br />
:: Example 3: <nowiki>aa{{in5|20}}bb{{in5|20}}</nowiki>cc, produces: aa{{in5|20}}bb{{in5|20}}cc<br />
:: Example 4: <nowiki>"32.0{{in5|7}}"</nowiki>&nbsp; produces: "32.0{{in5|7}}"<br />
The example 4 shows the ability to put trailing spaces, such as spaces after a number in a wikitable column (coded as: |&nbsp;32.0{<font/>{in5}}&nbsp;). Typical numbers (with "align=right"), in a table column, often appear crowded at the right-hand side, so appending "{<font/>{in5}}" can improve readability, in tables with lines between columns.<br />
<br />
==Universal template==<br />
This Template:in5 is intended as a universal template, with the same name on all Wikipedia sites. The name "in5" with the digit "5" is unlikely to conflict with other-language Wikipedias. Care must be taken not to name a universal template with a name that would be an awkward or peculiar word in the other languages. However, in some cases, a universal template might need a different name in a few conflicting languages.<br />
<br />
==Comparison with Template:spaces==<br />
There are other templates that insert spaces, although none had allowed 50 spaces. For example, the&nbsp;[[Template:spaces]] has had a limit of about 15 spaces (during 2009-2010):<br />
{| class=wikitable style="margin-left:40px"<br />
| valign=top | Example of <nowiki>{{spaces|10}}</nowiki><br>and...<br>with <nowiki>{{spaces|14}}</nowiki><br>with <nowiki>{{spaces|15}}</nowiki><br>with <nowiki>{{spaces|25}}</nowiki> || <nowiki>xx{{spaces|10}}</nowiki>yy, produces:<br>xx{{spaces|10}}yy<br>xx{{spaces|14}}yy<br>xx{{spaces|15}}yy<br>xx{{spaces|25}}yy<br />
|-<br />
| valign=top | Example of <nowiki>{{in5|10}}</nowiki><br>and...<br>with <nowiki>{{in5|14}}</nowiki><br>with <nowiki>{{in5|15}}</nowiki><br>with <nowiki>{{in5|25}}</nowiki><br>with <nowiki>{{in5|45}}</nowiki> || <nowiki>xx{{in5|10}}</nowiki>yy, produces:<br>xx{{in5|10}}yy<br>xx{{in5|14}}yy<br>xx{{in5|15}}yy<br>xx{{in5|25}}yy<br>xx{{in5|45}}yy<br />
|}<br />
Again, using {<font/>{in5}} reliably allows up to 50 spaces at a time.<br />
<br />
==Performance==<br />
Template {in5} generates a mix of &amp;nbsp; and spaces to avoid the space compression done by the [[MediaWiki]] parser. Each &nbsp is stored inside the formatted page (such as seen by the browser option: &lt;View>&lt;Source>). The output is optimized to be the shortest possible markup language for spaces, in a variety of different browsers.<br />
<br />
Typically, {in5} runs much faster than [[Template:spaces]], generating 1/3 the markup per use (as 72% less text, over 50 fewer characters each time). Also, {in5} allows 50 spaces, whereas {spaces} has been limited to 15 spaces during 2009-2010.<br />
<br />
==See also==<br />
* [[Template:indent]] - forces newline break before indenting<br />
<br />
<br />
<includeonly><br />
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --><br />
[[Category:Wikipedia formatting and function templates|In5]]<br />
[[pt:Predefinição:In5]]<br />
[[sl:Predloga:In5]]<br />
[[vi:Bản mẫu:In5]]<br />
</includeonly></div>187.124.252.137