<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%Contents:Bordered table macro as introduced at EuroTeX '92 with some mods.
%Version: December 1993.
%Purpose: Typeset bordered tables, abstracting from separators,
%         and separation data proper from first row and column.
%Example of use
%\def\capbtbl{AT\&amp;T Common Stock}
%\def\header{Year\cs Price\cs Dividend}
%\def\footer{* (first quarter only}
%\def\data{1971\cs 41--54\cs\llap{\$}2.60\rs
%             2\cs 41--54\cs         2.70}%et cetera
%$$\flr\btable\data\qquad\framed\ruled\btable\data$$
%Documentation: Proceedings EuroTeX '92, Prague, and MAPS 92.2.
%Macro:
%C.G. van der Laan, Hunzeweg 57, 9893PB, Garnwerd. Holland. 05941-1525.
%btable.tex version 1, 17/7/92                 author: cgl@risc1.rug.nl
\newbox\tbl\let\ea=\expandafter
%Cell vertical size, row height and depth (separation implicit),
\newdimen\cvsize\newdimen\tsht\newdimen\tsdp\newdimen\tvsize\newdimen\thsize
%Parameter setting macros:   Rules
\def\hruled{\def\lineglue{\hrulefill}\def\colsep{}      \def\rowsep{\hrule}
   \let\rowstbsep=\colsep\let\headersep=\rowsep}
\def\vruled{\def\lineglue{\hfil}     \def\colsep{\vrule}\def\rowsep{}
   \let\rowstbsep=\colsep\let\headersep=\hrule}
\def\ruled {\def\lineglue{\hrulefill}\def\colsep{\vrule}\def\rowsep{\hrule}
   \let\rowstbsep=\colsep\let\headersep=\rowsep}
\def\nonruled{\def\lineglue{\hfil}   \def\colsep{}      \def\rowsep{}
   \def\rowstbsep{\vrule}\def\headersep{\hrule}}
\def\dotruled{\def\lineglue{\dotfill}\def\rowsep{\hbox to\thsize{\dotfill}}
\def\colsep{\lower1.5\tsdp\vbox to\cvsize{%
\leaders\hbox to0pt{\vrule height2pt depth2pt width0pt\hss.\hss}\vfil}}
\let\rowstbsep=\colsep\let\headersep=\rowsep}
%Parameter setting macros:   Controling positioning
\def\ctr{\def\lft{\hfil}\def\rgt{\hfil}}%Centered
\def\fll{\def\lft{}     \def\rgt{\hfil}}%Flushed left
\def\flr{\def\lft{\hfil}\def\rgt{}}     %Flushed right
%Parameter setting macros:   Framing
\def\framed{\let\frameit=\boxit}
\def\nonframed{\def\frameit##1{##1}}
\def\dotframed{\let\frameit=\dotboxit}
%
\def\btable#1{\vbox{\let\rsl=\rowstblst%Copy
\ifx\empty\template\ifx\empty\rowstblst
    \def\template{\colsepsurround\lft####\rgt&amp;&amp;\lft####\rgt\cr}
    \else\def\template{\colsepsurround####\hfil&amp;&amp;\lft####\rgt\cr}\fi
   \fi
\tsht=.775\cvsize\tsdp=.225\cvsize
\def\tstrut{\vrule height\tsht depth\tsdp width0pt}
%Logical mark up of column and row separators, via use of
\def\cs{&amp;\colsepsurround\colsep\colsepsurround&amp;}
\def\prs{&amp;\colsepsurround\lineglue&amp;}   \def\srp{&amp;\lineglue\colsepsurround&amp;}
\def\rs{\colsepsurround\tstrut\cr
        \ifx\empty\rowsep\else\noalign{\rowsep}\fi
        \ifx\empty\rowstblst\else\ea\nxtrs\fi}
\def\grs{\colsepsurround\tstrut\cr\ghostrow}
\def\rss{&amp;\colsepsurround\rowstbsep\colsepsurround&amp;}
\def\hs{\colsepsurround\tstrut\cr
       \ifx\empty\headersep\else\noalign{\headersep}\fi
       \ifx\empty\rowstblst\else\ea\nxtrs\fi}
\preinsert
\setbox\tbl=\vbox{\tabskip=0pt\relax\offinterlineskip
\halign{\span\template\ifx\empty\first\ifx\empty\rowstblst\else
\ifx\empty\header\else\ea\rss\fi\fi\else\first\ea\rss\fi
\ifx\empty\header\ifx\empty\first\if\empty\rsl\else\ea\nxtrs\fi
                 \else\ea\hs\fi
\else\header\ea\hs\fi
#1\colsepsurround\tstrut\crcr}    }                              %end \setbox
\postinsert
\ifx\capbtbl\empty\else\hbox to\thsize{\strut\hfil\capbtbl\hss}\captionsep\fi
\frameit{\copy\tbl}
\ifx\footer\empty\else\footersep\hbox{\vtop{\noindent\hsize=\thsize%
\footer}}\fi                     }}                              %end \btable
%Defaults
\cvsize=4ex\tsht=.775\cvsize\tsdp=.225\cvsize\def\colsepsurround{\kern.5em}
\def\capbtbl{}\def\first{}\def\header{}\def\rowstblst{}\def\footer{}\def\data{}
\def\captionsep{\medskip}    \def\headersep{\hrule}
\def\footersep{\smallskip}   \def\rowstbsep{\vrule}
\def\preinsert{}
\def\postinsert{\global\thsize=\wd\tbl
                \global\tvsize=\ht\tbl\global\advance\tvsize by\dp\tbl}
\ctr\nonruled\nonframed\def\template{}\def\ghostrow{}            %end Defaults
%Auxiliaries
\def\boxit#1{\vbox{\hrule\hbox{\vrule\vbox{#1}\vrule}\hrule}}
\def\dotboxit#1{\vbox{\offinterlineskip\hbox to\thsize{\dotfill}%
\hbox{\lower\tsdp\vbox to\tvsize{%
\leaders\hbox to0pt{\hss\vrule height2pt depth2pt width0pt.\hss}\vfil}%
\vbox{#1}\lower\tsdp\vbox to\tvsize{%
\leaders\hbox to0pt{\hss\vrule height2pt depth2pt width0pt.\hss}\vfil}}%
\hbox to\thsize{\dotfill}}}
%And to account for logical columns with \logmultispan
%\def\spicspan{\span\omit}
\def\logmultispan#1{\omit\mscount=#1\multiply\mscount by2 \advance\mscount by-1
\loop\ifnum\mscount&gt;1 \spicspan\advance\mscount by-1 \repeat}
%To process FIFO, Mod 1993
%\def\fifo#1{\ifx\ofif#1\ofif\else\process#1\fi\fifo}
%\def\ofif#1\fifo{\fi}
%\def\process#1{\hbox to0pt{\hss#1\hss}\kern.5ex}
%To handle the row stub list: \rsl
\def\nxtrs{\ifx\empty\rsl%\let\nxtel=\relax
\else\def\nxtel{\ea\nrs\rsl\srn}\ea\nxtel\fi}%next Row Stub
\def\nrs#1#2\srn{\gdef\rsl{#2}#1\rss}
%History of changes
%Dec 93: \multispan name changed into \logmultispan  (logical multispan)
%        name \caption changed into \capbtbl (no conflicts within LaTeX)
%%%%btable end%%%%                         %end btable.tex, cgl@risc1.rug.nl
%
\bgroup
\def\capbtbl{AT\&amp;T Common Stock}
\def\header{Year\cs Price\cs Dividend}
\def\footer{* (first quarter only}
\def\data{1971\cs 41--54\cs\llap{\$}2.60\rs
             2\cs 41--54\cs         2.70}%et cetera
$$\flr\btable\data\qquad\framed\ruled\btable\data$$
\egroup
%
\def\data{PD                  \cs licensed via UNIX\rs
all platforms                 \cs under UNIX       \rs
\TeX book  (also on-line)     \cs On-line manual   \rs
METAfont's CM, virtual fonts  \cs ?                \rs
open system                   \cs kernel undocumented}
%
\def\header{(All)\TeX\cs T/Di-roff}
\def\rowstblst{{Costs}{Availability}{Documentation}{Fonts}{{Design}}}
                                    %Weird these extra {}  ^      ^
\def\capbtbl{Troff versus \TeX/METAfont}
$$\fll\btable\data$$
\bye


</pre></body></html>