This site is supported by donations to The OEIS Foundation.

Template:Nowrap

From OeisWiki
Jump to: navigation, search

The {{nowrap}} OEIS Wiki utility template prevents the specified text from wrapping from one line to the next. It prevents word wraps (line breaks) within text or inside a link which contains spaces or hyphens ("-"). The size of the nowrapped text becomes the minimum width of that paragraph. Spaces at the beginning or end of the text will fall outside the nowrap tag in the rendered text due to MediaWiki rendering mechanisms. Before you use this template you might want to read up on Wikipedia:Line break handling.

Usage

  • {{nowrap|these words stay together}}
  • {{nowrap|a, b, c, or d.}}
  • {{nowrap|merry-go-round}}
  • {{nowrap|4-part harmony}}

For convenience, the template names {{nobr}} or {{nobreak}} can be used as redirects to {{nowrap}}.

Examples

They held {{nowrap|10 kg (22 lb)}} in total.        

May render like this:

They held 10 kg (22 lb)
in total.


Or like this:

They held
10 kg (22 lb) in total.


But not render like this:

They held 10 kg (22
lb) in total.

He encountered {{nowrap|a tiger}} in the woods.        

May render like this:

He encountered a tiger
in the woods.


Or like this:

He encountered
a tiger in the woods.


But not like this:

He encountered a
tiger in the woods.

We saw {{nowrap|1 black rhino}} but {{nowrap|800 zebras}}.        

May render like this:

We saw 1 black rhino but
800 zebras.


Or like this:

We saw 1 black rhino
but 800 zebras.


But not render like this:

We saw 1 black
rhino
but 800 zebras.

Handling equal signs or vertical bars (pipes)

Templates have problems with parameter data that contains equal signs "=" or vertical bars "|" (pipes.)

For text that includes an equal sign "=", escape the equal sign with the {{=}} template. For instance

{{nowrap|2 + 2 {{=}} 4}}

renders as

2 + 2 = 4.

For text that includes a vertical bar (pipe) "|", escape the bar with the {{!}} template. For instance

{{nowrap|{{!}}6{{!}} < 7}}

renders as

|6| < 7

For text that includes a double vertical bar (double pipe) "||", escape the double pipe with the {{!!}} template. For instance

{{nowrap|{{!!}}z{{!!}} < 1}}

renders as

||z|| < 1

Code


<span style="white-space: nowrap;">{{{1}}}</span>

See also