Template:Nowrap/doc: Difference between revisions

From Official Kodi Wiki
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>
=== Syntax ===
; Example : <tt><nowiki>{{nowrap|34 kg}}</nowiki></tt> -- assures that the [[WP:UNITS|units]] appear on the same line as the number.
 
;Handling interpreted characters
:<code><big><nowiki>{{nowrap|</nowiki>''your text''}}</big></code>
:For text that includes an [[equals sign]] (=), precede the text with <code>1=</code>. For example,
 
=== 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>
::produces {{nowrap|1=2 + 2 = 4}}
:Which renders:
:For text that includes a [[vertical bar]] (|), escape the bar(s) with <code><nowiki>&amp;#124;</nowiki></code> or <code><nowiki>{{!}}</nowiki></code>. For example,
::{{nowrap|1=2 + 2 = 4}}
 
:For text that includes a [[vertical bar]] "|", escape the bar(s) with <code><nowiki>&amp;#124;</nowiki></code> or <code><nowiki>{{!}}</nowiki></code>. For example:
::<code><big><nowiki>{{nowrap|</nowiki>&amp;#124;2&amp;#124; < 3}}</big></code>
::<code><big><nowiki>{{nowrap|</nowiki>&amp;#124;2&amp;#124; < 3}}</big></code>
::produces {{nowrap|&#124;2&#124; < 3}}.
:Which renders:
::{{nowrap|&#124;2&#124; < 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 &#124; or {{!}}. For example:
{{nowrap|&#124;2&#124; < 3}}
Which renders:
|2| < 3

See also

  • {{nowraplinks}} - A template with similar purpose. Especially useful for long link lists.