Groups | Search | Server Info | Login | Register


Groups > comp.programming.literate > #21

Re: [?] Two Column Output in CWEB

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!labrador.cs.tufts.edu!not-for-mail
From "Aaron W. Hsu" <arcfide@sacrideo.us>
Newsgroups comp.programming.literate
Subject Re: [?] Two Column Output in CWEB
Date Sun, 2 Oct 2011 23:57:12 -0400 (EDT)
Organization Indiana University
Lines 43
Sender nr@labrador.cs.tufts.edu
Approved Litprog auto-moderator <litprog-admin@cs.virginia.edu>
Message-ID <j6bbqo$ci$1@labrador.cs.tufts.edu> (permalink)
References <sfid-h-20110930-214704-+14.00-1@multi.osbf.lua> <j65rf0$m39$1@labrador.cs.tufts.edu> <sfid-H-20111001-153204-+35.15-1@multi.osbf.lua> <j67prl$j2u$1@labrador.cs.tufts.edu> <sfid-H-20111002-175704-+45.48-1@multi.osbf.lua> <j6amnh$jhe$1@labrador.cs.tufts.edu> <sfid-H-20111002-235703-+44.09-1@multi.osbf.lua>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net R4gZ9rVDBvLJO3CMS5aaBC+kQLatJ8/UUV69fZ5BQIc6cRJJGNVkmO+oUb8jhL6ii8Xa9Bij5ZStLk5BgJAvyA==
NNTP-Posting-Date Mon, 3 Oct 2011 03:57:13 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="jyvnSgBI3GgJFWbuRLKgR65dovk5FqOhQ0TjYCsOIHA5jrw/dTm/Ez0dWjIw5sijp9jIQaA8BVVn6ELyXvvSEa3evbvR8V8HN5eU1hJgEGcQ7IYXR2p+X3RQcDtsO8/e"; mail-complaints-to="abuse@albasani.net"
Errors-To /dev/null
Cancel-Lock sha1:gwO3d3QWn1Z8zLp751GI1/FogTg=
Xref x330-a1.tempe.blueboxinc.net comp.programming.literate:21

Show key headers only | View raw


On Sun, 02 Oct 2011 17:57:05 -0400, Robert Hartmann  
<Robert_Hartmann@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 <arcfide@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!

	Aaron W. Hsu

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

Back to comp.programming.literate | Previous | NextPrevious in thread | Find similar


Thread

[?] Two Column Output in CWEB "Aaron W. Hsu" <arcfide@sacrideo.us> - 2011-09-30 21:47 -0400
  Re: [?] Two Column Output in CWEB "Aaron W. Hsu" <arcfide@sacrideo.us> - 2011-10-01 15:32 -0400
    Re: [?] Two Column Output in CWEB Robert Hartmann <Robert_Hartmann@gmx.net> - 2011-10-02 17:57 -0400
      Re: [?] Two Column Output in CWEB "Aaron W. Hsu" <arcfide@sacrideo.us> - 2011-10-02 23:57 -0400

csiph-web