ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* revisited: ligatures and hyphenation
@ 2001-09-15 14:09 Eckhart Guthöhrlein
  2001-09-17  8:21 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Eckhart Guthöhrlein @ 2001-09-15 14:09 UTC (permalink / raw)


A few weeks ago, I asked for the best method to prevent a ligature while 
allowing hyphenation at this point as well as before and after in the same 
word. (like "| which german latex users will probably know)
At the end, Hans gave me this:

\definetextmodediscretionary *
   {\prewordbreak\discretionary{-}{}{\kern.05em}\postwordbreak}
\startlanguagespecifics[de]
   \installcompoundcharacter "| {|*|}
\stoplanguagespecifics

I was pleased and started using it, but now I noticed a problem. If you say 
e.g. Auf"|lage, there can be a line break after 'Auf' without hyphen. The 
reason became clear after having a look at supp-lan.tex and the texbook. 
The above definition is equivalent to

\definetextmodediscretionary *
   {\penalty10000\hskip0pt\relax
    \discretionary{-}{}{\kern.05em}%
    \penalty0\penalty10000\hskip0pt\relax}

So, there can be a line break at \penalty0, in which case there will be no 
hyphen dash and the kern will disappear. So, for those interested, I would 
propose

\definetextmodediscretionary *
   {\prewordbreak\discretionary{-}{}{\kern.05em}\prewordbreak}

-- 
Eckhart


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

* Re: revisited: ligatures and hyphenation
  2001-09-15 14:09 revisited: ligatures and hyphenation Eckhart Guthöhrlein
@ 2001-09-17  8:21 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2001-09-17  8:21 UTC (permalink / raw)
  Cc: ConTeXt mailing list

At 04:09 PM 9/15/2001 +0200, Eckhart Guthöhrlein wrote:

>So, there can be a line break at \penalty0, in which case there will be no 
>hyphen dash and the kern will disappear. So, for those interested, I would 
>propose
>
>\definetextmodediscretionary *
>   {\prewordbreak\discretionary{-}{}{\kern.05em}\prewordbreak}

if this works well on you examples, let me know and i will change it

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

end of thread, other threads:[~2001-09-17  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-15 14:09 revisited: ligatures and hyphenation Eckhart Guthöhrlein
2001-09-17  8:21 ` Hans Hagen

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).