Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Simulate hyphenation (97+)

    Hi All,

    Is there a way to simulate Word's actions on encountering a hyphenated word at the end of a line. For example, if I have a word like good-bye, Word will put "good-" at the end of a line if that's the way it falls and start the next line with "bye". However, I often have phrases where words are separated by a slash -- maybe something like "goals/objectives". I would like "goals/" to be at the end of a line, if there's only enough room for it and "objectives" start the next line. Right now, Word will put the entire phrase on a new line. I can think of several manual fixes for this (eg, put a space after the slash) but none of them are satisfactory for a general purpose solution.

    TIA

    Fred

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simulate hyphenation (97+)

    Hi Fred:

    Why simulate when you can do the real thing. Just put an optional hypen after goals/ & it will do what you want. <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simulate hyphenation (97+)

    Hi Fred,

    For a method that works with Word2000 and above, see <A target="_blank" HREF=http://www.mvps.org/word/FAQs/Formatting/NoWidthSpace.htm>How to make urls (and delimiters such as , /, : and @) wordwrap in Word (or: how to insert a zero-width space)</A>.

    Though if you put this character in your documents, you may well confuse other users if you share your documents, and it's a bit of a maintenance hassle (will the character paste along if I copy/paste to other programs? Usually it doesn't ... just like the optional hyphen).

    I use it *very* rarely, and only if I see a line that should be broken, but it doesn't. Putting in the character all over the place, as the above article suggests, seems just too much (might as well put optional hyphens after every syllable...).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Regards, Klaus

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Simulate hyphenation (97+)

    Hi Klaus,

    Thanks for the idea. I looked at the MVPS article. I guess you must know the answer since your name is on it.

    But I also found a solution for Word 97 (and probably earlier versions as well) with your help.

    Of course, I thought I remembered the zero-width space well, so I checked my insert symbols and only found the non-breaking space. That's what you get when you work in W97 (which I'm doing now) and W2K (at work) - a confused brain. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

    Anyway, with the cursor positioned after the slash, I went into Insert Field and chose Advance. I intended to put in a rightwards motion with 0 points but I double clicked instead accidentally. What I ended up with was
    ---- {ADVANCE}
    after the slash and before the "o" in "objectives".

    It worked!!

    Just to be sure, I also tried
    ---- {ADVANCE r 0}
    and that worked too.

    I would almost bet that any Advance that sums to a 0 net effect would accomplish my goal although I'm not sure why you'd do something like
    ---- {ADVANCE r 3 l 3}

    I agree that this is probably all to much hassle for the general case. However, I'd create an autotext entry for it (and have to delete the space before it) and use it only if my eye caught a line that could benefit from this. And I bet this would also NOT copy/paste well into other programs.

    Maybe time to update the article?

    Fred

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Simulate hyphenation (97+)

    Hi Phil,

    Thks for the response. The optional hyphen results in a real hyphen if pressed into service. So you get:
    ....goals/-
    objectives.

    Check out Klaus's response, his MVPS article, and my response to him for some additional items.

    Fred

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simulate hyphenation (97+)

    Hi Fred:

    Your so right & I didn't think of that before replying. But I learned something from your solution. Nice work! <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simulate hyphenation (97+)

    Hi Fred,

    <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>Great idea! You really can make the beast Word jump through some hoops if you know it well enough.

    I cannot reach Dave Rado, who wrote the article and manages the site, but will forward him your tip. Thanks!

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  8. #8
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simulate hyphenation (97+)

    Hi Fred, I just discovered another advantage of your method:
    If you have two words with a slash between them, Word2000 will never hyphenate the second word. This seems to be a bug in the hyphenation engine.

    Inserting a zero-width space doesn't help, either (another bug: "zero width" or plain vanilla space -- Word should recognize that a new word starts after the space, and should have no problems to hyphenate it).

    Your method of inserting an { ADVANCE } field after the slash removes that problem: the second word is hyphenated as it should.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  9. #9
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Simulate hyphenation (97+)

    Hi Klaus,

    Thanks for experimenting. So perhaps { ADVANCE } should be the method of choice in the Rado/Linke article and the others be brought down in importance? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I would assume the other "health warnings" in your article, such as not putting in {ADVANCE} while typing a URL originally but going back to do it, would apply to {ADVANCE} as well. But you can create an Autocorrect entry with {ADVANCE} for the "regular" words that you want broken at the end of a line. I think this would be a good use, since, in my work, I would probably have this phrase many times in a document and would want to see a break after the slash if "goals/" falls at the end of a line (and not otherwise).

    It's interesting to see the kind of bugs one can find if one looks deep enough. I know of no sane reason why word doesn't recognize a new word when a slash comes after the first word. However, a tell-tale sign might be that if you type "goals/objectives" in a brand new document and check the word count, Word reports only 1 word. Strangely enough, Word knows it's not misspelled but doesn't know enough to hyphenate the "word" - say after "goals/objec-" as you indicated using the zero-width space.

    I guess hypenation engines are strange. I recall another word processor that hyphenated "restart" as "res-" and "tart". Given that "re" is a common prefix, I can't think of many reasons for this. But it gave the user the ability to create a "hyphenation list" where you put in the word the way you wanted it hyphenated (eg, "re-start"). You did this once. Then, whenever the word processor encountered a word at the end of a line that it wanted to hyphenate (given that you allowed hyphenation at all), it would check your list to see if it was on there. If so, it hyphenated it your way; if not, it hyphenated the word its way.

    Fred

Posting Permissions

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