Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
Template:Nowrap begin/doc
From Guild of Archivists
Namespaces
Template
Discussion
More
More
Page actions
Read
Edit source
History
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!
Advanced
Special characters
Help
Heading
Level 2
Level 3
Level 4
Level 5
Format
Insert
Latin
Latin extended
IPA
Symbols
Greek
Greek extended
Cyrillic
Arabic
Arabic extended
Hebrew
Bangla
Tamil
Telugu
Sinhala
Devanagari
Gujarati
Thai
Lao
Khmer
Canadian Aboriginal
Runes
Á
á
À
à
Â
â
Ä
ä
Ã
ã
Ǎ
ǎ
Ā
ā
Ă
ă
Ą
ą
Å
å
Ć
ć
Ĉ
ĉ
Ç
ç
Č
č
Ċ
ċ
Đ
đ
Ď
ď
É
é
È
è
Ê
ê
Ë
ë
Ě
ě
Ē
ē
Ĕ
ĕ
Ė
ė
Ę
ę
Ĝ
ĝ
Ģ
ģ
Ğ
ğ
Ġ
ġ
Ĥ
ĥ
Ħ
ħ
Í
í
Ì
ì
Î
î
Ï
ï
Ĩ
ĩ
Ǐ
ǐ
Ī
ī
Ĭ
ĭ
İ
ı
Į
į
Ĵ
ĵ
Ķ
ķ
Ĺ
ĺ
Ļ
ļ
Ľ
ľ
Ł
ł
Ń
ń
Ñ
ñ
Ņ
ņ
Ň
ň
Ó
ó
Ò
ò
Ô
ô
Ö
ö
Õ
õ
Ǒ
ǒ
Ō
ō
Ŏ
ŏ
Ǫ
ǫ
Ő
ő
Ŕ
ŕ
Ŗ
ŗ
Ř
ř
Ś
ś
Ŝ
ŝ
Ş
ş
Š
š
Ș
ș
Ț
ț
Ť
ť
Ú
ú
Ù
ù
Û
û
Ü
ü
Ũ
ũ
Ů
ů
Ǔ
ǔ
Ū
ū
ǖ
ǘ
ǚ
ǜ
Ŭ
ŭ
Ų
ų
Ű
ű
Ŵ
ŵ
Ý
ý
Ŷ
ŷ
Ÿ
ÿ
Ȳ
ȳ
Ź
ź
Ž
ž
Ż
ż
Æ
æ
Ǣ
ǣ
Ø
ø
Œ
œ
ß
Ð
ð
Þ
þ
Ə
ə
Formatting
Links
Headings
Lists
Files
References
Discussion
Description
What you type
What you get
Italic
''Italic text''
Italic text
Bold
'''Bold text'''
Bold text
Bold & italic
'''''Bold & italic text'''''
Bold & italic text
{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES WHERE INDICATED THE BOTTOM OF THIS PAGE --> This is the {{tl|nowrap begin}} template. This template prevents word wraps (line breaks) in text and links with spaces in. It is designed to handle the really tricky wrapping cases where you need full control. It works similarly to {{tl|nowrap}} and {{tl|nowraplinks}}. This template takes no parameters; instead, it works in tandem with {{tl|nowrap end}}. {{Ambox |text='''Note:''' The use of these templates in {{tl|Navbox}} and similar templates is deprecated; see [[Template:Navbox/doc#See also]]. Use the '''"hlist" class''' and, when occasionally necessary, {{tl|allow wrap}}. The nowrap behaviour implemented by the {{tc|nowrap}} set has been made ambient, while hlist provides a more appropriate structure and improved accessibility.}} ===Helper templates=== This template has a number of helper templates which allows you to tell the web browser exactly where line breaks may occur: '''Note:''' These helper templates may only be used in sections surrounded by {{tl|nowrap begin}} and {{tl|nowrap end}} or they may cause weird behaviour of your page. * {{tl|wrap}}{{spaced ndash}}Marks where a wrap may occur. ===Usage=== <pre><nowiki> {{nowrap begin}} [[Atrus]] and{{wrap}} [[Catherine]] and{{wrap}} [[Sirrus]] and{{wrap}} [[Achenar]].{{wrap}} [[Atrus]] and{{wrap}} [[Catherine]] and{{wrap}} [[Sirrus]] and{{wrap}} [[Achenar]]. {{nowrap end}} </nowiki></pre> It will render something like this: :[[Atrus]] and [[Catherine]] and [[Sirrus]] and :[[Achenar]]. [[Atrus]] and [[Catherine]] and :[[Sirrus]] and [[Achenar]]. But it will ''not'' render like this: :[[Atrus]] and [[Catherine]] and [[Sirrus]] :and [[Achenar]]. [[Atrus]] and [[Catherine]] :and [[Sirrus]] and [[Achenar]]. To make your code readable and easy to edit, you can put each wrappable "line" on its own line. And let's use some dots too. Like this: <pre><nowiki> {{nowrap begin}} [[Atrus]] and [[Catherine]]{{·}}{{wrap}} [[Catherine]] and [[Sirrus]]{{·}}{{wrap}} [[Sirrus]] and [[Achenar]]{{·}}{{wrap}} [[Achenar]] and [[Atrus]] {{nowrap end}} </nowiki></pre> It will render something like this: :[[Atrus]] and [[Catherine]] '''·''' [[Catherine]] and [[Sirrus]] '''·''' :[[Sirrus]] and [[Achenar]] '''·''' [[Achenar]] and [[Atrus]] But it will ''not'' render like this: :[[Atrus]] and [[Catherine]] '''·''' [[Catherine]] :and [[Sirrus]] '''·''' [[Sirrus]] and [[Achenar]] :'''·''' [[Achenar]] and [[Atrus]] ===Examples=== Here are the above examples in actual running code in a table. Try dragging the width of your web browser window so it becomes smaller and smaller and watch how the line wrapping behaves: {| class="wikitable" | {{nowrap begin}} [[Atrus]] and{{wrap}} [[Catherine]] and{{wrap}} [[Sirrus]] and{{wrap}} [[Achenar]].{{wrap}} [[Atrus]] and{{wrap}} [[Catherine]] and{{wrap}} [[Sirrus]] and{{wrap}} [[Achenar]]. {{nowrap end}} | {{nowrap begin}} [[Atrus]] and [[Catherine]]{{·}}{{wrap}} [[Catherine]] and [[Sirrus]]{{·}}{{wrap}} [[Sirrus]] and [[Achenar]]{{·}}{{wrap}} [[Achenar]] and [[Atrus]] {{nowrap end}} |} An example demonstrating all the helper templates: {| class="wikitable" | {{nowrap begin}} [[Atrus]]{{wrap}} [[Catherine]]{{wrap}} [[Sirrus]]{{·}}{{wrap}} [[Achenar]]{{·}}{{wrap}} [[Atrus]]{{•}}{{wrap}} [[Catherine]]{{•}}{{wrap}} [[Sirrus]]{{snd}}{{wrap}} [[Achenar]]{{snd}}{{wrap}} [[Atrus]] {{!}}{{wrap}} [[Catherine]] {{!}}{{wrap}} [[Sirrus]]{{·}}{{wrap}} [[Achenar]]{{·}}{{wrap}} [[Atrus]] {{nowrap end}} | {{nowrap begin}} [[Atrus]]{{wrap}} [[Catherine]]{{wrap}} [[Sirrus]]{{·}}{{wrap}} [[Achenar]]{{·}}{{wrap}} [[Atrus]]{{•}}{{wrap}} [[Catherine]]{{•}}{{wrap}} [[Sirrus]]{{snd}}{{wrap}} [[Achenar]]{{snd}}{{wrap}} [[Atrus]] {{!}}{{wrap}} [[Catherine]] {{!}}{{wrap}} [[Sirrus]]{{·}}{{wrap}} [[Achenar]]{{·}}{{wrap}} [[Atrus]] {{nowrap end}} |} ===Technical details=== The actual code that does the job is this HTML+CSS code: : <code><nowiki><span style="white-space:nowrap;"> Text and links </span> <span style="white-space:nowrap;"> More text and links </span></nowiki></code> It means that wraps may only happen in the unprotected space between the <code><nowiki></span></nowiki></code> and the <code><nowiki><span ...></nowiki></code>. That's what {{tl|nowrap begin}} and its helper templates are packaging in an easy to use way. {{tl|·}} and the other helper templates should not have any spaces or newlines before them or they will render two spaces before the dot. They tolerate anything from no to several spaces and even a newline after them and they will still only render one space after the dot. If a wrap occurs then the wrap will come after the dot, even if there are spaces before the helper template. The {{tl|·}} causes problems if inside sections of bolded and/or italicised text. Do end the bold text before the {{tl|·}} and continue the bold text after it to avoid the problems. {{tl|•}} and the other helper templates only have this problem if the section is bolded and italicised at the same time. ===See also=== * {{tl|nowrap end}}, this template's complement. * {{tl|nowrap}} provides the same function within a single template (i.e. not suitable for relatively complex and/or lengthy content). * {{tl|nowraplinks}}...{{tl|nowraplinks end}} prevents wraps inside links and only allows wraps between the links and in normal text. Very useful for link lists and usually easier to use than this template. * {{tl|allow wrap}} can be used to provide a (brief) exception within a no-wrapping area. * {{tl|·}} and {{tl|•}}, spaced and wrap-sensitive dot and bullet. * [[Wikipedia:Line-break handling]], the how-to guide about word/line-wrapping/breaks at Wikipedia. <includeonly> <!-- ADD CATEGORIES BELOW THIS LINE, PLEASE: --> [[Category:Line-handling templates]] </includeonly>
Summary:
Please note that all contributions to Guild of Archivists 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
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template:Ambox
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Mbox
(
edit
)
Template:Nowrap begin
(
edit
)
Template:Nowrap end
(
edit
)
Template:Snd
(
edit
)
Template:Spaced en dash
(
edit
)
Template:Spaced ndash
(
edit
)
Template:Tc
(
edit
)
Template:Tl
(
edit
)
Template:Tlc
(
edit
)
Template:Wrap
(
edit
)
Template:·
(
edit
)
Template:•
(
edit
)
Module:Arguments
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:No globals
(
edit
)
Module:Yesno
(
edit
)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs
Something went wrong
Dismiss