Difference between revisions of "Template:Spaces"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Import from Wikipedia (CC BY-SA license))
 
m (Import from Wikipedia (CC BY-SA license) (correct pre-LUA version this time))
 
Line 1: Line 1:
<span style="white-space:nowrap;">{{#iferror:{{#expr:{{{1|1}}}}}
+
<includeonly><span style="white-space:nowrap;">{{loop15|{{{1|1}}}|&nbsp;}}</span></includeonly><noinclude>
  |{{#switch:{{{1}}}
 
    |fig=&#8199;
 
    |en=&ensp;
 
    |em=&emsp;
 
    |thin=&thinsp;
 
    |hair=&#8202;
 
    |&nbsp;
 
  }}
 
  |{{#invoke:String|rep|{{#switch:{{{2}}}
 
    |fig=&#8199;
 
    |en=&ensp;
 
    |em=&emsp;
 
    |thin=&thinsp;
 
    |hair=&#8202;
 
    |&nbsp;
 
  }}|{{{1|1}}}}}
 
}}</span><noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 20:32, 31 May 2015

Documentation icon Template documentation[view] [edit] [history] [purge]Pages that link to Template:Spaces

A template to produce multiple non-breaking spaces ("&nbsp;"s).

Syntax 
{{spaces|N}} ...... to produce N consecutive non-breaking spaces (where N is a whole number larger than zero).

{{spaces}} without any parameter produces a single non-breaking space, but, as "spaces" is plural, using &nbsp; itself (or, if this is not possible, {{nbsp}}) is preferred for this purpose.

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Spaces

<templatedata> {

   "description": "Inserts one or more non-breaking spaces",
   "params": {
       "1": {
           "label": "Quantity",
           "description": "How many non-breaking spaces to insert",
           "type": "number",
           "default": "1"
       }
   }

} </templatedata>

See also

  • {{pad}} to add inline spacing in units of px, em or ex.
  • {{nowrap|item}} to stop the linewrapping of any part of item.
  • {{nb5}} to insert five non-breaking spaces.
  • {{indent}} indents by a specified number of spaces (with leading newline)
  • {{in5}} indents by five or a specified number of spaces (with no leading newline)