|
Hyphens, hard hyphens,
soft hyphens, hyphenation soft
returns, and hard spaces . . .
What they are and how they work
Related pages -
Using "Other
Codes" in WordPerfect (Format > Line > Other Codes)
Edit > Paste Special
> Unformatted Text helps solve formatting problems when copying
blocks of text or macro code from the Internet or between WordPerfect
documents |
"Hyphenation divides words
that span the hyphenation zone, a narrow area
that surrounds the right margin of a document. You can enable
automatic hyphenation [see below]. You can
also change the width of the hyphenation zone. Increasing the
hyphenation zone hyphenates fewer words, and decreasing the hyphenation
zone hyphenates more words. As well, you can create a nonbreaking
["hard"] hyphen." [- Corel WordPerfect X3 Help file.]
There are four forms of hyphenation in
WordPerfect:
- A hyphen is what you get when you press the "-"
key next to the "0" (zero) key. In Reveal Codes, it
produces a [- Hyphen] code. Words containing hyphen codes will
wrap at the hyphen to the next line. This type of hyphen is often
called a "regular hyphen" to distinguish it from the
other types below.
- Note:
- Sometimes WordPerfect's hyphens do not translate
to another program, so in those cases you may want to use hard
hyphens (next item below) in the source document instead of regular
hyphens.
- When you use Find and Replace to locate a
hyphenated word or number, you must use the same type of hyphen
in the Find and Replace fields as exists in the item to be searched
in the document. Hence, to find a regular hyphen, the item must
contain regular hyphens (i.e., codes). To find hard hyphens (see
next section below), the item must contain hard hyphens (which
are characters, not codes).
- Macro writers:
Storing a word or phrase containing regular hyphens (i.e., [-Hyphen]
codes) in a variable causes the hyphen codes to be converted
to hard hyphens. Therefore, to use SearchString() in a macro
to find such an item, you must first use StrTransform() on the
variable. See, for example, the code in the PageLine
macro in the Library. See also this post at WordPerfect Universe,
here,
which demonstrates a macro that searches for two hyphens and
replaces them with an en-dash (or em-dash).
- A hard
hyphen (or "character hyphen"
or "non-breaking hyphen") is what you get when you
click Format, Line, Other codes, Hyphen character, or simply
press <Ctrl+hyphen>. It acts like any other "real"
keyboard character (a,b,c,1,2,3, etc.); therefore, it doesn't
produce any code in Reveal Codes. It is often used to "glue"
compound items together such as dates (2000-2003) or part numbers
(123-001) so that part of the item won't wrap to the next line.
It also can be useful to ensure that hyphens are translated as
hyphens in some other programs.
- Assign "Hyphenation
Character" to the <Ctrl+hyphen> keys, if it is not
already assigned to them.
(See
"Assigning features to key combinations," below.)
- When you use Find and Replace to locate a
hard-hyphenated word or number, you must use hard hyphens (not
[-Hyphen] codes; see above section) in the Find and Replace fields.
- A soft
hyphen (inserted when you click Format,
Line, Other codes, Soft hyphen) divides the word with a hyphen
only when the word spans the hyphenation zone
(which is a narrow area that surrounds the right margin of a
document; see Tools, Language, Hyphenation to adjust the zone).
In Reveal Codes, it produces a [- Soft Hyphen] code. This
type of hyphen only becomes visible on the main screen and in
print when the joined characters or words span the hyphenation
zone.
- Assign "Hyphenation
Soft" to the <Alt+hyphen> keys, if it is not already
assigned to them. (See "Assigning
features to key combinations," below.)
- A hyphenation
soft return (inserted when you click
Format, Line, Other codes, Hyphenation soft return) divides the
word without using a hyphen only when the word spans the hyphenation zone. In brief, it acts like a hyphen
but does not show up on the main screen or in print. In Reveal
Codes, it produces a [Hyph SRt] code. It is often used following
a slash (stroke) mark ("/") or a dash to allow wrapping
at that location.
- Tip: You can use the author's SoftWrap
macro to add hyphenation soft returns at appropriate locations
in e-mail and web page addresses.
- Assign "Hyphenation
Soft Return" to the <Alt+hyphen>, <Ctrl+Shift+hyphen>
or <Ctrl+Alt+hyphen> keys, if it is not already assigned
to them. (See "Assigning features
to key combinations," below.)
What is a "hard" space?
- Hard spaces, like hard hyphens, are useful
in several circumstances, to "glue" words, numbers
or dates together to prevent them from splitting to the next
line by word wrap.
- Hard spaces can be entered from the keyboard
by pressing <Ctrl+space>. Normally, pressing the <space>
key produces a space character (ASCII 32), not a WordPerfect
code; pressing the hyphen key produces a WordPerfect code, not
a hyphen character (ASCII 45).
Notes and tips
- Hard hyphens, soft hyphens, and hyphenation
soft returns can be assigned to the
indicated keyboard combination to make them easy to access while
typing. The three items are found
under the Features tab in the Features category "Format,"
when you click on Tools, Settings, Customize, Keyboards tab,
[select keyboard name], Edit. Scroll down in the shortcut key
list to find the -+Ctrl, -+Alt, etc., shortcut keys, remove the
old assignment (if any), then Assign the feature to the key combination.
- Hyphenation zone. Hyphenation divides words that start before the left
boundary of this zone (a narrow area that surrounds the right
margin of a document) and extend past the right boundary of the
zone. You can change it with Tools, Language, Hyphenation
(earlier versions: Format, Line, Hyphenation). This is what the
dialog looks like:
- Enable the checkbox to turn automatic hyphenation
on.
- Adjustments.
The left dotted line represents the left boundary of the hyphenation
zone; the middle solid line represents the right margin; and
the right dotted line represents the right boundary of the hyphenation
zone. The zone is measured as a percentage of the line length
(determined by the current left and right margin settings).
- Place the cursor where you want to change
the zone.
- Specify new percentages. Increase the percentages
to hyphenate fewer words; decrease the percentages to hyphenate
more words.
- Re-hyphenate?
If Hyphenation was turned on before you made changes, WordPerfect
may prompt you to re-hyphenate some words. You can remove this
message from older documents where hyphenation was previously
turned on, but where it is currently turned off, with a macro:
See UPDATER.
- You have to insert some of these items
manually. Hard spaces (see above),
regular hyphens, soft hyphens, and hyphenation soft returns must
be deliberately inserted by the user in WordPerfect, while hard
hyphens can be either deliberately inserted, imported from an
external source, or converted by WordPerfect during certain paste operations.
- Changes WordPerfect might make without
telling you. If you paste material
as "unformatted text" you should note the way WordPerfect
11 and later versions treat regular hyphens, soft hyphens, hyphenation
soft returns, and hard spaces from a source document. See here for more (especially under the
"Notes" section on that page).
|