ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Hyphenation of composed words
@ 2010-04-16 14:46 Marco
  2010-04-16 21:33 ` Hans Hagen
  2010-04-19  5:57 ` Thomas Floeren
  0 siblings, 2 replies; 12+ messages in thread
From: Marco @ 2010-04-16 14:46 UTC (permalink / raw)
  To: ntg-context

Hi,

I've yet another hyphenation problem. I cannot get proper hyphenation in
composed words. Take this MWE:

\setuplayout [width=1.5cm]
\starttext

composed-word\par	% not hyphenated, as expected
composed||word\par	% wrong: hyphenated, but an en-dash is used,
			% not a hyphen, so [sign=wide] seems to be the default
composed|-|word\blank	% wrong: hyphenated, but the hyphen is at the start of
			% the next line

\setuphyphenmark [sign=normal]	% For hyphenation a hyphen is used,
				% not an endash
composed-word\par	% not hyphenated, as expected
composed||word\par	% wrong: hyphen is at the start of the next line
composed|-|word		% wrong: hyphen is at the start of the next line
\blank[2*line]

\setbreakpoints [compound]	% my workaround
composed-word\par	% correct hyphenation behaviour with hyphen

\stoptext

I hope with the comments the problem is clear. At first the default value for
»sign« is wrong. It has to be »normal«. But with »normal« I cannot get the
hyphen at the end of the line, instead it always appeares at the beginning of
the next line.

The workaround works but has the disadvantage that everything is hyphenated,
everywhere. I prevent this at the moment by using bars:
|not-a-composed-word|

Thanks in advance
Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-04-16 14:46 Hyphenation of composed words Marco
@ 2010-04-16 21:33 ` Hans Hagen
  2010-04-16 22:16   ` Marco
  2010-05-09 19:34   ` Marco
  2010-04-19  5:57 ` Thomas Floeren
  1 sibling, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2010-04-16 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco

On 16-4-2010 4:46, Marco wrote:
> Hi,
>
> I've yet another hyphenation problem. I cannot get proper hyphenation in
> composed words. Take this MWE:

a mix up of settings .. fized in next beta


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-04-16 21:33 ` Hans Hagen
@ 2010-04-16 22:16   ` Marco
  2010-05-09 19:34   ` Marco
  1 sibling, 0 replies; 12+ messages in thread
From: Marco @ 2010-04-16 22:16 UTC (permalink / raw)
  To: ntg-context

> > I've yet another hyphenation problem. I cannot get proper
> > hyphenation in composed words. Take this MWE:
> 
> a mix up of settings .. fized in next beta
Thank you.


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-04-16 14:46 Hyphenation of composed words Marco
  2010-04-16 21:33 ` Hans Hagen
@ 2010-04-19  5:57 ` Thomas Floeren
  2010-04-19 18:37   ` Marco
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Floeren @ 2010-04-19  5:57 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Marco <> wrote on Friday, April 16, 2010 4:46 PM:

> Hi,
> 
> I've yet another hyphenation problem. I cannot get proper hyphenation
> in 
> composed words. Take this MWE:
> 
> \setuplayout [width=1.5cm]
> \starttext
> 
> composed-word\par	% not hyphenated, as expected
> composed||word\par	% wrong: hyphenated, but an en-dash is used,
> 			% not a hyphen, so [sign=wide] seems to be the default
> composed|-|word\blank	% wrong: hyphenated, but the hyphen is at the
> 			start of % the next line
> 
> \setuphyphenmark [sign=normal]	% For hyphenation a hyphen is used,
> 				% not an endash
> composed-word\par	% not hyphenated, as expected
> composed||word\par	% wrong: hyphen is at the start of the next line
> composed|-|word		% wrong: hyphen is at the start of the next line
> \blank[2*line]
> 
> \setbreakpoints [compound]	% my workaround
> composed-word\par	% correct hyphenation behaviour with hyphen
> 
> \stoptext
> 
> I hope with the comments the problem is clear. At first the default
> value for »sign« is wrong. It has to be »normal«. But with »normal« I
> cannot get the 
> hyphen at the end of the line, instead it always appeares at the
> beginning of 
> the next line.
> 

At the moment I use \def\compoundhyphen{-} instead of \setuphyphenmark.
It seems to work (mkii).

Thomas




> The workaround works but has the disadvantage that everything is
> hyphenated, everywhere. I prevent this at the moment by using bars:
>> not-a-composed-word|
> 
> Thanks in advance
> Marco
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an
> entry to the Wiki! 
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
> http://www.pragma-ade.nl / http://tex.aanhet.net 
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-04-19  5:57 ` Thomas Floeren
@ 2010-04-19 18:37   ` Marco
  0 siblings, 0 replies; 12+ messages in thread
From: Marco @ 2010-04-19 18:37 UTC (permalink / raw)
  To: ntg-context

> > I hope with the comments the problem is clear. At first the default
> > value for »sign« is wrong. It has to be »normal«. But with »normal«
> > I cannot get the 
> > hyphen at the end of the line, instead it always appeares at the
> > beginning of 
> > the next line.
> > 
> 
> At the moment I use \def\compoundhyphen{-} instead of
> \setuphyphenmark. It seems to work (mkii).
> 
> Thomas
Yes, it works also in MKIV. This is a better workaround than mine. But
Hans said he'll fix it next beta. So I hope I'll not need it.
Nevertheless thanks for this snippet. It produces exactly the behaviour
I expect.

Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-04-16 21:33 ` Hans Hagen
  2010-04-16 22:16   ` Marco
@ 2010-05-09 19:34   ` Marco
  2010-05-10  3:25     ` Wolfgang Schuster
  1 sibling, 1 reply; 12+ messages in thread
From: Marco @ 2010-05-09 19:34 UTC (permalink / raw)
  To: ntg-context

> On 16-4-2010 4:46, Marco wrote:
> > Hi,
> >
> > I've yet another hyphenation problem. I cannot get proper
> > hyphenation in composed words. Take this MWE:
> 
> a mix up of settings .. fized in next beta
Hi Hans,

the following code still produces an en dash instead of a hyphen.

\setuplayout [width=1.5cm]
\starttext
composed||word\par % produces an en dash

\def\compoundhyphen{-}
composed||word\par % workaroud from Thomas, produces hyphen
\stoptext

Using
ConTeXt  ver: 2010.05.08

Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-09 19:34   ` Marco
@ 2010-05-10  3:25     ` Wolfgang Schuster
  2010-05-10  5:27       ` Marco
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2010-05-10  3:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 09.05.10 21:34, schrieb Marco:
>> On 16-4-2010 4:46, Marco wrote:
>>      
>>> Hi,
>>>
>>> I've yet another hyphenation problem. I cannot get proper
>>> hyphenation in composed words. Take this MWE:
>>>        
>> a mix up of settings .. fized in next beta
>>      
> Hi Hans,
>
> the following code still produces an en dash instead of a hyphen.
>
> \setuplayout [width=1.5cm]
> \starttext
> composed||word\par % produces an en dash
>
> \def\compoundhyphen{-}
> composed||word\par % workaroud from Thomas, produces hyphen
> \stoptext
>    

1. || does *not* produce a en-dash but to kerned hyphens

2. The correct method to get a *normal* hyphen is

    \setuphyphenmark[sign=normal]

    If the output is not correct it's a bug.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-10  3:25     ` Wolfgang Schuster
@ 2010-05-10  5:27       ` Marco
  2010-05-10  8:12         ` Hans Hagen
  2010-05-10  8:17         ` Thomas Floeren
  0 siblings, 2 replies; 12+ messages in thread
From: Marco @ 2010-05-10  5:27 UTC (permalink / raw)
  To: ntg-context

> 1. || does *not* produce a en-dash but to kerned hyphens
You're right, I looked it up in the sources. It just looked like an
en-dash for me. But this is wrong. For hyphenation a hyphen is used. The
font designer has created a dedicated glyph for this purpose. And two
hyphens (or an en-dash) is too large. I've never seen the advice in a
typography book to kern two hyphens. I don't know why this is
implemented like this.

> 2. The correct method to get a *normal* hyphen is
> 
>     \setuphyphenmark[sign=normal]
> 
Yes, this is the correct method. It should be enabled by default. If
somebody wants a larger hyphen (for some mysterious reasen), he/she can set it
up with

\setuphyphenmark[sign=wide]

>     If the output is not correct it's a bug.
Yes, it is a bug. Hans already confirmed and said, he'll fix it, but it is not
yet done, that's why I wanted to remember him. You can try and run the example
from my first post. With Thomas' workaround the output is OK, but it is only a
workaround. I (and probably many other users) would like to have correct
behaviour by default.

Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-10  5:27       ` Marco
@ 2010-05-10  8:12         ` Hans Hagen
  2010-05-10 15:26           ` Marco
  2010-05-10  8:17         ` Thomas Floeren
  1 sibling, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2010-05-10  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco

On 10-5-2010 7:27, Marco wrote:
>> 1. || does *not* produce a en-dash but to kerned hyphens
> You're right, I looked it up in the sources. It just looked like an
> en-dash for me. But this is wrong. For hyphenation a hyphen is used. The
> font designer has created a dedicated glyph for this purpose. And two
> hyphens (or an en-dash) is too large. I've never seen the advice in a
> typography book to kern two hyphens. I don't know why this is
> implemented like this.

because we needed it to be this way: we use it for separating compound 
words and then we want to have the hyphen between the compounds to be 
different from the ones within ... dates back more than ten years 
(educational usage) .. also, the reason for kerned hyphens instead of an 
endash is simple: the endash is too thin (at least in lm)

anyhow, when i want normal hyphens i just do |-| always

>> 2. The correct method to get a *normal* hyphen is
>>
>>      \setuphyphenmark[sign=normal]
>>
> Yes, this is the correct method. It should be enabled by default. If
> somebody wants a larger hyphen (for some mysterious reasen), he/she can set it
> up with
>
> \setuphyphenmark[sign=wide]
>
>>      If the output is not correct it's a bug.
> Yes, it is a bug. Hans already confirmed and said, he'll fix it, but it is not
> yet done, that's why I wanted to remember him. You can try and run the example
> from my first post. With Thomas' workaround the output is OK, but it is only a
> workaround. I (and probably many other users) would like to have correct
> behaviour by default.

this works ok here (and i'm prety sure that it's also ok a few betas ago)

\starttext

test||test

\setuphyphenmark[sign=normal]

test||test

test|-|test

\stoptext

and the defaults are unlikely to change, but you can set it in your 
local cont-sys.tex file

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-10  5:27       ` Marco
  2010-05-10  8:12         ` Hans Hagen
@ 2010-05-10  8:17         ` Thomas Floeren
  2010-05-10 15:54           ` Marco
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Floeren @ 2010-05-10  8:17 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Marco <> wrote on Monday, May 10, 2010 7:27 AM:

>> 1. || does *not* produce a en-dash but to kerned hyphens
> You're right, I looked it up in the sources. It just looked like an
> en-dash for me. But this is wrong. For hyphenation a hyphen is used.
> The 
> font designer has created a dedicated glyph for this purpose. And two
> hyphens (or an en-dash) is too large. I've never seen the advice in a
> typography book to kern two hyphens. I don't know why this is
> implemented like this.
> 
>> 2. The correct method to get a *normal* hyphen is
>> 
>>     \setuphyphenmark[sign=normal]
>> 
> Yes, this is the correct method. It should be enabled by default. If
> somebody wants a larger hyphen (for some mysterious reasen), he/she
> can set it 
> up with
> 
> \setuphyphenmark[sign=wide]
> 

It seems that the en-dash *can* be used in English in some cases:
'high-priority--high-pressure tasks' from http://en.wikipedia.org/wiki/Hyphen


>>     If the output is not correct it's a bug.
> Yes, it is a bug. Hans already confirmed and said, he'll fix it, but
> it is not 
> yet done, that's why I wanted to remember him. You can try and run
> the example from my first post. With Thomas' workaround the output is
> OK, but it is only a workaround. I (and probably many other users)
> would like to have correct 
> behaviour by default.
> 

Concerning the hyphen sign, '\setuphyphenmark[sign=normal]' works as expected
on my system (= normal hyphen sign).
But it was (is?) not usable because, in case of a line break, the hyphen
sometimes was placed at the beginning of a new line.
With '\def\compoundhyphen{-}' the compound hyphen breaks correctly.

Thomas

> Marco
> 
> 
>
______________________________________________________________________________
_____
> If your question is of interest to others as well, please add an
> entry to the Wiki! 
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
> http://www.pragma-ade.nl / http://tex.aanhet.net 
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
______________________________________________________________________________
_____



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-10  8:12         ` Hans Hagen
@ 2010-05-10 15:26           ` Marco
  0 siblings, 0 replies; 12+ messages in thread
From: Marco @ 2010-05-10 15:26 UTC (permalink / raw)
  To: ntg-context

> > You're right, I looked it up in the sources. It just looked like an
> > en-dash for me. But this is wrong. For hyphenation a hyphen is
> > used. The font designer has created a dedicated glyph for this
> > purpose. And two hyphens (or an en-dash) is too large. I've never
> > seen the advice in a typography book to kern two hyphens. I don't
> > know why this is implemented like this.
> 
> because we needed it to be this way: we use it for separating
> compound words and then we want to have the hyphen between the
> compounds to be different from the ones within
That's not how it is done in everyday typography, seems to be more a
border case.

> .. also, the reason for kerned hyphens instead of an endash is simple:
> the endash is too thin (at least in lm)
That's true. The en-dash is condiderably thinner.

> this works ok here (and i'm prety sure that it's also ok a few betas
> ago)
> 
> \starttext
> 
> test||test
> 
> \setuphyphenmark[sign=normal]
> 
> test||test
> 
> test|-|test
> 
> \stoptext
Sure, my fault. This works. There _was_ a bug with the hyphen appearing
on the start of the next line. This is fixed. Thank you. I thought you
would also fix the »wrong« hyphenation sign, so I didn't check, just
assumed that both issues aren't fixed. So

\setuphyphenmark[sign=normal]

works now as expected (even if it's not the default). Thanks for this
fix.

> and the defaults are unlikely to change, but you can set it in your 
> local cont-sys.tex file
Ah, I see. I was not aware of a user configuration file (wiki helps how
to set it up I just looked). So I can put my »personal« default hyphen
there.

Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Hyphenation of composed words
  2010-05-10  8:17         ` Thomas Floeren
@ 2010-05-10 15:54           ` Marco
  0 siblings, 0 replies; 12+ messages in thread
From: Marco @ 2010-05-10 15:54 UTC (permalink / raw)
  To: ntg-context

> It seems that the en-dash *can* be used in English in some cases:
> 'high-priority--high-pressure tasks' from
> http://en.wikipedia.org/wiki/Hyphen
I see. But this is a --more or less-- contructed case where using an
en-dash instead of a hyphen makes sense. I agree with this example, the
en-dash clearifies things.

But for general purpose the hyphen is used and not the en-dash. And I
think the typesetting system should be set up to fit the general
purpose. (Hans has a different opinion, I know.)

BTW: If the appearance of the hyphen is unsatisfying it is better to
choose a different font (or hyphen from a different font) or maybe to
»correct« the font instead of altering settings of the typesetting
system.

> Concerning the hyphen sign, '\setuphyphenmark[sign=normal]' works as
> expected on my system (= normal hyphen sign).
> But it was (is?) not usable because, in case of a line break, the
> hyphen sometimes was placed at the beginning of a new line.
You're right. I mixed things up. My fault. It always produced the right
sign. And the bug is fixed (Thanks Hans!). So you can use

\setuphyphenmark[sign=normal]

again in your cont-sys.tex ;-)

> With '\def\compoundhyphen{-}' the compound hyphen breaks correctly.
Not needed any more.

Marco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-05-10 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16 14:46 Hyphenation of composed words Marco
2010-04-16 21:33 ` Hans Hagen
2010-04-16 22:16   ` Marco
2010-05-09 19:34   ` Marco
2010-05-10  3:25     ` Wolfgang Schuster
2010-05-10  5:27       ` Marco
2010-05-10  8:12         ` Hans Hagen
2010-05-10 15:26           ` Marco
2010-05-10  8:17         ` Thomas Floeren
2010-05-10 15:54           ` Marco
2010-04-19  5:57 ` Thomas Floeren
2010-04-19 18:37   ` Marco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).