Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

UniWiki:Manual of Style: Difference between revisions

From EVE University Wiki
Djavin novienta (talk | contribs)
Djavin novienta (talk | contribs)
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>}}


== <span id="Non-breaking spaces"></span>Controlling line breaks ==
= Controlling line breaks =
{{shortcut|MOS:NBSP}}
{{see also|Wikipedia:Line-break handling}}
{{see also|Wikipedia:Line-break handling|Template:Spaces}}


It is sometimes desirable to force a text segment to appear entirely on a single line{{mdashb}}that is, to prevent a line break (line wrap) from occurring anywhere within it.
It is sometimes desirable to force a text segment to appear entirely on a single line&mdash;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. {{em|Markup}}: for {{xt|19{{nbsp}}kg}}, code <code>19&amp;nbsp;kg</code> {{em|or}} <code>19{{t|nbsp}}kg</code>
* 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&nbsp;kg}}, code <code>19&amp;nbsp;kg</code>.
* Or use {{tlx|nowrap}}, {{tlx|nobreak}}, or {{tlx|nobr}} (all equivalent). {{em|Markup}}: for {{xt|{{nobr|5° 24′ N}}}} code <code>{{tnull|nobr|5° 24′ N}}</code> (Unexpected results may occur if the text appearing within {{tlx|nowrap}} begins or ends with a space or nonbreaking space; or if a nonbreaking space appears immediately before or after {{tlx|nowrap}}.)


It is desirable to prevent line breaks{{nbsp}}...
It is desirable to prevent line breaks&nbsp;...


* where breaking across lines might be confusing or awkward, such as:
* where breaking across lines might be confusing or awkward, such as:
:* <code>17{{t|nbsp}}kg</code>
:* <code>17&amp;nbsp;kg</code>
:* <code>AD{{t|nbsp}}565</code>
:* <code>AD&amp;nbsp;565</code>
:* <code>2:50{{t|nbsp}}pm</code>
:* <code>2:50&amp;nbsp;pm</code>
:* <code>£11{{t|nbsp}}billion</code>
:* <code>£11&amp;nbsp;billion</code>
:* <code>May{{t|nbsp}}2014</code>
:* <code>May&amp;nbsp;2014</code>
:* <code><nowiki>{{nobr|5° 24′ 21″ N}}</nowiki></code>
:* <code>Boeing&amp;nbsp;747</code>
:* <code>Boeing{{t|nbsp}}747</code>
:* <code>123&amp;nbsp;Fake Street</code>
:* <code>123{{t|nbsp}}Fake Street</code>
:* <code>World War&amp;nbsp;II</code>
:* <code>World War{{t|nbsp}}II</code>
:* <code>Pope Benedict&amp;nbsp;XVI</code>
:* <code>Pope Benedict{{t|nbsp}}XVI</code>
* before a spaced [[#En dashes|en dash]]. ''Markup'': <code>June 23&amp;nbsp;- June 29</code>
* before a spaced [[#En dashes|en dash]]. {{em|Markup}}: {{nobr|<code>June 23{{t|nbsp}}{{ndash}} June 29</code>}} {{em|or}} {{nobr|<code>June 23{{t|snd}}June 29</code>}} {{em|or}} {{nobr|<code>June 23{{t|spaced ndash}}June 29</code>}} (all equivalent).


Whether a non-breaking space is appropriate depends on context: whereas it is appropriate to use <code>12{{t|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).
Whether a non-breaking space is appropriate depends on context: whereas it is appropriate to use <code>12&amp;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>&amp;thinsp;</code>, or {{tlx|thinsp}}), which is sometimes used to correct too-close placement of adjacent characters. To prevent this, consider using {{t|nobr}}.
A line break may occur at a '''thin space''' (<code>&amp;thinsp;</code>), which is sometimes used to correct too-close placement of adjacent characters. To prevent this, consider using &amp;nbsp;


Always insert hard/thin spaces symbolically (<code><nowiki>{{nbsp}}</nowiki></code>, <code><nowiki>{{thinsp}}</nowiki></code>, <code>&amp;nbsp;</code>, <code>&amp;thinsp;</code>), never by entering them as literal Unicode characters entered directly from the keyboard. (Note that inside wikilinks, a construction such as {{nobr|<code><nowiki>[[World War&amp;nbsp;II]]</nowiki></code>}} works as expected, but {{nobr|<code><nowiki>[[World War{{nbsp}}II]]</nowiki></code>}} will not work.)
Always insert hard/thin spaces symbolically (<code>&amp;nbsp;</code>, <code>&amp;thinsp;</code>), never by entering them as literal Unicode characters entered directly from the keyboard.
 
'''Adjacent quotation marks''': The templates {{tlx|' "}} and {{tlx|" '}} will add a small amount of CSS kerning (and prevent linebreak) between adjacent quotation marks/apostrophes for better readability. {{em|Markup}}: {{nobr|<code>He announced, "The answer was 'Yes!{{tl|' "}}</code>}} ''or'' {{nobr|<code>{{tl|" '}}Yes!' was the answer."</code>}}


== Quotations ==
== Quotations ==