Re: [NTG-context] Orphans/Widows in the Index
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
participants (1)
-
Jan Tosovsky