[tex-eplain] column breaks in eplain

Karl Berry karl at freefriends.org
Fri Feb 8 20:05:02 CET 2013


Hi James - back in last October (message below for context) you reported
a problem with \columnfill in Eplain.  Indeed, it was completely broken,
failing to take into account one of the new internal fudge parameters,
namely \@col at extraheight (introduced to fix other bugs), causing the
wrong column breaks that you noted.

Although essentially all of the double-column stuff has been rewritten
since I looked at it last, I tried to fix it anyway.  Your example
works, anyway.  Clearly this will only impact documents that use
\columnfill.  I'm sure plenty of double-column bugs remain and always
will ...

The patch below adds one line (\advance\temp at dimen by -\@col at extraheight)
and changes some comments.  I plan to make a new release with this and
other fixes within a few days.  Any testing is welcome.

Thanks,
Karl

--- eplain.tex	(revision 19)
+++ eplain.tex	(working copy)
@@ -3255,11 +3255,12 @@
 \newdimen\temp at dimen
 \def\columnfill{%
   \par
-  \dimen@=\pagetotal   % The height of the text set so far. 
-  \temp at dimen = \vsize % = \@numcolumns * columnheight
-  \divide\temp at dimen by \@numcolumns % find out column height
+  \dimen@ = \pagetotal  % The height of the text so far. 
+  \temp at dimen = \vsize  % = \@numcolumns * columnheight
+  \advance\temp at dimen by -\@col at extraheight
+  \divide\temp at dimen by \@numcolumns  % Compute column height
   \loop
-    \ifdim \dimen@ > \temp at dimen
+    \ifdim \dimen@ > \temp at dimen  % more material than a column?
       \advance \dimen@ by -\temp at dimen
       \advance \dimen@ by \topskip % fudge factor
   \repeat


Date: Tue, 9 Oct 2012 12:04:55 +0100
From: James Mckernon <jmckernon at gmail.com>
To: <tex-eplain at tug.org>
Subject: [tex-eplain] column breaks in eplain

Hi all,

I'm new to TeX and experimenting with eplain's columns feature, but I
don't seem to be able to get column breaks to work as expected. An
example:

\input eplain
\hsize 188mm \vsize 188mm
\hoffset 5mm \voffset 5mm
\nopagenumbers
\doublecolumns
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
\columnfill
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
\hrule
\bye

I would expect the two lorem ipsum paragraphs to be side-by-side, in
the two columns on the first page. Instead, the last line of the first
column gets forced into the top of the second column, which seems to
force the second paragraph onto the next page. This doesn't seem
specific to this example - however I try, \columnfill seems to pull
the last line of the paragraph into the next column.

Any advice for how to fix this?

Gratefully,
J


More information about the tex-eplain mailing list