How can I quickly and easily type a non-breaking hyphen?
I was typing in full screen composition mode when… an italian hyphenated word just “broke” into two awful parts.
I tried Edit->Insert->Word Joiner before and after the hyphen, but it is too much of a to and fro to the menu bar. Anything quicker? InDesign for example has a special character.
Alternatively wouldn’t it be simpler to select what has to stay together and then use the “Word Joiner” command?
PS (a note to my wish list): I think that the “show invisible” command should acknowledge the presence of a non-breaking hyphen or word joiner thing.
I’m not quite sure I follow the problem. Do you have hyphenation turned on in the preferences? If so, then it’s entirely up to OS X how words get hyphenated. If you need to use Word Joiner a lot, you can always assign it a keyboard shortcut:
scrivener.tenderapp.com/help/kb/ … er-for-mac
All the best,
I am sorry for not being clear, I’ll do my best this time.
I have hyphenation turned off. I read that OS X doesn’t have a non-breaking hyphen and this might be an issue, windows people have an advantage here.
My point is that sometimes we have to deal with hyphenated compounds, like “broad-minded” and the two words must stick together as if they were one. In my case I had something equivalent to “broad-” at the end of a line and “minded” on the following one. (It happened in full screen composition mode).
In 90.000 words I think I used only three compounds, so it is really not important, but my concern is that if we do not have a nonbreaking hyphen like in ms word or indesign, when we compile for pub or mobi we might have an hyphenation problem. There is no way we might know the line length one will be reading our manuscript. If we had a special character for a nonbreaking hyphen that we can type then we are safe. Semantically that tiny segment is a connecting line, why the hack OS X has to break the word in two?
A visual clue (options -> show invisibles) for when we used “join words” might help to track down eventual problems.
Non-breaking hyphen is Unicode 2011.
- Open the Character Viewer from the languages menu;
- If you haven’t done so already, click the gear menu at top left, choose “Customise List”; scroll to the bottom of the pane, click the triangle for “Code Tables” and tick “Unicode”, then the “Done” button;
- Select Unicode which appears at the bottom of the list, and scroll down to the line that begins “2010” and select the second glyph, which is 2011;
- On the right a pane will say “Non-breaking hyphen” with a button for “Add to Favourites”, click that button … I’ve never needed to do that but I believe the character should appear on the list at the bottom of the “Edit” menu in Scrivener.
- On the Character Viewer there is a display of how it will appear in all the fonts on your machine that support U+2011.
Edited twice to remove typo problems!
Thank you xiamenese for this useful tip.
I hope that soon there will be a way to type that hyphen in a more direct way.
If you activate the Unicode Hex Input (System Preferences > Language & Text > Input Sources), then you can use that source to quickly insert the symbol by holding the Option key and typing the unicode number (2011 in this case).
That I didn’t know! Cheers MimeticMountain. I thought that you could insert symbols by typing their unicode value only in windows!
PS: the input source must be selected to Unicode Text Input for this trick to work.
You could also (in theory) do a search-and-replace, or use the compile “replacements” section to take the word, with a regular hyphen, and replace it with the same word that has the non-breaking hyphen. Either way, you won’t have to interrupt your flow while you write, but be guaranteed to get the output you need.
Cheers for your your help!
Actually having being used to the way MS Word (long time ago!) and InDesign handle this particular hyphen, to me is common to type it the way I type a comma or a semicolon.
Anyway a search and replace is a good tip, I might have had a few compounded words hidden in my paragraphs, better to have a look. And by the way who wants to hyphenate a word in a manuscript?
I just thought of another (possible) solution: the auto-corrections preferences. I know that two hyphens can be automatically converted into an em-dash as you type them. Maybe set it up for 3 hyphens to convert to the non-breaking dash? You might have to disable the em-dash so that you don’t get it plus a single hyphen, or you could use some other symbol (two or more equals signs, for instance).
Thanks again for your input.
Anyway, considering the direct possibility to go from Scrivener to e-book (ibook and mobi), I believe the non-breaking hyphen problem should be looked into. I didn’t test the outcome on ebook yet, but I wonder if the users know that when they type “-” they’ll have the word split into two lines.
Probably Apple should have done a better job, but I don’t even know how to report such shortcoming to them.