ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* About Hyphenation
@ 2013-07-23 21:28 Andres Conrado Montoya
  2013-07-23 22:07 ` Marco Patzer
  0 siblings, 1 reply; 9+ messages in thread
From: Andres Conrado Montoya @ 2013-07-23 21:28 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 3042 bytes --]

Hi List, I am very grateful with you all. Thanks for all the teaching.
Sorry if the message is too long.

I have read in several places that the commands \doublehyphendemerits and
\finalhyphendemerits are not a "real" way of dealing with the design issue
of too many hyphens in a row and/or avoiding a hyphen at the end of a page.
I have found that \doublehyphendemerits just avoids TWO hyphens in a row,
but not three or four, etc., and \finalhyphendemerits just doesn't work. I
have read the code, the wiki, the mail list, and the manuals, but with no
success yet. I'm working with grid, and using a widow/orphan control macro
found here on this list:

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

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

\doublehyphendemerits=20000
\finalhyphendemerits=20000

\setuplayout
[backspace=10.3ex,
width=62ex,
 topspace=10.3ex,
height=124ex,
header=1em,
headerdistance=1em,
 footer=1em,
footerdistance=2em,
margindistance=1em,
 grid=yes,
setups=correcto]
********************************************

As a book designer, one of my dreams is migrate all my work to ConTeXt, and
stop using adobe products; I think ConTeXt is a very good design tool.
However, this obstacle is frustrating that dream in part. I know that you
may say "this hyphenation issue is a matter of taste! is not important!"
but all the publishers I have worked with in the last 15 years have
emphasized that rule over and over again. I'm Colombian, so, I design books
mainly in spanish, and in spanish editions is a very common rule to avoid
more than 2 hyphens in a row. I understand that there are similar rules in
french, and I have read some discussions about it, but mostly the thread
finishes with something similar to "use ragged right align and forget
hyphens" (see http://www.mail-archive.com/ntg-context@ntg.nl/msg68899.html).

So, questions are:
1. Is there any definitive way of avoiding 2 or more hyphens on a row AND
hyphens at the end of a page?
2. If is not, and it seems that is not (see
http://latex-community.org/know-how/latex/55-latex-general/475-e-tex#line-breaking)
how
do you manage? Do you just let hyphens be? Do you avoid hyphens using
\unhyphenated or \mbox by hand? No problem, if it's the standard solution,
but I think there should be some mechanism to avoid (n+) hyphens on a row,
something like \maxadjhyphens[2]. Is this impossible / too difficult? If it
is, I'm sorry for bothering you. I just really want to work with ConTeXt. I
have done a couple books for myself, to learn, but I want to take this into
production, and this single issue, so insignificant you may see it, is very
important for me, and I'm sure that other designers would find it very
important too.

Thank you all for your time.

Andrés Conrado Montoya

[-- Attachment #1.2: Type: text/html, Size: 4338 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: About Hyphenation
  2013-07-23 21:28 About Hyphenation Andres Conrado Montoya
@ 2013-07-23 22:07 ` Marco Patzer
  0 siblings, 0 replies; 9+ messages in thread
From: Marco Patzer @ 2013-07-23 22:07 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 427 bytes --]

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.

  \brokenpenalty10000\relax


Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: About Hyphenation
  2013-07-25  1:24 Andres Conrado Montoya
@ 2013-07-25  7:49 ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2013-07-25  7:49 UTC (permalink / raw)
  To: ntg-context

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}{10000}
>      \setpenalties\clubpenalties{1}{10000}
> \stopsetups
>
> \doublehyphendemerits=30000
> \finalhyphendemerits=30000
> \adjdemerits=10000
> \brokenpenalty10000\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
___________________________________________________________________________________


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

* Re: About Hyphenation
@ 2013-07-25  1:24 Andres Conrado Montoya
  2013-07-25  7:49 ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Andres Conrado Montoya @ 2013-07-25  1:24 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 456 bytes --]

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}{10000}
    \setpenalties\clubpenalties{1}{10000}
\stopsetups

\doublehyphendemerits=30000
\finalhyphendemerits=30000
\adjdemerits=10000
\brokenpenalty10000\relax

Thank you all for your time.

Andrés Conrado Montoya

[-- Attachment #1.2: Type: text/html, Size: 754 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: About Hyphenation
  2013-07-24 19:15     ` Wolfgang Schuster
@ 2013-07-24 19:34       ` Marco Patzer
  0 siblings, 0 replies; 9+ messages in thread
From: Marco Patzer @ 2013-07-24 19:34 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1308 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: About Hyphenation
  2013-07-24 18:54   ` Marco Patzer
@ 2013-07-24 19:15     ` Wolfgang Schuster
  2013-07-24 19:34       ` Marco Patzer
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2013-07-24 19:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 24.07.2013 um 20:54 schrieb Marco Patzer <homerow@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
___________________________________________________________________________________


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

* Re: About Hyphenation
  2013-07-24 18:44 ` Wolfgang Schuster
@ 2013-07-24 18:54   ` Marco Patzer
  2013-07-24 19:15     ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Patzer @ 2013-07-24 18:54 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --]

On 2013–07–24 Wolfgang Schuster wrote:

> How about a example for us!

\starttext

%% \brokenpenalty10000\relax
\setpenalties\brokenpenalties{1}{10000}

\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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

* Re: About Hyphenation
  2013-07-24 18:22 Andres Conrado Montoya
@ 2013-07-24 18:44 ` Wolfgang Schuster
  2013-07-24 18:54   ` Marco Patzer
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2013-07-24 18:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 24.07.2013 um 20:22 schrieb Andres Conrado Montoya <andresconrado@gmail.com>:

> Thanks, Marco. That seems to work with final hyphens.
> Why this does not work instead?: \setpenalties\brokenpenalties{1}{10000} 
> 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
___________________________________________________________________________________


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

* Re: About Hyphenation
@ 2013-07-24 18:22 Andres Conrado Montoya
  2013-07-24 18:44 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Andres Conrado Montoya @ 2013-07-24 18:22 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 208 bytes --]

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

Andrés Conrado Montoya

[-- Attachment #1.2: Type: text/html, Size: 299 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2013-07-25  7:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23 21:28 About Hyphenation Andres Conrado Montoya
2013-07-23 22:07 ` Marco Patzer
2013-07-24 18:22 Andres Conrado Montoya
2013-07-24 18:44 ` Wolfgang Schuster
2013-07-24 18:54   ` Marco Patzer
2013-07-24 19:15     ` Wolfgang Schuster
2013-07-24 19:34       ` Marco Patzer
2013-07-25  1:24 Andres Conrado Montoya
2013-07-25  7:49 ` 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).