Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Dec 2011
    Posts
    33
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Non-breaking hyphens not working correctly (Word '10)

    Hi folks,

    I've got a document in which the non-breaking hyphens aren't behaving properly. In fact, they seem to be working exactly the opposite of the way they were intended.

    I've attached two versions of the document. In version "Before" you will see how the -12.4 moved to the 2nd line. That’s fine, since that’s a non-breaking hyphen. But why is SBP there too? There’s a regular space between the colon and the hyphen; shouldn’t the line break go there? Why is Word keeping the normal space on the same line as the non-breaking hyphen? There's plenty of room for the text to fit.

    Then there's version "After". In it I deleted the space between the colon and the non-breaking hyphen. Now all that text should be on the second line, but as you'll see exactly the opposite happened--now they're all on the first line. Shouldn’t it be the other way around?

    Anyone have any ideas what's causing this?

    Thanks in advance,

    Beej
    Attached Files Attached Files

  2. #2
    Lounger
    Join Date
    Dec 2011
    Posts
    33
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Yes, I'm answering my own post. I have a working theory, one I came up with while talking through the problem with my coworker.

    A human looks at that text, sees a space before the hyphen, and says, “That’s where to break.” Word looks at the text, sees a character before the hyphen, and says, “I’ll break when I get to the first space.” Basically Word doesn't expect the first character to the left of a hyphen to be a space so it’s not smart enough to check.

    Thoughts?

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Willow Grove, Pennsylvania, USA
    Posts
    205
    Thanks
    4
    Thanked 49 Times in 40 Posts
    You're correct in your analysis. The proper solution is to not use a nonbreaking hyphen to represent a minus sign; instead, use a Unicode minus character. That character is also nonbreaking, but doesn't have the same bad behavior. To insert one occasionally, type the four digits 2212 and press Alt+X. If you use it a lot, go to the character in the Insert > Symbol > More Symbols dialog, click the Shortcut Key button, and assign a shortcut.

  4. The Following User Says Thank You to jjfreedman For This Useful Post:

    ItsjustBeej (2013-08-28)

  5. #4
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    122
    Thanks
    3
    Thanked 20 Times in 18 Posts
    Or use an en dash by typing Alt-0150 using the digits on the numeric pad. For most fonts, an en dash is the width of a digit, so is typographically more appealing than a hyphen: hyphen -; en –; and em — (the em dash is Alt-0151).

  6. The Following User Says Thank You to EricFletcher For This Useful Post:

    mrjimphelps (2013-08-29)

  7. #5
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    3,401
    Thanks
    447
    Thanked 404 Times in 376 Posts
    Quote Originally Posted by EricFletcher View Post
    Or use an en dash by typing Alt-0150 using the digits on the numeric pad. For most fonts, an en dash is the width of a digit, so is typographically more appealing than a hyphen: hyphen -; en –; and em — (the em dash is Alt-0151).
    Very helpful info, but for me it will take some getting used to, because I've been typing the double-dash for about 30 years.

  8. #6
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Jim,

    I can sympathize. However, you can "fix" Word to work "Your Way" as follows:
    1. File - > Options -> Proofing
    2. Select the AutoCorrect Options... button
    3. Select the AutoFormat As You Type tab.
    4. UnCheck Hyphens (--) with Dash (--) in Replace as you type section. (I couldn't figure how to get a dash here.
    5. Select the AutoCorrect tab
    6. In the Replace: box type two hyphens.
    7. In the With: box: Hold the Alt and type 0150 or 0151 your choice.
    8. Click the Add button.
    9. Click OK.
    10. Done!


    Now you can work like you have for the past 30 years and still get what you want. HTH
    Last edited by RetiredGeek; 2013-08-30 at 08:32.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  9. #7
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    122
    Thanks
    3
    Thanked 20 Times in 18 Posts
    Quote Originally Posted by RetiredGeek View Post
    UnCheck Hyphens (--) with Dash (--) in Replace as you type section. (I couldn't figure how to get a dash here.
    Just type Alt-0151 where you've typed the 2nd "--" (being sure to use the numeric pad for the digits). It will display as the em dash (—). The Alt sequence works for most Windows apps.

    By default, Word will replace the double-dash sequence with an em dash because it is typographically correct—just as it does for the quote marks (“ and ” which are Alt-0147 and Alt-0148) and the apostrophe (’ as Alt-0146)—to avoid the unpardonable sin of using inch and foot symbols in a document. ;-)

  10. #8
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Eric,

    Thanks! I didn't think that would work on the web and dummy me didn't try.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  11. #9
    WS Lounge VIP mrjimphelps's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    3,401
    Thanks
    447
    Thanked 404 Times in 376 Posts
    Quote Originally Posted by RetiredGeek View Post
    Jim,

    I can sympathize. However, you can "fix" Word to work "Your Way" as follows:
    1. File - > Options -> Proofing
    2. Select the AutoCorrect Options... button
    3. Select the AutoFormat As You Type tab.
    4. UnCheck Hyphens (--) with Dash (--) in Replace as you type section. (I couldn't figure how to get a dash here.
    5. Select the AutoCorrect tab
    6. In the Replace: box type two hyphens.
    7. In the With: box: Hold the Alt and type 0150 or 0151 your choice.
    8. Click the Add button.
    9. Click OK.
    10. Done!


    Now you can work like you have for the past 30 years and still get what you want. HTH
    You're right about my being able to fix Word to work my way. It never even occurred to me to use auto correct.

    Alas, the very first thing I always do when installing MS Office is to disable autocorrect!

    What I did back in the Word Perfect 5.0 for DOS days was to redefine some keys, so as to be able to do Spanish accented characters.

    The lower case letters were easy -- the printer would print the letter, backspace, then print the accent.

    The upper case letters were a bit more challenging: the printer would print the letter, backspace, redefine the size of a line feed, do a reverse line feed, print the accent, redefine the line feed back to the original value, do a line feed.

    It was really cool watching my daisy wheel printer print a Spanish document!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •