Re: [NTG-context] About Hyphenation
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
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
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
Am 24.07.2013 um 20:54 schrieb Marco Patzer : > 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
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
Am 24.07.2013 um 20:22 schrieb 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. 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
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
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 ___
[NTG-context] About Hyphenation
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}{1} \setpenalties\clubpenalties{1}{1} \setpenalties\brokenpenalties{1}{2} \stopsetups \doublehyphendemerits=2 \finalhyphendemerits=2 \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 ___ 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 ___