Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm writing an administration guide for a software package and I have to write the name of several config files, including their full path, something like that:

In order to do blah, blah, blah, you should open the file /usr/JBoss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml to check that parameter keystoreFile equals to /usr/JBoss-4.2.3.GA/server/default/deploy/jboss-web.deployer/conf/SERVER_NAME.pfx

I have a problem with Microsoft Word 2007 and the way it handles Justification and hyphenation. It doesn't break lines in these long URLs unless it's forced to, prefering to add huge spaces before or after, as in

LONG_URL_OF_FILE_1
and            its
LONG_NAME_OF_PARAM
ETER

Is there a way to force some kind on hyphenation on '/', '.' and '_' characters?

share|improve this question
add comment

2 Answers

You can manually add allowed breaking points by clicking on a location, typing 200b and pressing Alt X. If the preceding character is a digit or a letter a–z or x, then 200b must be prefixed with the two characters u+.

This means inserting U+200B ZERO WIDTH SPACE (ZWSP). According to Unicode line breaking rules, “it is used to enable additional (invisible) break opportunities wherever space cannot be used”, and Word 2007 implements this part of the rules.

An alternative, older, proprietary way is to use Insert → Symbol and select, in “Special characters”, line breaking opportunity (I’m not sure how it is called in English version of Word, but it should be easy to find). It’s really not a character but an internal marker, so it may cause trouble if your text will be saved in a format other than the Word formats or copied via the clipboard. (ZWSP can be problematic too, but at least it’s a standard character.)

share|improve this answer
add comment

You can manually break the line by inserting a manual line break:

  • Ribbon->Page Layout->Page Setup->Breaks->Line break (Office 2007, similar in 2010), OR
  • Press Shift+Enter

You alternatively could add a hyphen or space where you want the line to break, and Word will break the line for you, assuming you haven't changed the hyphenation settings too much.

So you can do at least do it manually; however, I have the same problem and I'd like Word to do it automatically, without my intervention. I'm trying to split URLs rather than file paths automatically across lines, but the same principles apply.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.