Skip to main content
Inspiring
January 26, 2011
Question

Suppressing line wrapping at hyphens in option names ("-some_option")

  • January 26, 2011
  • 1 reply
  • 3020 views

I am a writer for a software product.  Like many software products, we deal with lots of options in our documentation.  A command might look like:

    do_something -my_way -hurry_up

Options have leading hyphens in their names.  The problem is that FrameMaker will take every opportunity to use these hyphens to wrap lines.  Some documentation text might originally exist as:

If you want to do something your way, use the -my_way option to get your way.

but will get wrapped as:

If you want to do something your way, use the -

my_way option to get your way.

We explored using FrameMaker's nonbreaking hyphens (ESC, -, h).  This does work, but has the following drawbacks:

  1. Nonbreaking hyphens do not match normal hyphens in FrameMaker's search function.  If I wanted to search and replace all instances of "-my_way" with "-do_it_my_way" because the option name has changed, the search will not match.  I'd need to remember to always use the nonbreaking hyphen metacharacter in the FrameMaker search dialog.
  2. We have an in-house FrameMaker-to-HTML flow which creates an HTML version of our documentation.  This conversion flow converts these nonbreaking hyphens to some other HTML character besides a normal hyphen.  If a user searches for "-my_way" in a browser, it will not match.

I would really love a FrameMaker option which allows me to suppress hyphenation at hyphens which exist at the beginning of a word, with no prefix letters before the hyphen.  I don't mind if FrameMaker hyphenates at other manually-written hyphens inside words, but I want it to leave my leading hyphens alone.

Have others run into this challenge while writing for a software product?  Thanks!

- Chris

This topic has been closed for replies.

1 reply

Participating Frequently
February 1, 2011
Chris,
Have you tried setting FM to not allow line breaks after a hyphen? I use this for "/" character and it typically works but I don't have a space before the / and I don't export to html. But it is something you could try.
It's under Format... Document... Text Options.
Brian
Inspiring
March 4, 2011

It does indeed solve the wrapped leading-hyphen problem for options, but of course it also suppresses wrapping at manually hyphenated words.  Still, this is a promising approach.  I'll run it by my team and see what they think.

Thanks Brian!

Inspiring
March 13, 2011

Our team discussed it, and we have decided on this solution.  Other editors also did not like wrapping at manually-inserted hyphens in the middle of words (like "short-circuited") so this solution suggestion ends up killing two birds with one stone.  Thank you, BEPubs!