h1

Word: Nonbreaking spaces the easy way

December 29, 2008

We all know how to enter a space in Word—you just press the Spacebar, right? But what if the space you entered causes two parts of a whole to split over a line? For example, you might have a figure and a unit of measure (such as 150 mm) and you don’t want to separate the ‘mm’ part from the ‘150’ part—ever. Or perhaps a date like 3 September, where you don’t want the 3 on one line and September on the next.

If you use a standard space, then, depending on where the two parts are in the text, they may get split when you change the font, font size, page margins, etc., or it may gain extra white space if you change to fully justified text (left and right margins all lined up). Splitting things that should be together like this affects the readability and therefore the ‘understandability’ of the document.

In the image below, some of the values and units of measure have split over two lines (yellow highlights), and others (green highlights) have the potential to split if changes are made to the styles, page layout etc.

Split values and accompanying units of measure

Split values and accompanying units of measure

So, what can you do to prevent excess white space or splits in such instances? Use a nonbreaking space to force the two parts to stay together—always.

To add a nonbreaking space manually:

  1. If you can’t see the space markers in your Word document, click Pilcrow button to turn on Show/Hide so you can see the spaces (the little dots between the words).
  2. Insert your cursor between the two items you want to keep together and delete the existing space.
  3. Press Ctrl+Shift+Spacebar to insert the nonbreaking space. A little ‘degree’ symbol will show instead of the usual space symbol.
The marks for the nonbreaking spaces look like degree symbols

The marks for the nonbreaking spaces look like degree symbols

The image below shows how the text looks when Show/Hide is turned off. All the values and units of measure are together and equidistant, so it is clear to the reader that the “m’s” and “km’s” are not just typos.

How the text looks when you force the two elements to stay together

How the text looks when you force the two elements to stay together

To use Find/Replace to replace certain spaces with nonbreaking spaces:

Before you run off and start doing Find/Replace without thinking, STOP. You need to think about what you’re changing and what effects those changes might have on legitimate text. For example, I did a Find/Replace for ‘[space]m. without specifying ‘match case’ and accidentally changed all authors names in the reference list who had ‘M.’ as their initial! If you catch it immediately, ‘Undo’ is your friend.

So think carefully how you will tackle the Find/Replace—you only want to replace the spaces in the correct strings. Here’s how I would replace ‘[space]mm.’ with ‘[nonbreaking_space]mm.’:

  1. Open the Find/Replace window.
  2. In the Find what box (1), type ‘[space]mm.‘ (without the quotes, and where [space] represents pressing the spacebar).
  3. In the Replace with box (2), type ‘^smm.‘ (again, without the quotes). ^s means nonbreaking space in Word. Make sure the ‘s‘ is in lower case—this is critical. And you get the ^ character by pressing Shift+6.
  4. Click Replace All (or click Find Next, then Replace if you want to check each one first).
Find/Replace a standard space with a nonbreaking space

Find/Replace a standard space with a nonbreaking space

For some other variations on this:

  • Find [space]mm[space] and replace with ^smm[space] (finds all mm units of measure preceded and followed by a space; replaces only the first space with a nonbreaking space)
  • Find [space]mm, and replace with ^smm, (finds all instances of mm followed by a comma and replaces the space with a nonbreaking space)
  • Find [space]September[space]2008 with ^sSeptember^s2008 (replaces spaces in a full date—notice there are two instances of ^s in this one)

4 comments

  1. […] Insert a non-breaking space: Ctrl+Shift+spacebar […]


  2. […] value (25) and the UOM (km) (you can avoid splitting the value and its UOM across lines by using a nonbreaking space between […]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: