Template:Spaces/doc View history

(Created doc page)
 
(doc update)
Line 3: Line 3:


== Usage ==
== Usage ==
; Syntax : <code><nowiki>{{spaces|</nowiki>''N''{{!}}''type''}}</code> to produce ''N'' consecutive non-breaking spaces (where ''N'' is a whole number larger than zero) of the type specified by the second parameter: <code>em</code>, <code>en</code>, <code>fig</code>, <code>hair</code>, <code>thin</code>, or if not specified, a non-breaking space (<code>&nbsp;</code>) the same width as a standard space.
Syntax : <code><nowiki>{{spaces|</nowiki>''N''}}</code> to produce ''N'' consecutive non-breaking spaces (where ''N'' is a whole number larger than zero) of a non-breaking space (<code>&nbsp;</code>) the same width as a standard space.
 
<!-- ****************** Not fully implemented *****************
Syntax : <code><nowiki>{{spaces|</nowiki>''N''{{!}}''type''}}</code> to produce ''N'' consecutive non-breaking spaces (where ''N'' is a whole number larger than zero) of the type specified by the second parameter: <code>em</code>, <code>en</code>, <code>fig</code>, <code>hair</code>, <code>thin</code>, or if not specified, a non-breaking space (<code>&nbsp;</code>) the same width as a standard space.


<code><nowiki>{{space|</nowiki>''type''<nowiki>}}</nowiki></code> produces a single non-breaking space of the type indicated.
<code><nowiki>{{space|</nowiki>''type''<nowiki>}}</nowiki></code> produces a single non-breaking space of the type indicated.


<!-- ****************** Not fully implemented *****************
=== Controlling line-breaking in infoboxes ===
=== 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.
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.
**********************************************************-->
**********************************************************-->
== Example ==
This code:
:<code>This sentence needs 5 non-breaking spaces between the last two{{spaces|5}}words.</code>
Produces:
:This sentence needs 5 non-breaking spaces between the last two{{spaces|5}}words.
== Template data ==
== Template data ==
{{TemplateDataHeader}}
{{TemplateDataHeader}}

Revision as of 15:52, 2 June 2017

This is a documentation subpage for Template:Spaces.
It contains usage information, categories and other content that is not part of the original template page.

A template to produce one or more non-breaking spaces (&nbsp; character entities).

Usage

Syntax : {{spaces|N}} to produce N consecutive non-breaking spaces (where N is a whole number larger than zero) of a non-breaking space ( ) the same width as a standard space.

Example

This code:

This sentence needs 5 non-breaking spaces between the last two     words.

Produces:

This sentence needs 5 non-breaking spaces between the last two     words.


Template data

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

Spaces

Inserts one or more non-breaking spaces

Template parameters

ParameterDescriptionTypeStatus
Quantity1

How many non-breaking spaces to insert

Default
1
Numberoptional

See also