Copy link to clipboard
Copied
I have a text in a word document which contains a number of non-breaking hyphens (to display birth and death year of a person, i.e. it would not be apporpriate to break the row there). However, when the text is imported into indesign these non-breaking hyphens disappear. I have tried to manually include a non-breaking hyphen in InDesign, then copy this character and use in the word document. However, when the text then is imported - there is no non-breaking hyphen but instead a manual line break, i.e. the opposite of what I want.
Is there a characted I can use in word that will automatically become a non-breaking hyphen when imported to indesign?
Copy link to clipboard
Copied
I feel like I remember that the non-breaking hyphen that you can insert with MS Word is a Word-specific control character. I also feel like I remember that we had a long thread about it here, but I suspect that was at least one generation of forums software ago, and if that post is still out there, I didn't find it with a cursory search. At any rate, I believe that this particular non-breaking hyphen can't be used anywhere else, whether you are saving out raw Unicode text or placing a .docx in Indesign:
My solution (again, this is from A Long Time Ago so my memory might be inaccurate) was to get an actual Unicode U+2011 NON-BREAKING HYPHEN on my clipboard, and to use the Find and Replace menu in Word to replace all of the Word-generated hyphens with the proper Unicode glyph. I recall similar probelms with the No-Width Optional Break shown above, where in Word I had to replace it with a nonsense glyph that appeared nowhere else in the document, whereupon I placed the .doc and ran the Find/Change in InDesign to replace the nonsense glyph with a proper Unicode zero-width space.
Copy link to clipboard
Copied
Would inserting the Unicode character with a Word macro/keybind do it? The Search and Replace would be the big hammer, but for running edits, a "real NBH key" might help. It could even be mapped to that same key combo.
Copy link to clipboard
Copied
Nonbreaking hyphens are in a group of Unicode characters that are not rully recognized by our software programs.
In Word, whether you use the Special Characters tab
Or you insert the actual Unicode codepoint (codepoint 2011 by either the Alt-X keyboard shortcut or by formally inserting the specific unicode glyph from the visual chart)...
Non of the methods work when the Word file is imported into InDesign. In fact, with the first method (using the dedicated Special Character tab), the entire presence of the NBH is completely removed leaving the content without even an ordinary hyphen or a spacebar. Gah! What nightmare for publishers.
Inserting the Unicode NGH character produces a regular hyphen when the Word.docx file is imported into the INDD layout.
I think there are several reasons why this mess happens:
Bottom line: non-breaking hyphens don't convey from Word to InDesign.
So don't use them.
I like the solution posed by @Joel Cherney above.
Copy link to clipboard
Copied
And then there's step three, getting hyphens to EPUB. Managing dashes from a Word source to an ID layout to an EPUB export is about 5,000% more hassle than it seems as if it should need to be.
Copy link to clipboard
Copied
Bottom line: non-breaking hyphens don't convey from Word to InDesign.
So don't use them.
I like the solution posed by @Joel Cherney above.
Looking at my archives, I think that I must have had some way to get a NBH into Word 2003 in a way that made importing into InDesign possible. I can't prove it, and I can't be bothered to fix my damaged WinXP VM right now to figure out how it worked, but any workflow that has the step "Okay, now boot into your XP VM" has to be demoted if there is anything at all that will work without that step.
So, in Word, I'd replace all NBH with, oh, I don't know, something odd that I know wouldn't appear elsewhere in my document. I am fond of using glyphs from other writing systems, but it doesn't matter what you pick, as you're going to be replacing it in InDesign with the NBH.
I don't do much EPUB work, but when I do, I do have an easy way to replace any one glyph with any other glyph in a group of HTML files in the bash shell. Adding the unpacking and repacking of the epub would be... doable, I'm certain. But, as above, clearly "OK now move your epub to your Linux partition and boot into your preferred distro and run this bash script" is a suboptimal workflow. I bet if I still used a Mac, or if I repurposed my tools to work in PowerShell, then it would still be too many steps, but at least my howto wouldn't have instruction "now boot" or "now reboot" in it.
Copy link to clipboard
Copied
Thank you so much. This explains the issue! Actually, it seems as if I use the Unicode 2011 this works when the file is imported into InDesign (at least it seems to work in the linked file I tested). I will do some more testing, but am crossing my fingers this will do the trick 🙂
Copy link to clipboard
Copied
Is there a characted I can use in word that will automatically become a non-breaking hyphen when imported to indesign?
Looking back at your question again, I see that I left out a part of my answer, which is how I loaded the true Unicode non-breaking hyphen into my clipboard. (There's a "copy to clipboard" button off to the left.)
I think James' suggestion of mapping a non-breaking hyphen VBA macro is a good one, although if you don't foresee any need to work on the Word docs any further, it might not be necessary, depending on your workflow.
Copy link to clipboard
Copied
Thank you so much! This is the sign I was looking for - so weird Word doesn't use it. I will look into how to make a script to make it automatic when I use the Ctrl+shift+_ in word (or maybe add it to Ctrl+Alt+- as this is the shortcut used in InDesign - I have been a bit frustrated about it being a different shortcut in the two programs)
Copy link to clipboard
Copied
Well, different products, different makers, different purposes and different histories. Actually Word's keymap is the legacy of at least two attempts to create standardized keys for all comparable apps. Neither of those ever caught on except in direct clones.
The general MS/ Word set has spread to lots of things, resulting in something like standardization of basic keys (Ctrl -C, X, V, P etc.)
It used to be a lot worse, when every maker and every app had that programmer's (yes, singular) idea of perfection, or just his convenience in coding. Go look at the original commands for WordStar, for example, which became a de-facto standard for the first gen or so of word processors. And at the Esc-based commands for FrameMaker, implemented because that was the only way to standardize across Windows, Mac and Unix systems. EEEgads.
As with most modern apps, though, you can remap both keysets, though. Have at it. 😄
Copy link to clipboard
Copied
Find your non-breaking hyphens in Word and change the character colour.
When imported to InDesign - you will see them - or at least be able to find and replace them
Find Grep
-
colour - blue
replace with
~~
colour black