Re: [NTG-context] About Hyphenation

2013-07-25 Thread Hans Hagen

On 7/25/2013 3:24 AM, Andres Conrado Montoya wrote:

So, it seems that this configuration worked (more or less), to avoid:
Widows, Orphans, 3 or more consecutive hyphens, and final hyphens.

  \startsetups[grid][correcto]
\setups[*reset]
 \setpenalties\widowpenalties{1}{1}
 \setpenalties\clubpenalties{1}{1}
\stopsetups

\doublehyphendemerits=3
\finalhyphendemerits=3
\adjdemerits=1
\brokenpenalty1\relax


we occasionally have to use such high values due to publishers demands 
but keep in mind that the solution space becomes pretty small, so if the 
rest of the output looks less optimal: don't complain (personally for me 
it's always the moment that i try to hide the fact that tex is used)


automated typesetting fulfilling all constraints is in most cases (read: 
always) impossible so among the options are: inject an occasional manual 
pagebreak (once the context is fixed) or adapt the content in real nasty 
cases


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
___


Re: [NTG-context] About Hyphenation

2013-07-24 Thread Andres Conrado Montoya
Thanks, Marco. That seems to work with final hyphens.
Why this does not work instead?: \setpenalties\brokenpenalties{1}{1}
I have tried both, but your solution works better.

Andrés Conrado Montoya
___
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
___

Re: [NTG-context] About Hyphenation

2013-07-24 Thread Wolfgang Schuster

Am 24.07.2013 um 20:22 schrieb Andres Conrado Montoya andresconr...@gmail.com:

 Thanks, Marco. That seems to work with final hyphens.
 Why this does not work instead?: \setpenalties\brokenpenalties{1}{1} 
 I have tried both, but your solution works better. 

How about a example for us!

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
___


Re: [NTG-context] About Hyphenation

2013-07-24 Thread Marco Patzer
On 2013–07–24 Wolfgang Schuster wrote:

 How about a example for us!

\starttext

%% \brokenpenalty1\relax
\setpenalties\brokenpenalties{1}{1}

\dorecurse{4}{\input knuth}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Atvero eosetaccusam etjustoduodolores etearebum.
Stetclita kasdgubergren, noseatakimatasanctusest.

\stoptext

Apparently \brokenpenalty is not supposed to be used with
\setpenalties, see spac-ver.mkiv :

\setpenalties\widowpenalties\plustwo\maxdimen
\setpenalties\clubpenalties \plustwo\maxdimen
 \brokenpenalty \maxdimen

Actually I don't yet know what's the deal with the \setpenalties
command and why it's used for some penalties and not for others.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] About Hyphenation

2013-07-24 Thread Wolfgang Schuster

Am 24.07.2013 um 20:54 schrieb Marco Patzer home...@lavabit.com:

 Apparently \brokenpenalty is not supposed to be used with
 \setpenalties, see spac-ver.mkiv :
 
\setpenalties\widowpenalties\plustwo\maxdimen
\setpenalties\clubpenalties \plustwo\maxdimen
 \brokenpenalty \maxdimen
 
 Actually I don't yet know what's the deal with the \setpenalties
 command and why it's used for some penalties and not for others.

You have to differ between the \…penalty command which come
from Knuths TeX and \…penalties which are introduced with etex.

While Knuths command accept only a single value (e.g. \widowpenlty=1000)
the new commands accepts multiple values which are taken for individual
lines of a paragraph (e.g. \widowpenalties 3 3000 4500 9000).

The \setpenalties command simplifies the setups of the new commands.

The reason why \widowpenalties doesn’t work with \setpenalties is that
no command with this names exist (I never checked this for my example
in the past). A penalties command wouldn’t even make sense because
the penalty prevents only the page break after a hyphen.

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
___


Re: [NTG-context] About Hyphenation

2013-07-24 Thread Marco Patzer
On 2013–07–24 Wolfgang Schuster wrote:

  Apparently \brokenpenalty is not supposed to be used with
  \setpenalties, see spac-ver.mkiv :
  
 \setpenalties\widowpenalties\plustwo\maxdimen
 \setpenalties\clubpenalties \plustwo\maxdimen
  \brokenpenalty \maxdimen
  
  Actually I don't yet know what's the deal with the \setpenalties
  command and why it's used for some penalties and not for others.
 
 You have to differ between the \…penalty command which come
 from Knuths TeX and \…penalties which are introduced with etex.
 
 While Knuths command accept only a single value (e.g. \widowpenlty=1000)
 the new commands accepts multiple values which are taken for individual
 lines of a paragraph (e.g. \widowpenalties 3 3000 4500 9000).

I learned something new today.

 The \setpenalties command simplifies the setups of the new commands.

Combined with the aforementioned new knowledge, this totally makes
sense.

 The reason why \widowpenalties doesn’t work with \setpenalties is that
 no command with this names exist (I never checked this for my example
 in the past).

I couldn't find the definition neither in the TeXbook, nor the
ConTeXt sources. That's why. Thanks for the explanation.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] About Hyphenation

2013-07-24 Thread Andres Conrado Montoya
So, it seems that this configuration worked (more or less), to avoid:
Widows, Orphans, 3 or more consecutive hyphens, and final hyphens.

 \startsetups[grid][correcto]
  \setups[*reset]
\setpenalties\widowpenalties{1}{1}
\setpenalties\clubpenalties{1}{1}
\stopsetups

\doublehyphendemerits=3
\finalhyphendemerits=3
\adjdemerits=1
\brokenpenalty1\relax

Thank you all for your time.

Andrés Conrado Montoya
___
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
___

Re: [NTG-context] About Hyphenation

2013-07-23 Thread Marco Patzer
On 2013–07–23 Andres Conrado Montoya wrote:

 \setupalign[verytolerant,stretch,lesshyphenation,hz,hanging]

From my experience, stretch often leads to rather terrible spacing.
I avoid it if wherever I can.

 1. Is there any definitive way of avoiding […] hyphens at the end of a page?

The penalty \brokenpenalty tells TeX how bad it is to break a page at a
hyphen.

  \brokenpenalty1\relax


Marco


signature.asc
Description: Digital signature
___
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
___