OpenOffice.org Writer: Hyphens and Spaces Can Be Non-Breaking or Optional?
When you’re writing a document and you see the program split something like a date between two lines, do you ever wonder how to prevent that from happening?
Let’s face it… this looks just plain weird
……………………………………………. Monday, July
4, 2011 ……………………………………………………
You could play with margins and whatnot, but for the most part, it will mess with the whole document.
I’ve seen people actually use the Enter key to force the Monday onto the next line… too bad that one is a nightmare during editing. If you add or delete from that paragraph, you’re likely to have a huge gap somewhere that you’ll have to remember to fix. Not to mention future editing, when you just might have to put the line break back in.
No… too much work!
So now what?
Do we just let it go?
Naw… that just wouldn’t be our style.
To avoid the split dates and other weird-looking splits from the end of one line to the beginning of another, we’re going to investigate non-breaking spaces, non-breaking hyphens and optional hyphens.
The non-breaking spaces and hyphens are exactly what they’re called. They are special spaces and hyphens in your document that are not allowed to cause a break from one row to the next.
In other words, the text to the left and right of the non-breaking character must be on the same line.
Next let’s talk about that optional hyphen I mentioned earlier.
An optional hyphen is one that you insert within a word, at the location of your choosing, but it is invisible and unused, unless it’s needed to break the word at the end of a line.
Even if you have the automatic hyphenation turned on, words that you’ve used an optional hyphen in will only be broken in the place you chose.
Now that we know what they are, the next logical step is to talk about how to get them into your documents.
If you’re not great with the whole memorizing the key combination thing, then after you place your cursor where you want to insert the hyphen or space, you’ll need to head over to the Insert menu.
There you’ll want to use the Formatting Mark sub-menu to choose the type of hyphen or space you need.
If you are partial to the key combination idea, the sub-menu lists those too.
Ctrl + Shift + Space is used to create a non-breaking space
Ctrl + Shift + – creates a non-breaking hyphen
Ctrl + - will insert an optional hyphen
In your document, you’ll notice that you now have gray shading where the hyphen or space was inserted. Here’s what a non-breaking space looks like while you’re editing your document:
This one is a non-breaking hyphen:
and this one is an optional hyphen:
As you can see – they’re always in the document, but only used when needed, based on text wrapping at the end of a line. Oh, and don’t worry – they are invisible when printing the document.
No more messing with margins to force a certain look, no more aggravation with Writer, while you try to get a hyphenated phrase onto a single line… it can all be controlled with these easy to use formatting marks.