Discussion:
Hyphenating a hyphenated word at a line break
Jerry
2014-08-28 11:03:48 UTC
Permalink
I have a fancy hyphenated word, crosstalk-cancelled, where I spell it with (I believe) the proper - which is an n-dash. When this is rendered in the vicinity of a line wrap, the entire thing gets pushed to the next line, leaving a lot of ugly white space in the first line. So I inserted a hyphenation point after the -. This shows on the LyX screen as sort of -- which is my original n-dash and a shorter blue dash, probably supposed to represent a hyphen. This is all great, but when this version is rendered, the line break now appears after crosstalk--, that is, both the n-dash _and_ the hyphenation point are rendered which looks very wrong. What is the typographer's say on this, and is LyX doing the right thing. Also, is this a LyX problem or a TeX problem? My guess the typographer would say, let the n-dash stand alone if it occurs at a line break.

Jerry
Richard Heck
2014-08-28 15:29:40 UTC
Permalink
Post by Jerry
I have a fancy hyphenated word, crosstalk-cancelled, where I spell it with (I believe) the proper - which is an n-dash. When this is rendered in the vicinity of a line wrap, the entire thing gets pushed to the next line, leaving a lot of ugly white space in the first line. So I inserted a hyphenation point after the -. This shows on the LyX screen as sort of -- which is my original n-dash and a shorter blue dash, probably supposed to represent a hyphen. This is all great, but when this version is rendered, the line break now appears after crosstalk--, that is, both the n-dash _and_ the hyphenation point are rendered which looks very wrong. What is the typographer's say on this, and is LyX doing the right thing. Also, is this a LyX problem or a TeX problem? My guess the typographer would
say, let the n-dash stand alone if it occurs at a line break.

Yes, the n-dash should stand alone, but LaTeX is doing what you are
asking: You told it that it was OK to hyphenate there, so it has. What
you want is the \linebreak command instead. LyX does not have native
support for this, so you have to use ERT. Note that you can use an
optional argument with \linebreak, as well, from 0 to 4, which mean: you
can break here; you really must break here. So you could try:
\linebreak[1]
in ERT to start. The advantage of using the optional argument is that,
if you move some text around, LaTeX still has a chance of getting the
linebreaking right, whereas if you insist the line be broken there, then
things could go very ugly.

Richard
stefano franchi
2014-08-28 15:43:24 UTC
Permalink
Post by Jerry
I have a fancy hyphenated word, crosstalk-cancelled, where I spell it with
(I believe) the proper - which is an n-dash. When this is rendered in the
vicinity of a line wrap, the entire thing gets pushed to the next line,
leaving a lot of ugly white space in the first line. So I inserted a
hyphenation point after the -. This shows on the LyX screen as sort of --
which is my original n-dash and a shorter blue dash, probably supposed to
represent a hyphen. This is all great, but when this version is rendered,
the line break now appears after crosstalk--, that is, both the n-dash
_and_ the hyphenation point are rendered which looks very wrong. What is
the typographer's say on this, and is LyX doing the right thing. Also, is
this a LyX problem or a TeX problem? My guess the typographer would say,
let the n-dash stand alone if it occurs at a line break.
This stackexchange question [1] contains more info than you probably wished
for, but it may still be useful in laying out the various ways to approach
the problem. Richard's suggestion (\newline) is indeed one of those listed.
Of course, all solution refer to LaTeX an not Lyxd, which means you can use
them only if you insert them in ERT boxes (and add the corresponding
packages, when needed, to your Document's preamble)

Cheers,

Stefano

[1]
http://stackoverflow.com/questions/2193307/how-to-get-latex-to-hyphenate-a-word-that-contains-a-dash
--
__________________________________________________
Stefano Franchi

***@gmail.com <***@tamu.edu>
http://stefano.cleinias.org
Richard Heck
2014-08-28 16:19:28 UTC
Permalink
Post by Jerry
I have a fancy hyphenated word, crosstalk-cancelled, where I spell
it with (I believe) the proper - which is an n-dash. When this is
rendered in the vicinity of a line wrap, the entire thing gets
pushed to the next line, leaving a lot of ugly white space in the
first line. So I inserted a hyphenation point after the -. This
shows on the LyX screen as sort of -- which is my original n-dash
and a shorter blue dash, probably supposed to represent a hyphen.
This is all great, but when this version is rendered, the line
break now appears after crosstalk--, that is, both the n-dash
_and_ the hyphenation point are rendered which looks very wrong.
What is the typographer's say on this, and is LyX doing the right
thing. Also, is this a LyX problem or a TeX problem? My guess the
typographer would say, let the n-dash stand alone if it occurs at
a line break.
This stackexchange question [1] contains more info than you probably
wished for, but it may still be useful in laying out the various ways
to approach the problem. Richard's suggestion (\newline) is indeed one
of those listed. Of course, all solution refer to LaTeX an not Lyxd,
which means you can use them only if you insert them in ERT boxes (and
add the corresponding packages, when needed, to your Document's preamble)
[1]
http://stackoverflow.com/questions/2193307/how-to-get-latex-to-hyphenate-a-word-that-contains-a-dash
Wow, that is a lot of information! Mostly, that deals with cases where
you use the word a lot. I took this to be more of a one-off sort of
issue. But I'm going to save that link....

Richard
stefano franchi
2014-08-28 16:31:58 UTC
Permalink
Post by stefano franchi
Post by Jerry
I have a fancy hyphenated word, crosstalk-cancelled, where I spell it
with (I believe) the proper - which is an n-dash. When this is rendered in
the vicinity of a line wrap, the entire thing gets pushed to the next line,
leaving a lot of ugly white space in the first line. So I inserted a
hyphenation point after the -. This shows on the LyX screen as sort of --
which is my original n-dash and a shorter blue dash, probably supposed to
represent a hyphen. This is all great, but when this version is rendered,
the line break now appears after crosstalk--, that is, both the n-dash
_and_ the hyphenation point are rendered which looks very wrong. What is
the typographer's say on this, and is LyX doing the right thing. Also, is
this a LyX problem or a TeX problem? My guess the typographer would say,
let the n-dash stand alone if it occurs at a line break.
This stackexchange question [1] contains more info than you probably
wished for, but it may still be useful in laying out the various ways to
approach the problem. Richard's suggestion (\newline) is indeed one of
those listed. Of course, all solution refer to LaTeX an not Lyxd, which
means you can use them only if you insert them in ERT boxes (and add the
corresponding packages, when needed, to your Document's preamble)
[1]
http://stackoverflow.com/questions/2193307/how-to-get-latex-to-hyphenate-a-word-that-contains-a-dash
Wow, that is a lot of information! Mostly, that deals with cases where you
use the word a lot. I took this to be more of a one-off sort of issue. But
I'm going to save that link....
Well, for more time-wasting typographic fun, you could also read the
following SX question [1]. Look in particular at the answer from "Lover of
Structure" One of the highest ranked). Best explanation I have ever found
of the difference between hyphen and en-dash in compound words.


Cheers,

S.

[1] http://tex.stackexchange.com/questions/3819/dashes-vs-vs
--
__________________________________________________
Stefano Franchi

***@gmail.com <***@tamu.edu>
http://stefano.cleinias.org
Jerry
2014-09-03 23:15:19 UTC
Permalink
Post by Jerry
I have a fancy hyphenated word, crosstalk-cancelled, where I spell it with (I believe) the proper - which is an n-dash. When this is rendered in the vicinity of a line wrap, the entire thing gets pushed to the next line, leaving a lot of ugly white space in the first line. So I inserted a hyphenation point after the -. This shows on the LyX screen as sort of -- which is my original n-dash and a shorter blue dash, probably supposed to represent a hyphen. This is all great, but when this version is rendered, the line break now appears after crosstalk--, that is, both the n-dash _and_ the hyphenation point are rendered which looks very wrong. What is the typographer's say on this, and is LyX doing the right thing. Also, is this a LyX problem or a TeX problem? My guess the typographer would say, let the n-dash stand alone if it occurs at a line break.
Jerry
Thanks for all your kind responses.

I need to clear up this thread for a few reasons.

I started it with a muddle-headed premise--that the n-dash is appropriately used in places such as crosstalk-cancelled; it is not. A hyphen should be used there. I've known this since grammar school and for some reason a bit in my brain flipped (bit rot's a bitch) a couple months ago and I started doing it wrong. So the best thing would be to ignore this whole thread. However...

LyX, apparently like LaTeX and I suppose TeX, denotes the hyphen as an actual hyphen -, the n-dash as two hyphens --, and the m-dash as three hyphens ---. When entered this way in LyX, line breaking, if necessary, happens as expected, after the hyphen or dash. However...

Something curious happens on my computer which is a Macintosh. I don't know if it happens on other computers but it would be interesting to know. (Hint.) Specifically, on Macs the n-dash is entered with Option-hyphen and the m-dash with Shift-Option-hyphen; this has been the case since 1984 and my fingers know it well. The LyX documentation says that the - -- --- method should be used. (It does not say _not_ to do the Mac-like thing.) Being contrary (and a newish LyX user) I tried the traditional Mac way, and it works--the desired character is displayed on the LyX window and also is rendered correctly in printed output. So that is the habit I continued for working in LyX. Therein lies my problem. Even though the traditional Mac entry method displays correctly on-screen and in-print, the n- and m-dash so entered DO NOT ALLOW LINE BREAKS. And that's why I wrote.

Is this worth a request ticket--to make these alternate entry methods compatible with LyX?

Jerry

Some remedial reading for me:
http://www.dashhyphen.com/
http://en.wikipedia.org/wiki/Dash
Rich Shepard
2014-09-03 23:27:54 UTC
Permalink
Post by Jerry
Something curious happens on my computer which is a Macintosh. I don't
know if it happens on other computers but it would be interesting to know.
(Hint.)
Jerry,

On linux running on Intel and AMD processors the only way to enter a
hyphen, n-dash, and m-dash is to use -, --, and ---. Never had a problem
with incorrect line breaks with any of 'em over the years.

Rich

Loading...