More actions
| Line 249: | Line 249: | ||
:''Correct'': {{dothis|<code><nowiki>The [[USS Adder (SS-3)|USS ''Adder'' (SS-3)]] was a submarine.</nowiki></code>}} | :''Correct'': {{dothis|<code><nowiki>The [[USS Adder (SS-3)|USS ''Adder'' (SS-3)]] was a submarine.</nowiki></code>}} | ||
= | = Controlling line breaks = | ||
{{see also|Wikipedia:Line-break handling}} | |||
{{see also|Wikipedia:Line-break handling | |||
It is sometimes desirable to force a text segment to appear entirely on a single line | It is sometimes desirable to force a text segment to appear entirely on a single line—that is, to prevent a line break (line wrap) from occurring anywhere within it. | ||
* A '''[[non-breaking space]]''' (or '''hard space''') will never be used as a line-break point. Unlike normal spaces, multiple adjacent non-breaking spaces do not compress into a single space. | * A '''[[Wikipedia:Non-breaking space|non-breaking space]]''' (or '''hard space''') will never be used as a line-break point. Unlike normal spaces, multiple adjacent non-breaking spaces do not compress into a single space. ''Markup'': for {{dothis|19 kg}}, code <code>19&nbsp;kg</code>. | ||
It is desirable to prevent line breaks | It is desirable to prevent line breaks ... | ||
* where breaking across lines might be confusing or awkward, such as: | * where breaking across lines might be confusing or awkward, such as: | ||
:* <code>17 | :* <code>17&nbsp;kg</code> | ||
:* <code>AD | :* <code>AD&nbsp;565</code> | ||
:* <code>2:50 | :* <code>2:50&nbsp;pm</code> | ||
:* <code>£11 | :* <code>£11&nbsp;billion</code> | ||
:* <code>May | :* <code>May&nbsp;2014</code> | ||
:* <code>Boeing&nbsp;747</code> | |||
:* <code>Boeing | :* <code>123&nbsp;Fake Street</code> | ||
:* <code>123 | :* <code>World War&nbsp;II</code> | ||
:* <code>World War | :* <code>Pope Benedict&nbsp;XVI</code> | ||
:* <code>Pope Benedict | * before a spaced [[#En dashes|en dash]]. ''Markup'': <code>June 23&nbsp;- June 29</code> | ||
* before a spaced [[#En dashes|en dash]]. | |||
Whether a non-breaking space is appropriate depends on context: whereas it is appropriate to use <code>12 | Whether a non-breaking space is appropriate depends on context: whereas it is appropriate to use <code>12&nbsp;MB</code> in prose, it may be counterproductive in a table (where horizontal space is precious) and unnecessary in a short parameter value in an infobox (where a break would never occur anyway). | ||
A line break may occur at a '''thin space''' (<code>&thinsp;</code> | A line break may occur at a '''thin space''' (<code>&thinsp;</code>), which is sometimes used to correct too-close placement of adjacent characters. To prevent this, consider using &nbsp; | ||
Always insert hard/thin spaces symbolically ( | Always insert hard/thin spaces symbolically (<code>&nbsp;</code>, <code>&thinsp;</code>), never by entering them as literal Unicode characters entered directly from the keyboard. | ||
== Quotations == | == Quotations == | ||