This MedLibrary.org supplementary page on is provided directly from the open source Wikipedia as a service to our readers. Please see the note below on authorship of this content, as well as the Wikipedia usage guidelines. To search for other content from our encyclopedia supplement, please use the form below:
Related Sponsors
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unverifiable material may be challenged and removed. (February 2007) |
In computer-based text processing and digital typesetting, a non-breaking space or no-break space (NBSP) is a variant of the space character that prevents an automatic line break (line wrap) at its position. It is also known as a hard space or fixed space.
Contents |
Explanation
The difference between an NBSP and a normal space is that, when a string including the NBSP comes at the end of the line, and is too long to fit, it will move the whole string to the next line (including the strings that the NBSP connects to). This is analogous to how normal strings wrap. For example, the string "ambidextrously" will never be "broken", and neither will the string "am bi dextrous ly" when the spaces are nonbreaking.
Use in hiding folders
A Non-breaking space can used to make invisible folders by using this character as the title, then changing the icon to one of the blank spaces in the "Change Icon" box.
Use as non-collapsing whitespace
A second common application of the NBSP characters is in plain text file formats for word processing applications (e.g., SGML, HTML, TeX, LaTeX) that treat sequences of white-space characters (such as space, newline, tabulator, form feed, etc.) exactly as if they were a single character. Such collapsing of whitespace allows the author of the plain text file to neatly arrange the text in this form (e.g., by line breaks and indentation), without affecting the typeset result of the line-breaking algorithm.
The no-break space character is not merged with any other neighboring whitespace characters in such applications, and can therefore be used by an author to explicitly insert additional visible space in the formatted text.
Some people decry the use of NBSP for creating non-blanking space. They suggest alternatives, of which the Unicode space characters are perhaps closest to the NBSP mechanism.
  will create an "en space". Here are two xs with an en space between them: x x.
  will create an "em space". Here are two xs with an em space between them: x x.
Unicodes 8196-8202 provide a range of other spaces, but they don't move from narrowest to widest across that range of Unicodes.
Use in typesetting
Non-breaking spaces are used in typesetting where visual separation does not imply line-breakability. Examples are the spaces between words and punctuation in traditional typesetting's spacing rules. In French spacing, for example, a non-breaking space is inserted between words and their enclosing quotation marks and between the last word of a sentence and a question mark.
Encodings
- In Unicode and ISO/IEC 10646, NBSP is U+00A0.
- In ISO/IEC 8859, NBSP is 0xA0.
- In KOI8-R, NBSP is 0x9A.
- In EBCDIC, it is 0x41.
- In CP437 and CP850, NBSP is 0xFF.
- In SGML and HTML, the character entity reference
or the numeric character references or represent NBSP. - In Wikitext, the character entity reference
often represents NBSP. - In TeX and LaTeX, a tilde (~) is used to denote the hard space.
- In ASCII, there is no non-breaking space.
Keyboard entry methods
None of the existing national or international standards on keyboard layouts currently define an input method for the NBSP character. Therefore, the authors of keyboard drivers or application programs (e.g., word processors) had to invent their own keyboard shortcuts. For example:
- OPTION+SPACE: Mac OS
- ALT+0160: Microsoft Windows
- COMPOSE, SPACE, SPACE: Linux
- CTRL+K N S: vim (see vim digraphs)
- CTRL+SHIFT+SPACE: Microsoft Word, Dreamweaver
- CTRL+SPACE: WordPerfect, OpenOffice.org
- CTRL+SHIFT+U00A0: GNOME
- Insert | Symbol dialog box (Latin-1 subset, after ~): many office applications
Other types
Unicode defines several other no-break space characters that differ from the regular space in width:
- No-break thin space, known in Unicode as "NARROW NO-BREAK SPACE" (U+202F). This is required for French punctuation (before ?, ! or ;).
- Word joiner, encoded in Unicode 3.2 and above as U+2060. The word-joiner does not normally produce any space but prohibits a line break on either side of it.
- The Byte Order Mark, U+FEFF, officially named "ZERO WIDTH NO-BREAK SPACE", can also be used with the same meaning as the word joiner, but in current documents this use is deprecated.
See also
- Hard space
- Space (punctuation)
- Word wrap
- List of XML and HTML character entity references
- French spacing#Computer software
- Wikipedia:Line break handling
External links
- http://www.sightspecific.com/~mosh/WWW_FAQ/nbsp.html
- http://yesterdayishere.com/wordpress/arhiva/2007/08/11/what-nbsp-means-and-does/ (What NBSP is for... and NOT for.)
- http://www.trygve.com/doomsday.html (A witty plea that NBSP not be used for non-collapsing white space.)
Wikipedia content modification information:
- This page was last modified on 28 December 2008, at 01:29.
Wikipedia Authorship and Review
Wikipedia content provided here is not reviewed directly by MedLibrary.org. Wikipedia content is authored by an open community of volunteers and is not produced by or in any way affiliated with MedLibrary.org.
Wikipedia Usage Guidelines
This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article on " ".
The URL for this specific entry is:
All Wikipedia text is available under the terms of the GNU Free Documentation License. (See Copyrights for details). Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.
