[comp.text.tex] begindoublecolumns , enddoublecolumns - is there a bug?

eao@point.mps.ohio-state.edu (Ed Overman) (11/02/90)

You may remember that I have been asking about strange things like "fun" fonts
(which I found at the Clarement archive in xhershey) and have gotten some help
from people on the net - for which I am very grateful.  My latest problem still
has to do with my crossword puzzle.  I want the clues underneath it to be in
double columns.  I used the macro from eplain.tex and had some problems with
it and so I went back to the original macros, \begindoublecolumns and
\enddoublecolumns, in Appendix E on page 417 (9th printing).  I pulled over
the macros from the (I think) current edition of the TeXbook from our
distribution tape - and I still have the same problem.  It seems to me that
there is a bug in the code.  The problem is the output routine \balancecolumns.
This is called when double columns ends (i.e., \enddoublecolumns is called).
The problem occurs if the other output routine \doublecolumnout (which is
called when a page is ejected in the middle of double columns) is never called.
For example suppose that \vsize=7in and that some text is to be broken up into
two pieces.  (The actual size is 44pc but I don't think in those units.)  The
first piece is 5in long and is to be single column.  The second piece is 3in
long and is to be double column.  When \begindoublecolumns is called there
are 5in of text in \box255 which is put into \partialpage and \box255 is
cleared.  \vsize is set to 14in and TeX continues.  When \enddoublecolumns
is called \ht\box255 = 6in and it is broken up into two vboxes each of height
~3in which are \box0 and \box2 .  \pagesofar is then called and \partialpage
unboxes \partialpage and hboxes \box0 and \box2 side by side.  However this
is 8in long!  \output then puts the first 5in on one page with HUGE separation
between lines and puts the hbox on the next page complaining all the while
about overfull and underfull boxes.  One solution is to check in
\enddoublecolumns and see if there is over an entire page of material.  If so
work on it, output it, and then generate the partial page.  It seems to me
that it should be possible to set \pagetotal in \begindoublecolumns to take
into account \partialpage - but I have not been able to do that correctly.  I
am afraid that I have not studied the page generation in sufficient detail to
be able to use these macros well.  If anyone has a nice fix please let me know.
                                      Thanks, Ed Overman