🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #83

Re: Knuth's "list.tex".

#83
From: Geoffrey Tobin
Date: Thu, 29 Oct 1992 09:54
26 lines
1660 bytes
Hmm, after studying the listing of "list.tex", via

    tex list list.tex \\end

I think I can answer my own query.

The file names on the command line are treated as input text.
Normally, TeX would treat them as words in a single one-line
paragraph, but "list.tex" arranges that they be treated as separate
paragraphs.  Here's how.

When TeX starts reading the first filename, that's the start of a
paragraph, so \everypar causes "\grabfile" to be used.  "\grabfile"
uses the filename as its argument #1, then uses "\setbox=\lastbox"
to remove the paragraph indentation (see TeXbook (1986), p 222).
The "\endgraf" in "\grabfile" ends the paragraph, ready for the next
filename to start the next paragraph.  The final thing done for each
filename is to pass it to "\doit" to typeset its file's listing.

Btw, the "\\" before "end" on the command line is because Knuth works
mainly on a unix system (eg, labrea.stanford.edu), for which the
typical command shell interprets "\\" as a single "\".  On many other
operating systems with other command interpreters, eg DOS with
"command.com", a single "\" is all that need be typed.  True?

Geoffrey Tobin
Technical Details
Message-ID: <1992Oct29.095411.7186@lugb.latrobe.edu.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!ucsvc.ucs.unimelb.edu.au!lugb!luxor.latrobe.edu.au!ecsgrt
References: <1992Oct29.090557.7007@lugb.latrobe.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!ucsvc.ucs.unimelb.edu.au!lugb!luxor.latrobe.edu.au!ecsgrt
Newsgroups: comp.text.tex
Subject: Re: Knuth's "list.tex".
Message-ID: <1992Oct29.095411.7186@lugb.latrobe.edu.au>
From: ecsgrt@luxor.latrobe.edu.au (Geoffrey Tobin)
Date: Thu, 29 Oct 1992 09:54:11 GMT
Sender: news@lugb.latrobe.edu.au (USENET News System)
References: <1992Oct29.090557.7007@lugb.latrobe.edu.au>
Organization: La Trobe University
Lines: 26