Editing
Template:Nowrap/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
__NOTOC__ The '''[[Template:nowrap]]''' stops wrapping of specific text. 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. 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 }} :::: <nowiki>{{nowrap| [[4-part harmony]]}}</nowiki> For simplicity, the template names {{[[Template:j|'''j''']]}} (join) or {{[[Template:nobr|nobr]]}} or {{[[Template:Nobreak|nobreak]]}} can be used, instead of "nowrap", as quick redirects to {{nowrap}}. === Examples === {| class=wikitable |"They held <nowiki>{{nowrap|10 kg (22 lb)}}</nowiki> in total." <br>May render like this: :They held {{nowrap|10 kg (22 lb)}}<br>in total. <br>Or like this: :They held<br>10 kg (22 lb) in total. <br>But ''not'' render like this: :They held 10 kg (22 <br>lb) in total. | "He encountered <nowiki>{{nowrap|a tiger}}</nowiki> in the woods." <br>May render like this: :He encountered a tiger<br>in the woods. <br>Or like this: :He encountered<br>a tiger in the woods. <br>But ''not'' like this: :He encountered a<br>tiger in the woods. | We saw <nowiki>{{j |1 [[Warp Prism]]}} but {{j|800 [[Probe]]s}}.</nowiki> <br>May render like this: :We saw {{j |1 [[Warp Prism]]}} but<br>800 [[Probe]]s. <br>Or like this: :We saw {{j |1 [[Warp Prism]]}}<br>but 800 [[Probe]]s. <br>But ''not'' render like this: :We saw 1 [[Warp Prism|Warp<br>Prism]] but 800 [[Probe]]s. |} === Handling equal-sign or bar === [[Help:Template|Templates]] have problems to handle parameter data that contains [[equal-sign]]s "<code>=</code>" or vertical bars "<code>|</code>" (pipes). In such cases, consider using {{tl|nowrap begin}} + {{tl|nowrap end}} instead. But there are also workarounds: For text that includes an equal-sign "=", precede the text with <code>1=</code> or use a triple-brace unnamed parameter: <nowiki>{{{|=}}}</nowiki>. For example: :<code><nowiki>{{nowrap|</nowiki>1=2 + 2 = 4}}</code>, or <br /><code><nowiki>{{nowrap|2 + 2 {{{|=}}} 4}}</nowiki></code> which both render as this: :{{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 instance, put two bars "|6|" like this: :<code><nowiki>{{nowrap|</nowiki>&#124;6&#124; < 7}}</code> or <code><nowiki>{{nowrap|{{!}}6{{!}} < 7}}</nowiki></code> Which renders this: :{{nowrap||6| < 7}} === Technical details === The actual code that does the job is this HTML+CSS code: :<code><nowiki><span style="white-space:nowrap">This text will not wrap</span></nowiki></code> Spaces at the beginning or end of the text will fall outside the no-wrap tag in the rendered text due to wiki rendering mechanisms. === See also === * {{tl|nowraplinks}} β Prevents wraps inside links and only allows wraps between the links and in normal text. Very useful for link lists and easy to use. * {{tl|nowrap begin}} β Prevents wraps in both text and links. For the trickier wrapping cases when you need full control, for instance in very complex link lists. * [[Wikipedia:Line break handling]] β The how-to guide detailing how to handle word wraps (line breaks) on Wikipedia. [[Category:Source Wikipedia]]
Summary:
Please note that all contributions to comp.tf may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
comp.tf:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:J
(
edit
)
Template:Nowrap
(
edit
)
Template:Tl
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Refresh
Search
Navigation
Main page
Recent changes
Random page
Help the Wiki!
Info for editors
Editing guidelines
Top contributors
Administration team
comp.tf
Discord
Steam Group
Youtube Channel
Twitter
Competitive TF2
teamfortress.tv
r/truetf2
EssentialsTF
ETF2L
RGL
ozfortress
AsiaFortress
UGC League
Tools
What links here
Related changes
Special pages
Page information