Template:Spaces/doc: Difference between revisions
imported>Fire No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
<!-- EDIT TEMPLATE DOCUMENTATION AFTER THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION AFTER THIS LINE --> | ||
{{Template shortcut| |nbs|nbsp|nbsp;|space|spcs}} | {{Template shortcut| |nbs|nbsp|nbsp;|space|spcs}} | ||
{{二次利用}} | {{二次利用}} | ||
{{stack|{{Lua|Module:String}}}}<!--wider box than {{Template shortcut}}--> | {{stack|{{Lua|Module:String}}}}<!--wider box than {{Template shortcut}}--> | ||
A template to produce one or more [[Wikipedia:non-breaking space|non-breaking space]]s (<code>&nbsp;</code> character entities). | A template to produce one or more [[Wikipedia:non-breaking space|non-breaking space]]s (<code>&nbsp;</code> character entities). | ||
== Usage == | == Usage == | ||
=== Syntax === | === 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 (<syntaxhighlight inline lang=xml> </syntaxhighlight>) 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>{{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 (<syntaxhighlight inline lang=xml> </syntaxhighlight>) 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>. |