From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87846 Path: news.gmane.org!not-for-mail From: "Jan Tosovsky" Newsgroups: gmane.comp.tex.context Subject: Re: Orphans/Widows in the Index Date: Wed, 25 Jun 2014 22:38:15 +0200 Message-ID: <5720.52742722935$1403728721@news.gmane.org> References: <001901cf5f26$3e1a2310$ba4e6930$@tosovsky@email.cz> <009301cf8f15$97925ab0$c6b71010$@tosovsky@email.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1403728721 21824 80.91.229.3 (25 Jun 2014 20:38:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2014 20:38:41 +0000 (UTC) To: "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 25 22:38:36 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wztxi-00053H-Gr for gctc-ntg-context-518@m.gmane.org; Wed, 25 Jun 2014 22:38:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 072FC1027C for ; Wed, 25 Jun 2014 22:38:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DsXVj40Bdb3b for ; Wed, 25 Jun 2014 22:38:33 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8EF4510225 for ; Wed, 25 Jun 2014 22:38:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 04A8A101E6 for ; Wed, 25 Jun 2014 22:38:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EdyHuooFTkcF for ; Wed, 25 Jun 2014 22:38:20 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 6E62F101E2 for ; Wed, 25 Jun 2014 22:38:15 +0200 (CEST) Original-Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s5PKcEEc023374 for ; Wed, 25 Jun 2014 22:38:14 +0200 Original-Received: from edge03.upcmail.net ([192.168.13.238]) by viefep19-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20140625203813.VIES12994.viefep19-int.chello.at@edge03.upcmail.net> for ; Wed, 25 Jun 2014 22:38:13 +0200 Original-Received: from emk ([89.176.47.7]) by edge03.upcmail.net with edge id JkeD1o01M09JAWp03keD8L; Wed, 25 Jun 2014 22:38:13 +0200 X-SourceIP: 89.176.47.7 In-Reply-To: <009301cf8f15$97925ab0$c6b71010$@tosovsky@email.cz> X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac9fJiBf5IlKuFDURZyHKjFEje/JVAv7MRxQAGebJ9A= Content-Language: cs X-Bayes-Prob: 0.005 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=62.179.121.39; country=AT; latitude=47.3333; longitude=13.3333; http://maps.google.com/maps?q=47.3333,13.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WMiICeDm - ff4ef353034b - 20140625 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87846 Archived-At: On 2014-06-23 Jan Tosovsky wrote: > On 2014-04-23 Jan Tosovsky wrote: > > > > in my auto-generated two column index (registry) there are > > several cases of widows - it is the last item of the given > > letter which overflows to next column/page: > > > > --------------- (start page) ------- > > Usti 29 (! alone !) > > > > V > > Vamberk 18 > > ... > > ... > > > > > > There are also few cases of orphans, but this is not so strange: > > ... > > ... > > Josef 29 > > > > K > > Karel 69 (! alone !) > > ---------------- (end page) --------- > > > > I think both cases could be eliminated by establishing a new constraint > to the 'key letter': > (1) There must be 0 or at least 3 lines at the beginning of the > page/column before the Key letter. > (2) There must be at least 2 lines after the Key letter. > > Can this be somehow set in my source file? > I've found the corresponding code in strc-reg.mkiv: \setvalue{\??registerindicator a}#1% {\registerparameter\c!before % bugged, why does leftskip gets set: \vskip\lineheight\goodbreak\vskip-\lineheight \begingroup \useregisterstyleandcolor\c!style\c!color \dontleavehmode \strut \iflocation \dosetdirectpagereference{\currentregister:\v!section:#1}% \fi \registerparameter\c!command{#1}% \endgroup \blank[\v!samepage]% \registerparameter\c!after \par \nobreak} That (2) case can be fixed by a small change: \testcolumn[3]\registerparameter\c!command{#1}% But when tested on this MWE, you can see a drawback - the first letter (p) starts always on the second line (not on the first one): \setupregister[balance=yes] \starttext \index{primary+secondary+tertiary} \index[primary long]{\dorecurse{5}{primary long }} \index[primary longer]{\dorecurse{5}{primary longer }} \input{tufte} \completeindex \stoptext Can this issue somehow be eliminated? Tested on the last beta (with my patch). That (1) case is still open. I have no idea how to accomplish something like this using (Con)TeX(t) syntax :-( Thanks, Jan ___________________________________________________________________________________ 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 ___________________________________________________________________________________