Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[?] Two Column Output in CWEB

9 views
Skip to first unread message

Aaron W. Hsu

unread,
Sep 30, 2011, 9:47:12 PM9/30/11
to
Does anyone here know how to get two column output in CWEB?

Aaron W. Hsu

--
Programming is just another word for the lost Art of Thinking.

Aaron W. Hsu

unread,
Oct 1, 2011, 3:32:05 PM10/1/11
to
On Fri, 30 Sep 2011 21:47:12 -0400, Aaron W. Hsu <arc...@sacrideo.us>
wrote:

> Does anyone here know how to get two column output in CWEB?

I figured out that I can extract elements from the cwebmac.tex file to
accomplish what I want, since the index is two columns. With some
adjustment to that macro, I am able to get the effect for which I was
hoping.

Robert Hartmann

unread,
Oct 2, 2011, 5:57:05 PM10/2/11
to
Hi Aaron,

just for the archive:

Am 01.10.2011 21:32, schrieb Aaron W. Hsu:
> On Fri, 30 Sep 2011 21:47:12 -0400, Aaron W. Hsu <arc...@sacrideo.us>
> wrote:
>
>> Does anyone here know how to get two column output in CWEB?
>
> I figured out that I can extract elements from the cwebmac.tex file to
> accomplish what I want, since the index is two columns. With some
> adjustment to that macro, I am able to get the effect for which I was
> hoping.

Can you please write your your agjustments?

Best regards,
Robert Hartmann

Aaron W. Hsu

unread,
Oct 2, 2011, 11:57:12 PM10/2/11
to
On Sun, 02 Oct 2011 17:57:05 -0400, Robert Hartmann
<Robert_...@gmx.net> wrote:

> Am 01.10.2011 21:32, schrieb Aaron W. Hsu:
>> On Fri, 30 Sep 2011 21:47:12 -0400, Aaron W. Hsu <arc...@sacrideo.us>
>> wrote:
>>
>>> Does anyone here know how to get two column output in CWEB?
>>
>> I figured out that I can extract elements from the cwebmac.tex file to
>> accomplish what I want, since the index is two columns. With some
>> adjustment to that macro, I am able to get the effect for which I was
>> hoping.
>
> Can you please write your your agjustments?

Here's what I put at the top of my web:

%%% I want two column output. This is taken from chezwebmac.tex.
%%% See the license information on that file.
% \def\page{\box255 } \normalbottom
\output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi
\global\setbox\sbox=\page \global\pagesavedtrue}
\pagesavedfalse \eject % eject the page-so-far and predecessors
\setbox\sbox\vbox{\unvbox\sbox} % take it out of its box
\vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height
\hsize=.5\pagewidth \advance\hsize by -10pt
% column width for the index (20pt between cols)
\parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
\def\lr{L} % this tells whether the left or right column is next
\output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R}
\else\normaloutput{\vbox to\pageheight{\box\sbox\vss
\hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader
\global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
%\parskip 0pt plus .5pt
%\rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar

Hope that is useful to someone!

0 new messages