Template:Gaps/doc

Template:Gaps outputs its unnamed arguments in order, applying the  CSS rule to all but the first, so that there will be gaps of 0.25em between the arguments. The whole output has the  rule so that it will not be broken across several lines.

It supports up to twenty unnamed arguments. In addition, it supports the   and   arguments which can be used for numbers in exponential notation. The base will be assumed to be 10 unless otherwise specified; a hyphen-minus "-" in the exponent will be automatically substituted by a minus sign "&minus;". It also supports the arguments   and   for putting left-hand sides and units within the non-breaking span (see examples below).

See TechInfoDepot:Manual of Style (dates and numbers) and TechInfoDepot:Manual of Style (dates and numbers) for information about where to put the gaps in numbers.

Performance impact
Template:Gaps allows up to 20 parameters, and displays the gaps by setting the left-margin space of each group. The gaps are not actual spaces, so a copy/paste of the text is treated as connected, consecutive text. Template:Gaps is coded with minimal wikitext markup, so equivalent hand-coded markup could not be much shorter. Counting the length of the span-tags, there can be 15,800 instances of 2-part {gaps}, or 9,500 uses of 3-part gaps, or 6,800 with 4-part gaps (etc.), per page. The template uses a minimal expansion depth of only 2 levels (of the if-else nesting limit, such as 40 maximum), and if those 2 levels are exceeded, only the first portion will be shown. Although the text, as displayed, is consecutive as on-screen text, {gaps} for a number cannot be used in a calculation because the internal markup contains the invisible &lt;span> tags which would be invalid text in typical numeric processing.