ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with two columns on a page
@ 2009-03-12 15:56 Jelle Huisman
       [not found] ` <49BA873E.20603@wxs.nl>
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Huisman @ 2009-03-12 15:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
       [not found] ` <49BA873E.20603@wxs.nl>
@ 2009-03-13 17:26   ` Jelle Huisman
  2009-03-13 18:19     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Huisman @ 2009-03-13 17:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
  2009-03-13 17:26   ` Jelle Huisman
@ 2009-03-13 18:19     ` Hans Hagen
  2009-03-13 18:39       ` Jelle Huisman
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2009-03-13 18:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
  2009-03-13 18:19     ` Hans Hagen
@ 2009-03-13 18:39       ` Jelle Huisman
  2009-03-13 19:20         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Huisman @ 2009-03-13 18:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
  2009-03-13 18:39       ` Jelle Huisman
@ 2009-03-13 19:20         ` Hans Hagen
  2009-03-13 19:25           ` Marcin Borkowski
  2009-03-13 20:23           ` Jelle Huisman
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2009-03-13 19:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
  2009-03-13 19:20         ` Hans Hagen
@ 2009-03-13 19:25           ` Marcin Borkowski
  2009-03-13 20:23           ` Jelle Huisman
  1 sibling, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2009-03-13 19:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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)
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: problem with two columns on a page
  2009-03-13 19:20         ` Hans Hagen
  2009-03-13 19:25           ` Marcin Borkowski
@ 2009-03-13 20:23           ` Jelle Huisman
  1 sibling, 0 replies; 7+ messages in thread
From: Jelle Huisman @ 2009-03-13 20:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2009-03-13 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 15:56 problem with two columns on a page Jelle Huisman
     [not found] ` <49BA873E.20603@wxs.nl>
2009-03-13 17:26   ` Jelle Huisman
2009-03-13 18:19     ` Hans Hagen
2009-03-13 18:39       ` Jelle Huisman
2009-03-13 19:20         ` Hans Hagen
2009-03-13 19:25           ` Marcin Borkowski
2009-03-13 20:23           ` Jelle Huisman

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).