Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/plain/misc/wlist.tex

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% Makes a landscape listing of one or more files with wide lines
% Typical usage:
% tex list *.c \\end

\hsize=9in
\vsize=6.5in
\special{landscape}

\def\grabfile#1 {\setbox0=\lastbox\endgraf\doit{#1}}
\everypar{\grabfile}

\font\filenamefont= cmtt8 scaled\magstep3
\font\headlinefont= cmr8
\font\listingfont= cmtex8
\font\eoffont= cmti8

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\newcount\m \newcount\n
\n=\time \divide\n 60 \m=-\n \multiply\m 60 \advance\m \time
\def\hours{\twodigits\n\twodigits\m}
\def\twodigits#1{\ifnum #1<10 0\fi \number#1}

\newlinechar=`@
\message{@\today\space at \hours}

\baselineskip=9pt
\medskipamount=4pt minus 1pt
\raggedbottom
\nopagenumbers

\chardef\other=12
\def\doit#1{\message{@Listing #1@}
  \begingroup \everypar{} \frenchspacing
  \headline{\filenamefont#1\quad\headlinefont \today\ at \hours
      \hfill Page \folio}
  \def\do##1{\catcode`##1=\other}\dospecials
  \catcode127=\other \catcode9=\other \catcode12=\other
  \parindent 0pt \parfillskip=0pt plus 1fil minus 1in
  \everypar{\hangindent 1in} \rightskip=0pt plus 2in
  \def\par{\ifvmode\penalty-500\medskip\else\endgraf\fi}
  \listingfont \obeylines \obeyspaces \global\pageno=1
  \input #1 {\eoffont(end of\/ file)}\endgraf\vfill\eject\endgroup}
{\obeyspaces\global\let =\ }
\catcode`\_=\other % allow _ in file names

% A tab (^^I) prints as lowercase gamma.
% Character ^^M could be made visible, with a bit of work;
% at present, it's indistinguishable from newline (^^J).

% You can get up to 170 characters on a line without an overfull box.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.