From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/3337 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: multi-column spread control (was Re: beginner's questions) Date: Tue, 14 Nov 2000 16:49:12 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20001114164912.01ae3ab0@pop.wxs.nl> References: <20001112113730.1EF2A2317E@client44-3.kabela.oprit.rug.nl> <3.0.6.32.20001113103749.01cafc00@pop.wxs.nl> <3.0.6.32.20001113181723.015ed100@pop.wxs.nl> <3.0.6.32.20001114084903.01544100@pop.wxs.nl> <3.0.6.32.20001114151329.01870250@pop.wxs.nl> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035394074 16139 80.91.224.250 (23 Oct 2002 17:27:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:27:54 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Ed L Cashin In-Reply-To: Xref: main.gmane.org gmane.comp.tex.context:3337 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:3337 At 09:49 AM 11/14/00 -0500, Ed L Cashin wrote: >Hans Hagen writes: > >> Kind of, either by multiple output per page or by making a page n times as >> high as possible and then splitting. A painful programming process, >> especially if you want spacing okey. >> >> \input tufte >> >> \startcolumns >> \input tufte >> \stopcolumns >> >> \input tufte >> >> is far from trivial. > >Yes, I remember you saying that. Is the problem with balancing >columns something like this: > >given a sequence of vboxes and vglue with infinite stretchability, >arrange the little vboxes into two big vboxes such that ... > > - the two big vboxes have equal height > > - the following distance must be the same for the two big > vboxes: the distance from the top of the big vbox to the > bottom of the last little vbox in the big vbox > >So the trick is to do something like what tex does with pagination, >but I don't know what that is ... maybe ... > > put as many little vboxes into big vbox 1 as will fit > > discard glue after the last little vbox in big vbox 1 > > put as many little vboxes into big vbox 2 as will fit > > discard glue after the last little vbox in big vbox 2 > > evaluate for penalty and re-try if necessary > >The glue between the little vboxes in each big vbox will expand, and >the bottoms of the columns (big vboxes) will certainly align. > >Is that the kind of problem it is? Right, something \newdimen\naturalvsize \naturalvsize=10cm \vsize=2\naturalvsize \hsize=10cm \def\Split% {\setbox0=\vsplit255 to \naturalvsize \setbox0=\vbox to \naturalvsize{\unvbox0} % left column \setbox2=\vsplit255 to \naturalvsize \setbox2=\vbox to \naturalvsize{\unvbox2} % right column \shipout{\hbox{\box0\hskip1em\box2} % page \unvbox255 } % leftovers \output{\Split} plus compensations plus test plus balancing plus nightmares Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------