Template:Nb/doc

From MozillaWiki
< Template:Nb
Revision as of 12:46, 10 January 2015 by Lakrits (talk | contribs) (Created page with "{{Documentation subpage}} __NOTOC__ ==Usage== {{tlf|'''nb'''}} inserts up to 10 consecutive non-breaking spaces at the position where the template is placed. The default, and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Edit-copy green.svg
This is a documentation subpage for Template:Nb.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{nb}} inserts up to 10 consecutive non-breaking spaces at the position where the template is placed.

The default, and intended action is to insert a single non-breaking space.

Parameters

There is only 1 parameter, which is unnamed and optional.

Syntax

The template's syntax is

  • {{nb|number value }}

To insert a single non-breaking space, you don't need to enter any parameter. Just type

  • {{nb}}

Optional parameter

1

Number of inserted spaces

You can insert up to 10 characters by entering a number value (from 2 to 10) as the first parameter. This parameter is unnamed, so no parameter name has to be included.

Note
  • If the given value is invalid, the template will an error message.
Usage
  • {{nb|1}}

Correct use

Case What you type What you see Comments
No parameter Separate{{nb}}words Separate words Inserts a non-breaking space
Parameter |1 Even{{nb|2}}more{{nb|5}}separate{{nb|9}}words Even  more     separate         words

Incorrect use

Case What you type What you see (error message)
Value for |1 < 1 Separate{{nb|0}}words SeparateError in {{nbsp}}: number of spaces can't be 0 or negative, minimum is 1.words
Value for |1 > 10 Separate{{nb|11}}words SeparateError in {{nbsp}}: too many spaces, maximum is 10.words

See also

  • {{sp}}: Inserts a single, regular space character. For use in templates, parser functions, and tables.
  • {{space}}: Inserts any one of a number of different space characters.