Template:Nowrap/doc: Difference between revisions
Jump to navigation
Jump to search
m (+he) |
(Slight reworking of the documentation and a "see also" link to the new template "nowraplinks".) |
||
Line 1: | Line 1: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | <includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
__NOTOC__ | |||
This template prevents word wraps (line breaks) in text with spaces in. | |||
=== Syntax === | |||
:<code><big><nowiki>{{nowrap|</nowiki>''your text''}}</big></code> | |||
:For text that includes an [[equals sign]] | |||
=== Example === | |||
:<code><nowiki>{{nowrap|34 kg}}</nowiki></code> - Assures that the [[WP:UNITS|unit]] appears on the same line as the number. | |||
=== Handling interpreted characters === | |||
:For text that includes an [[equals sign]] "=", precede the text with <code>1=</code>. For example: | |||
::<code><big><nowiki>{{nowrap|</nowiki>1=2 + 2 = 4}}</big></code> | ::<code><big><nowiki>{{nowrap|</nowiki>1=2 + 2 = 4}}</big></code> | ||
:: | :Which renders: | ||
:For text that includes a [[vertical bar]] | ::{{nowrap|1=2 + 2 = 4}} | ||
:For text that includes a [[vertical bar]] "|", escape the bar(s) with <code><nowiki>&#124;</nowiki></code> or <code><nowiki>{{!}}</nowiki></code>. For example: | |||
::<code><big><nowiki>{{nowrap|</nowiki>&#124;2&#124; < 3}}</big></code> | ::<code><big><nowiki>{{nowrap|</nowiki>&#124;2&#124; < 3}}</big></code> | ||
:: | :Which renders: | ||
::{{nowrap||2| < 3}} | |||
=== See also === | |||
* {{tl|nowraplinks}} - A template with similar purpose. Especially useful for long link lists. | |||
<includeonly> | <includeonly> |
Revision as of 15:23, 19 August 2007
Template:Template doc page viewed directly
This template prevents word wraps (line breaks) in text with spaces in.
Syntax
{{nowrap|your text}}
Example
{{nowrap|34 kg}}
- Assures that the unit appears on the same line as the number.
Handling interpreted characters
- For text that includes an equals sign "=", precede the text with
1=
. For example:{{nowrap|1=2 + 2 = 4}}
- Which renders:
- 2 + 2 = 4
- For text that includes a vertical bar "|", escape the bar(s) with
|
or{{!}}
. For example:{{nowrap||2| < 3}}
- Which renders:
- |2| < 3
See also
- {{nowraplinks}} - A template with similar purpose. Especially useful for long link lists.