Hi, I'm typesetting a dictionary using \startcolumns[n=2,balance=yes] to get balanced columns. I have 26 balanced columns with simple headers in between and a lot of situations with two columns on one page. (see example). As long as the number of lines of the first columns (AA) is fewer than a certain value around 20 the next columns (BB) will be placed on the same page, but if there are more lines from the first columns they push the second columns to the next page. Is there a way to control this behavior, I would like to be able to keep this second columns starting on this page even if there are only 5 lines of text available for it. (using MkII) \starttext \showgrid \startalignment[center] AA \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{40}{a a a a a a a a a a a a a a a a a a a a a } % << this works %\dorecurse{42}{a a a a a a a a a a a a a a a a a a a a a } % << this pushes columns (BB) to the next page \stopcolumns \startalignment[center] BB \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{100}{b b b b b b b b b b b b b b b b b b b b } \stopcolumns \stoptext Thanks, Jelle
Jelle Huisman wrote:
Hi,
I'm typesetting a dictionary using \startcolumns[n=2,balance=yes] to get balanced columns. I have 26 balanced columns with simple headers in between and a lot of situations with two columns on one page. (see example). As long as the number of lines of the first columns (AA) is fewer than a certain value around 20 the next columns (BB) will be placed on the same page, but if there are more lines from the first columns they push the second columns to the next page. Is there a way to control this behavior, I would like to be able to keep this second columns starting on this page even if there are only 5 lines of text available for it. (using MkII)
\starttext \showgrid
\startalignment[center] AA \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{40}{a a a a a a a a a a a a a a a a a a a a a } % << this works %\dorecurse{42}{a a a a a a a a a a a a a a a a a a a a a } % << this pushes columns (BB) to the next page \stopcolumns
\startalignment[center] BB \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{100}{b b b b b b b b b b b b b b b b b b b b } \stopcolumns
\stoptext
the problem is that the paragraph is larger than two columns and that's tricky to handle without too much messing around (i'll redo the balancer in mkiv once i've arrived at it; i see where the catch takes place but i'd rather not touch the mkii code now) so, what you can do is trigger the otr before columns end add \penalty\outputpenalty just before \stopcolumns (ok, might hav eother side effects Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
the problem is that the paragraph is larger than two columns and that's tricky to handle without too much messing around (i'll redo the balancer in mkiv once i've arrived at it; i see where the catch takes place but i'd rather not touch the mkii code now)
so, what you can do is trigger the otr before columns end
add \penalty\outputpenalty just before \stopcolumns
(ok, might hav eother side effects
It does indeed not do what I expected. One final try: is there some sort of setting for the number of lines allowed in a column that triggers the OTR, so that I could tweak that? Or is it hard coded and will it break everything? Thanks, Jelle
Jelle Huisman wrote:
Hans Hagen wrote:
the problem is that the paragraph is larger than two columns and that's tricky to handle without too much messing around (i'll redo the balancer in mkiv once i've arrived at it; i see where the catch takes place but i'd rather not touch the mkii code now)
so, what you can do is trigger the otr before columns end
add \penalty\outputpenalty just before \stopcolumns
(ok, might hav eother side effects
It does indeed not do what I expected. One final try: is there some sort of setting for the number of lines allowed in a column that triggers the OTR, so that I could tweak that? Or is it hard coded and will it break everything?
where did you put the penalty? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Jelle Huisman wrote:
Hans Hagen wrote:
the problem is that the paragraph is larger than two columns and that's tricky to handle without too much messing around (i'll redo the balancer in mkiv once i've arrived at it; i see where the catch takes place but i'd rather not touch the mkii code now)
so, what you can do is trigger the otr before columns end
add \penalty\outputpenalty just before \stopcolumns
(ok, might hav eother side effects
It does indeed not do what I expected. One final try: is there some sort of setting for the number of lines allowed in a column that triggers the OTR, so that I could tweak that? Or is it hard coded and will it break everything?
where did you put the penalty?
Right before \stopcolumns, as you suggested. \starttext \showgrid \startalignment[center] AA \stopalignment\blank \startcolumns[n=2,balance=yes] %\dorecurse{40}{a a a a a a a a a a a a a a a a a a a a a } % << this works \dorecurse{42}{a a a a a a a a a a a a a a a a a a a a a } % << this pushes columns (BB) to the next page \penalty\outputpenalty \stopcolumns \startalignment[center] BB \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{100}{b b b b b b b b b b b b b b b b b b b b } \stopcolumns \stoptext Jelle
Jelle Huisman wrote:
Hans Hagen wrote:
Jelle Huisman wrote:
Hans Hagen wrote:
the problem is that the paragraph is larger than two columns and that's tricky to handle without too much messing around (i'll redo the balancer in mkiv once i've arrived at it; i see where the catch takes place but i'd rather not touch the mkii code now)
so, what you can do is trigger the otr before columns end
add \penalty\outputpenalty just before \stopcolumns
(ok, might hav eother side effects
It does indeed not do what I expected. One final try: is there some sort of setting for the number of lines allowed in a column that triggers the OTR, so that I could tweak that? Or is it hard coded and will it break everything?
where did you put the penalty?
Right before \stopcolumns, as you suggested.
\starttext \showgrid
\startalignment[center] AA \stopalignment\blank \startcolumns[n=2,balance=yes] %\dorecurse{40}{a a a a a a a a a a a a a a a a a a a a a } % << this works \dorecurse{42}{a a a a a a a a a a a a a a a a a a a a a } % << this pushes columns (BB) to the next page \penalty\outputpenalty \stopcolumns
\startalignment[center] BB \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{100}{b b b b b b b b b b b b b b b b b b b b }
\penalty\outputpenalty
\stopcolumns
\stoptext
Jelle ___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans, I've read in this thread that you're going to work on columns some day. Could you pay some attention to multicolumn itemizations? Currently they *must* be [packed], which is a serious restriction for me (I can put some struts, but it's not very comfortable nor elegant...) Regards -- Marcin Borkowski (http://mbork.pl)
Hans Hagen wrote:
\starttext \showgrid \startalignment[center] AA \stopalignment\blank \startcolumns[n=2,balance=yes] %\dorecurse{40}{a a a a a a a a a a a a a a a a a a a a a } % << this works \dorecurse{42}{a a a a a a a a a a a a a a a a a a a a a } % << this pushes columns (BB) to the next page \penalty\outputpenalty \stopcolumns \startalignment[center] BB \stopalignment\blank \startcolumns[n=2,balance=yes] \dorecurse{100}{b b b b b b b b b b b b b b b b b b b b }
\penalty\outputpenalty
\stopcolumns \stoptext
The "B" columns still start at the seond page :-( Jelle
participants (3)
-
Hans Hagen
-
Jelle Huisman
-
Marcin Borkowski