Changes
Jump to navigation
Jump to search
m
all pages = yes
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION AFTER THIS LINE -->
{{COinS safe|n}}
{{high-risk| approximately 1860000 |all-pages = yes }}
{{Template shortcut | |nbs|nbsp|nbsp;|space|spcs}}
{{stack|{{Lua|Module:String}}}}<!--wider box than {{Template shortcut}}-->
A template to produce one or more [[non-breaking space]]s (<code>&nbsp;</code> character entities).
== Usage ==
=== Syntax ===
{{larger|<code><nowiki>{{spaces|</nowiki>''N''{{!}}''type''<nowiki>}}</nowiki></code>}} produces ''N'' consecutive non-breaking spaces (where ''N'' is a [[Integer|whole number]] larger than zero) of the type specified by the second parameter (which are ordered by decreasing space width): <code>em</code>, <code>fig</code>, <code>en</code>, <code>thin</code>, <code>hair</code>. If type is not specified, ''N'' non-breaking spaces (<source inline lang=xml> </source>) are produced. A non-breaking space has the same width as a standard space, whose width is between the width of <code>en</code> and <code>thin</code>.
{{larger|<code><nowiki>{{space|</nowiki>''type''<nowiki>}}</nowiki></code>}} produces a single non-breaking space of the type indicated.
=== Controlling line-breaking in infoboxes ===
This template, usually as its alias {{tlx|nbsp}}, may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details.
== Template data ==
{{TemplateData header}}
<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 ==
* {{tl|pad}} to add inline spacing in units of px, em or ex
* {{tl|0}} to add invisible characters
* {{tlg|nowrap|item|italic=on}} to stop the linewrapping of any part of {{var|item}}
* {{tl|nb5}} to insert five non-breaking spaces
* {{tl|indent}} indents by a specified number of spaces (with leading newline)
* {{tl|in5}} indents by five or a specified number of spaces (with no leading newline)
* {{tl|block indent}}, to indent an entire block of content, similar to a [[Template:Quote|block quotation]] (uses {{tag|div|o}} and CSS margins)
* {{tl|sp}}, to add regular, breaking space
{{Inline spacing templates}}
<includeonly>{{Sandbox other | |
[[Category:Inline spacing templates]]
[[Category:Character templates]]
}}</includeonly>
<!-- EDIT TEMPLATE DOCUMENTATION AFTER THIS LINE -->
{{COinS safe|n}}
{{high-risk| approximately 1860000 |all-pages = yes }}
{{Template shortcut | |nbs|nbsp|nbsp;|space|spcs}}
{{stack|{{Lua|Module:String}}}}<!--wider box than {{Template shortcut}}-->
A template to produce one or more [[non-breaking space]]s (<code>&nbsp;</code> character entities).
== Usage ==
=== Syntax ===
{{larger|<code><nowiki>{{spaces|</nowiki>''N''{{!}}''type''<nowiki>}}</nowiki></code>}} produces ''N'' consecutive non-breaking spaces (where ''N'' is a [[Integer|whole number]] larger than zero) of the type specified by the second parameter (which are ordered by decreasing space width): <code>em</code>, <code>fig</code>, <code>en</code>, <code>thin</code>, <code>hair</code>. If type is not specified, ''N'' non-breaking spaces (<source inline lang=xml> </source>) are produced. A non-breaking space has the same width as a standard space, whose width is between the width of <code>en</code> and <code>thin</code>.
{{larger|<code><nowiki>{{space|</nowiki>''type''<nowiki>}}</nowiki></code>}} produces a single non-breaking space of the type indicated.
=== Controlling line-breaking in infoboxes ===
This template, usually as its alias {{tlx|nbsp}}, may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See [[Template:Wbr/doc#Controlling line-breaking in infoboxes]] for details.
== Template data ==
{{TemplateData header}}
<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 ==
* {{tl|pad}} to add inline spacing in units of px, em or ex
* {{tl|0}} to add invisible characters
* {{tlg|nowrap|item|italic=on}} to stop the linewrapping of any part of {{var|item}}
* {{tl|nb5}} to insert five non-breaking spaces
* {{tl|indent}} indents by a specified number of spaces (with leading newline)
* {{tl|in5}} indents by five or a specified number of spaces (with no leading newline)
* {{tl|block indent}}, to indent an entire block of content, similar to a [[Template:Quote|block quotation]] (uses {{tag|div|o}} and CSS margins)
* {{tl|sp}}, to add regular, breaking space
{{Inline spacing templates}}
<includeonly>{{Sandbox other | |
[[Category:Inline spacing templates]]
[[Category:Character templates]]
}}</includeonly>