\documentstyle[euro92]{article}% 27 Aug 92 %Version 2. Copyright: C.G. van der Laan, cgl@rug.nl, 05941-1525 \textheight23.5cm\textwidth15.5cm\topmargin0cm \evensidemargin1cm \oddsidemargin1cm \setlength{\textheight}{23.5cm}\setlength{\textwidth}{15.5cm} \setlength{\topmargin}{0cm} \setlength{\evensidemargin}{1cm}\setlength{\oddsidemargin}{1cm} \begin{document} % Hunzeweg 57, 9893PB, Garnwerd \textheight23.5cm\textwidth15.5cm\topmargin0cm \evensidemargin1cm \oddsidemargin1cm \setlength{\textheight}{23.5cm}\setlength{\textwidth}{15.5cm} \setlength{\topmargin}{0cm} \setlength{\evensidemargin}{1cm}\setlength{\oddsidemargin}{1cm} \title{Table Diversions\thanks{Different from proceedings Euro\TeX\ 92 in the encoding of FIFO.}} \titlehead{Table Diversions} \author{Kees van der Laan}%\thanks{} \authorhead{Kees van der Laan} \affiliation{Hunzeweg 57, 9893PB, Garnwerd, The Netherlands, 05941--1525; cgl@rug.nl.} \date{} \maketitle \overfullrule=0pt \def\dash{--}\def\Dash{---}\def\fiverm{\tiny}\def\sevenrm{\small} \def\DeK{D\lower.5ex\hbox{E}K} \catcode`\@=11 \def\@evenfoot{\rm\hfil\thepage}\let\@oddfoot=\@evenfoot \catcode`\@=12 %\input btable.tex %btable.tex version 1, 17/7/92 author: cgl@rug.nl \newbox\tbl\let\ea=\expandafter\let\nx=\noexpand %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&&\lft####\rgt\cr} \else\def\template{\colsepsurround####\hfil&&\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{&\colsepsurround\colsep\colsepsurround&} \def\prs{&\colsepsurround\lineglue&} \def\srp{&\lineglue\colsepsurround&} \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{&\colsepsurround\rowstbsep\colsepsurround&} \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\caption\empty\else\hbox to\thsize{\strut\hfil\caption\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\caption{}\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 \logmsp \def\spicspan{\span\omit} \def\logmsp#1{\omit\mscount=#1\multiply\mscount by2 \advance\mscount by-1 \loop\ifnum\mscount>1 \spicspan\advance\mscount by-1 \repeat} %To process FIFO \def\fifo#1{\ifx\ofif#1\ofif\fi\process{#1}\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} %end btable.tex % \begin{abstract} \noindent Characteristics of existing table macro collections are given. A kaleidoscope of tables---as next best to a taxonomy---is presented. Newly introduced is the class of bordered tables. Variations in print---ruled, nonruled, framed, nonframed, dotted, centered, flushed---can be obtained via the invoke of parameter setting macros; no modification of user mark up. Simultaneous row and column spans, partial rules, and dotted lines are dealt with. The listing of the macro \verb|\btable|, with auxiliaries, is included. \end{abstract} \begin{keywords}(Bordered) Tables, framed and non-framed, ruled and non-ruled, simultaneous row and columns spans, partial rules, connected cells, plain \TeX, SGML, education. \end{keywords} % \section*{Introduction} The formatting of tables is considered complex, time consuming and expensive. Table making via \TeX, or \LaTeX, needs too complex descriptions for simple tables, except when the table can be formatted via \verb|\settabs|. For \verb|\halign| use, there is no default template provided by plain. The $\langle X\rangle$\TeX\ macros I have seen, don't reflect the logical structure of the table. An apparently simple change of representation, for example from a ruled into a non-ruled, or from a framed into a non-framed table, requires in \TeX, and \LaTeX, some non-negligible effort. \\[.5ex] Therefore, there is a need for an easy to use macro on top of plain's powerful \verb|\|$\langle X\rangle$\verb|halign|-s, which accounts for the structure of the table. \\[.5ex] Characteristics of existing table macros are given in the Existing \TeX\ Table Packages section. %\\[.5ex] In the Kaleidoscope section an anthology of tables is presented. Peculiar are the deterministic tables, and the tables which update memory. The section ends with the bordered table model. %\\[.5ex] In the Bordered Table section the macro and examples of use are given. %\\[.5ex] In the Blocks section %the problems of blocks and connected cells are dealt with. \\[.5ex] No landscape vs.\ portrait issues are discussed, nor the general use of rotated fonts. Tables which extend the page will not be discussed either. See for the latter for example supertabular.sty, \cite{taj}, or longtable.sty, \cite{dc92}. I also refrained from the issues which come from mapping the `main vertical list' onto pages, under the restriction not to split tables over page boundaries. % \section{Existing \TeX{} table packages} Cowan, \cite{rfc85}, provided a nice package in order to facilitate the formatting of simple tables. A main feature of his macros is that no template and no explicit number of columns, have to be provided. The template is created dynamically from the data and the `attributes.' This is powerful and High-\TeX\ on the one hand, but restrictive and time consuming on the other. The automatism can't be easily superseded, as opposed to a default repetitive template, which I have adopted. The functionality as demonstrated by his examples can be easily obtained via %a stripped version of the bordered table macro. \\[.5ex] Khanh, \cite{khanh90}, introduced table macros which mainly deal with complex header rows. Because I consider those complicated header rows the exception rather than the rule, and because the material is not in the public domain, I will not consider it further. \\[.5ex] Spivak, \cite{mds89}, provided some powerful macros for formatting tables separately from the main document. His merging, at the dvi level, of the formatted table into the main document, is High-\TeX. He also provided some interesting examples of simultaneous row and column spans. Good, but complex, and perhaps too advanced for daily use. It is in the public domain. \\[.5ex] Lamport, \cite{lam86}, mainly provided facilities for placing a table appropriately within the context.\footnote{As floating body, also called island by Spivak (1989).} He also developed \verb|\cline|, for partial horizontal rules, which is a powerful and a handy feature. I don't consider his way of framing nice, nor his way of specifying the ruling. \\[.5ex] Hendrickson, \cite{ah89}, has an approach similar to mine. No bordered table model, however, and less pronunciated `attributes.' \\[.5ex] There exist more table macros. Of those I had access to, the ones discussed above seemed relevant to me. Now and then visual mark up packages appear, like Type and Set, \cite{ga92}. With bars and visual mark up the table is specified on the screen, and from that \TeX\ code is generated. However useful this might be within the `conversion' of wordwhatever into \TeX\ area, I don't like the resulting \TeX\ encoding. It is clumsey. If that simple tables generate such an encoding then we are lost with really something a little more complex. Besides, the purpose of this paper is to introduce some new ways of formatting {\em simple\/} tables, next to the general accepted formatting \TeX niques. The \TeX book considers alignment the general issue. I like to approach the issue from the structure point of view, and to couple it to what is already available via plain. This work is a continuation of my earlier work on the SGML-\TeX\ relation, \cite{cgl90a}. % \section{Kaleidoscope} Some examples of special tables are given in order to illustrate the diversity. With respect to programming, the deterministic tables and the tables which update the computer memory, deserve special attention. The latter category is induced by {\em computer\/} typography. \begin{itemize} \item Pascal triangle, a deterministic table, \cite{cgl91} \par\noindent {$$\vcenter{\vbox{\small\hsize=.3\hsize $$\displaylines{1\cr 1\quad1\cr 1\quad2\quad1\cr 1\quad3\quad3\quad1\cr}$$}} \qquad\vcenter{\hbox{via}}\qquad \vcenter{\vbox{\hsize=.4\hsize\small \begin{verbatim} $$\displaylines{1\cr 1\quad1\cr 1\quad2\quad1\cr 1\quad3\quad3\quad1\cr}$$ \end{verbatim}}} $$} \item Tower of Hanoi, deterministic, \cite{cgl92a}. The process of replacement of the disks will be printed by the invoke of \verb|\hanoi|$\langle n\rangle$, $n$ an integer. No user mark up is needed. % \item Young tableaux, irregular shape, \cite{dek73}, \cite{pesw} {\small\newdimen\csize\csize=3ex \catcode`'=13\relax \newcount\cnt \def'{\global\advance\cnt1 \the\cnt} \def\data{'&'&'&'\cr'&'&'\cr'} \def\young#1{\hbox{\vrule\vtop{\hrule\offinterlineskip% \halign{&\vbox{\hbox to\csize{\strut\hss##\hss\vrule}\hrule}\cr%template #1\crcr}}}}%end \young % \qquad\young\data\qquad \def\data{7&8&9&10\cr11&13\cr16\cr}\young\data }%end scope \par\noindent via {\small\begin{verbatim} \def\young#1{\hbox{\vrule\vtop{\hrule\offinterlineskip\halign {&\vbox{\hbox to\csize{\strut\hss##\hss\vrule}\hrule}\cr#1\crcr}}}} % \def\data{'&'&'&'\cr'&'&'\cr'} \young\data\qquad \def\data{7&8&9&10\cr11&13\cr16\cr}\young\data \end{verbatim} } \noindent with auxiliaries {\small\begin{verbatim} \newdimen\csize\csize=3ex \newcount\cnt\catcode`'=13 \def'{\global\advance\cnt1 \the\cnt} \end{verbatim} } \item Much alignment occurs in typesetting mathematics: aligned equations in display, matrices, and the complex commutative diagrams. This has been dealt with elsewhere, for example \cite{dek84}, \cite{cgl91}, and \cite{mds89}. \item Crosswords: puzzle, clues and solution, \cite{cgl92b} \\ \let\ea=\expandafter {\newif\ifpuzzle \newcount\cnt\newdimen\csize\csize=3ex % \def\crw#1{\toxit{\offinterlineskip% \halign{\bcell width0pt%of strut \prc##\ecell&&\bcell\relax \prc##\ecell\cr#1}%end \halign \global\cnt0}}%end \crw % \def\toxit#1{\vtop{\hrule \hbox{\vrule\vbox{#1}\vrule} \hrule}}%end \toxit (\vtop used) % \def\bcell{\hbox to\csize\bgroup\vrule% height.8\csize depth.2\csize} \let\ecell=}%TB 385, \egroup % \def\prc#1{\if*#1\cc\else\ifx\relax#1% \cc\else%no crossed out cell \ifnum`#1=\lccode`#1\low{#1}\else% \cap{#1}\fi\fi\fi}%end \prc \def\cc{\leaders\hrule height.8\csize depth.2\csize\hfill}%end Crossed Cell \def\low#1{\ifpuzzle\null\else\hfil% \uppercase{#1}\fi\hfil}%end \low \def\cap#1{\num\ifpuzzle\null% \else\hfil#1\fi\hfil}%end \cap % \def\num{\global\advance\cnt1\relax% \vbox to.8\csize{\rlap{\kern1pt% \fiverm\the\cnt\hss}\vfil}}%end \num % %furthermore, in order to omit & and \cr %in the data (natural input) \def\markup#1{\ea\xdef\ea#1\ea{\ea% \fifol#1\ofifl}}%end \markup % {\catcode`\^^M=13 %local scope %Pick up and processing of lines \gdef\fifol#1^^M#2{\process{#1}% \ifx\ofifl#2\nx\lr\ofifl \fi\nx\rs\fifol#2}} \def\ofifl#1\ofifl{\fi} % %FIFO with lok ahead \def\fifo#1#2{#1\ifx\ofif#2\ofif \fi\nx\cs\fifo#2} \def\ofif#1\ofif{\fi} % \def\cs{&}\def\rs{\cr\noalign{\hrule}} \def\lr{\cr} % \def\process#1{\fifo#1\ofif} % %next is necessary to allow spaces %for * (except in last column) \def\bdata{\bgroup\obeylines% \obeyspaces\store} \def\store#1\edata{\egroup\def\data {#1}} {\obeyspaces\global\let =\relax} %\endinput %22/8/92 cgl@rug.nl % \bdata% P*On DEk* *n*S Edit \edata\markup\data $$\qquad\qquad\qquad\vcenter{\noindent\sevenrm\csize=3ex \puzzletrue\crw\data\parindent=5ex \vtop{\hsize=21ex\obeylines Across 2 Switch mode 3 Knuth 6 Prior to \TeX} \parindent=3ex \vtop{\hsize=25ex\obeylines Down 1 Public domain 2 All right 4 All comes to it 5 Atari type} \fiverm\csize=3ex \puzzlefalse\def\num{}\crw\data}$$ }%end local scope % \item Maze \qquad\qquad \vskip-2\baselineskip %Labyrinth via TeX, just an experiment feb 92, cgl@rug.nl %More on it in MAPS to come %Assumed is a closed rule on top and to the right %| and _ denote the rules to mark the labyrinth %Labyrinth proper \newdimen\csize \csize=3ex {\small\catcode`|=13 \def|{\vrule} \catcode`_=13 \def_{\hrulefill} $$\vcenter{ \hbox{\vtop{\offinterlineskip\hrule \halign{&\hbox to\csize {\vrule height\csize width0pt#\hfil}\cr |&_&|_& \cr &|&_& \cr |&|_&_&|\cr |_& &_&_\cr}%end \halign }\vrule%end \vbox }%end \hbox }\qquad\vcenter{\hbox{via}}\quad% \vcenter{\vtop{\small\hsize=.5\hsize \begin{verbatim} \newdimen\csize \csize=3ex \catcode`|=13 \def|{\vrule} \catcode`_=13 \def_{\hrulefill} \hbox{\vtop{\offinterlineskip\hrule \halign{&\hbox to\csize {\vrule height\csize width0pt#\hfil}\cr |&_&|_& \cr &|&_& \cr |&|_&_&|\cr |_& &_&_\cr}%end \halign }\vrule%end \vbox }%end \hbox \end{verbatim} }}$$ }%end \small \par \item Chart, \TeX book ex22.14 %but elaborated differently. {\small\newdimen\dist \dist=2\baselineskip \def\ent#1{\hbox{\vbox to 0pt {\vss\hbox to10ex{\quad\strut#1\hss} \hrule}}} \def\vl#1{\hbox{\vrule height#1\dist depth0pt}}%Vertical Line of prop. size \def\bl#1{\kern#1\dist}%BLank of prop. size %Balanced $$\qquad\offinterlineskip \vcenter{\ent{abc}} \vcenter{\ent{de} \vl2 \ent{fg}} \vcenter{\ent{hij} \vl1 \ent{klm} \bl1 \ent{nop} \vl1 \ent{qrs}} \quad%Nearly balanced tree; pruning a branch \vcenter{\ent{abc}} \vcenter{\ent{de} \vl2 \ent{fg}} \vcenter{\ent{hij} \vl{.5} %\bl{.5}<-| % \ent{klm} | \bl{1.5}% <-| \ent{nop} \vl1 \ent{qrs}}$$ }%end scope \noindent via the following alternative code without \verb|\halign| {\small\begin{verbatim} \newdimen\dist \dist=2\baselineskip \def\ent#1{\hbox{\vbox to0pt{\vss\hbox to10ex{\quad\strut#1\hss}\hrule}}} \def\vl#1{\hbox{\vrule height#1\dist depth0pt}} \def\bl#1{\kern#1\dist}%BLank of proper size %Balanced $$\offinterlineskip \vcenter{\ent{abc}} \vcenter{\ent{de} \vl2\ent{fg}} \vcenter{\ent{hij}\vl1\ent{klm}\bl1\ent{nop}\vl1\ent{qrs}} \quad%Nearly balanced tree; pruning a branch \vcenter{\ent{abc}} \vcenter{\ent{de} \vl2\ent{fg}} \vcenter{\ent{hij}\vl{.5}%\bl{.5}\ent{klm} \bl{1.5}\ent{nop}\vl1\ent{qrs}}$$ \end{verbatim} }%end small \noindent There exist some special tree packages, see \cite{abk89}. % \item Row and/or column spans, partial horizontal rules% \footnote{How many rows does the header have? Descriptive 1, visual 2, and for plain \TeX\ formatting 3? See Mark up of Bridge Form subsection.} %Fill-in form bridge \nonruled\ctr\framed \def\rowstblst{} {\small%\defaults \newcount\bcnt \def\lines{\global\advance\bcnt by 1 \ifnum\bcnt=3 et cetera\hidewidth \senil\fi\the\bcnt.\cs\cs\cs\cs\cs\cs\rs\lines} \def\senil#1\lines{\fi} \def\ghostrow{\omit\colsepsurround% \vbox to 0pt{\vss\hbox to 5ex{\hss Pair\hss}\vskip.5ex \hbox to 5ex{\hss No\hss}\vss}\prs\logmsp2\lineglue\srp \vbox to 0pt{\vss\hbox to 5ex{\hss Re-\hss}\vskip.5ex \hbox to5ex{\hss sults\hss}\vss}\prs\logmsp2\lineglue\srp \vtop to 0pt{\vss\hbox to 5ex{\hss MP$\,$s\hss}\vss}\colsepsurround\cr} \def\header{\cs\logmsp2\hfil Contract\hfil\cs \cs\logmsp2\hfil Scores\hfil\cs\grs \cs N--S\cs E--W\cs\cs N--S\cs E--W\cs} \def\data{\lines} $$ \framed\ruled\btable\data $$ }%end scope \write16{Bridge form \arabic{page}} \item Bridge pair match scheme, with special `first' element \par\noindent {\small\begin{center} \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline \begin{minipage}{10ex} \setlength{\unitlength}{6ex} \begin{picture}(1.5, 1) \put( 0.0, 0.0){\small Ronde} \put( 1.4, 0.5){\llap{\small Spel}} \put( 1.4, 0.1){\line(-2, 1){1.4}} \end{picture} \vspace*{\medskipamount} \end{minipage} & 1--3 & 4--6 & 7--9 & 10--12 & 13--15 & 16--18 & 19--21\\ \hline 1.&1: 1--2& & &2: 3--4& &3: 5--6 &4: 7--8\\ \hline 2.&4: 8--3&1: 1--6& & &2: 5--7 & &3: 2--4\\ \hline \dots &&&&&&& \\ \hline \end{tabular} \end{center} } \item Alignment at decimal points. Generally this is done by introducing an extra column for the dot, and flushing right the digits left and flushing left the digits right of it. It comes from the wishes not to print non-significant leading zeroes, and to suppress zeroes behind the point for exact numbers. 3.5 means exactly 3${1\over2}$. 3.500 means accurate to three digits. I would mark up the numbers separately and insert Knuth's `?', \TeX book, p.240\dash241, for non-signicant zeroes, automatically. The latter can also be done by programming the editor by a template consisting of sufficient ?-s followed by the decimal point. The required numbers can be brought in by overtyping the template. Related to alignment at the decimal point is alignment at number signs,\footnote{Another column for the signs offends the structure. At a lower level one could think of {\tt\char92scs}, a Sign Column Separator, but that is not nice either.} see the AAP table. % \item Fill-in forms, especially the registration forms for the various \write16{Fill-in form: \arabic{page}} \TeX\ conferences, are captivating. Sometimes I ponder about the e-mail equivalents of the traditional snail forms, especially what and how they should be filled in. Redefine a list of empty definitions? % \item Time-tables (railway, bus, \dots), and the use of rotated fonts. \write16{Time tables: \arabic{page}} \item Nested, and interrupted\footnote{From the user level one would say: aligned material connected by text, where the latter in the case at hand is the status of the play.} table with updating of memory, \cite{cgl90} {\small %\input{dec.tex} %Card definitions \def\s{$\spadesuit$} \def\h{$\heartsuit$} \def\d{$\diamondsuit$} \def\c{$\clubsuit$} %(Toks register) control sequences %for hands used by play macros: %showgame, pc, strip \let\NT\newtoks \NT\hnd%Dynamically one of: \NT\Ns\NT\Es\NT\Ss\NT\Ws \NT\Nh\NT\Eh\NT\Sh\NT\Wh \NT\Nd\NT\Ed\NT\Sd \NT\Wd %Beware! Already %in TUGboat.sty in lower case \NT\Nc\NT\Ec\NT\Sc\NT\Wc % \def\english{ %In central figure NESW \def\N{N}\def\E{E}\def\S{S}\def\W{W} %In heading bplay \def\NS{NS}\def\EW{EW} \def\TRICK{Trick} %Definition of hands %used by bbid \def\FIH{North}\def\SEH{East} \def\THH{South}\def\FOH{West} }% end \english \english%default % \def\LEADN{\gdef\FIP{N}\gdef\SEP{E}% \gdef\THP{S}\gdef\FOP{W}} \def\LEADE{\gdef\FIP{E}\gdef\SEP{S}% \gdef\THP{W}\gdef\FOP{N}} \def\LEADS{\gdef\FIP{S}\gdef\SEP{W}% \gdef\THP{N}\gdef\FOP{E}} \def\LEADW{\gdef\FIP{W}\gdef\SEP{N}% \gdef\THP{E}\gdef\FOP{S}} %Definition of counters %used by bplay \newcount\trno%trick number %Definition of dimensions %used in bbid \newdimen\wr %width column \wr=7ex \relax \def\bidwidth{4\wr} %used in crdima \newbox\NESW % \def\dutch{ \def\FIH{Noord}\def\SEH{Oost} \def\THH{Zuid}\def\FOH{West} \def\N{N}\def\E{O}\def\S{Z} \def\W{W}\def\EW{OW}\def\NS{NZ} \def\TRICK{Slag} \setbox\NESW\hbox{\NESWfig} }%end \dutch % \def\french{ \def\FIH{Nord}\def\SEH{Est} \def\THH{Sud}\def\FOH{Ouest} \def\N{N}\def\E{E}\def\S{S} \def\W{O}\def\EW{EO}\def\NS{NS} \def\TRICK{Lev\'ee} \setbox\NESW\hbox{\NESWfig} }%end \french %end input dec.tex %\input{bid.tex} %Modified central figure \def\hand#1#2#3#4{% %Example: \hand{AKJ765}{AK9}{--}{T983} \vtop{\hbox{\strut\s\enspace#1} \hbox{\strut\h\enspace#2} \hbox{\strut\d\enspace#3} \hbox{\strut\c\enspace#4}}%end \vtop }%end \hand % \def\crdima#1#2#3#4#5#6{% %purpose: layout bridge hand %#1 left upper text %#2 right upper text %#3, #4, #5, #6: N, E, S, W hands \vbox{\halign{ &##\quad\cr #1& #3& #2\cr $\vcenter{#6}$&$\vcenter{\copy\NESW}$& $\vcenter{#4}$\cr & #5& \cr }%end \halign }%end \vbox }%end \crdima % \def\NESWfig{% \hbox{\vrule% \vbox{\offinterlineskip\tabskip0pt \hrule\kern.25ex\halign{\hskip.5ex ##\tabskip.5ex&\hfil##\hfil& ##\hskip.5ex \tabskip0pt\cr \noalign{\vskip.5ex} &\hbox to 2ex{\hss\N\hss}& \cr \W& &\E\cr &\hbox to 2ex{\hss\S\hss}& \cr \noalign{\vskip.5ex} }%end \halign \kern.25ex\hrule}%end \vbox \vrule}%end \hbox }% end \NESWfig \setbox\NESW\hbox{\NESWfig} % \def\ebid{\errormessage{% bbid command is missing}} % \def\bbid{\bgroup% \def\ebid{\egroup\egroup\egroup} \def\alert{$^A$} \def\think{$\ldots$\thinspace} % etc. \vtop\bgroup \halign to\bidwidth\bgroup \tabskip2ex plus 1ex minus 1ex& ##\hfil\cr \FIH\hfil& \SEH\hfil& \THH\hfil&\FOH\hfil\cr \noalign{\vskip.5ex} }%end \bbid %end input bid.tex% %\input{play.tex} %Modified 11/11/91 Central table \bplay etc % bplay, showgame, pc, strip \def\eplay{\errormessage{% bplay command is missing}} % \def\bplay{\bgroup\global\trno=0 \def\eplay{\egroup\egroup} \def\bintermezzo{\noalign\bgroup \smallskip\noindent} \def\eintermezzo{\smallskip\egroup} \tabskip1ex plus 1fill \halign to\hsize\bgroup \tabskip1ex plus 1ex minus 1ex \global\advance\trno by 1 % \hbox to.5\wr{\hss\the\trno\hss}%<=! \hbox to\wr{\pc\FIP##\hss}\hfil& \hbox to\wr{\pc\SEP##\hss}\hfil& \hbox to\wr{\pc\THP##\hss}\hfil& \hbox to\wr{\pc\FOP##\hss}\hfil \tabskip4ex plus2ex minus1ex& \hbox to.5\wr{\hss##\hss} \tabskip1ex plus 1ex minus 1ex& \hbox to.5\wr{\hss##\hss} \tabskip1ex plus 1fill\cr %End template line, next is headline \omit\hbox to1\wr{\TRICK\hss}\hfil& \omit\hfil&\omit\hfil&\omit\hfil& %Note only 3 \omits \NS&\EW\cr%Headline }% end \bplay % \def\pc#1#2#3{% Version 3/3/90 %Function: prints card #2#3 and % deletes it from player #1 %#1 the hand N, E, S, W(uppercase) %#2 colour s, h, d, or c %#3 card value A K Q ... 2, or x %(or your (consistent/language) choice) %%%% 1. Update hand \#1#2; e.g. \Ns %%% \xdef\hnd{\csname #1#2\endcsname} \strip{#3}{\hnd}% %%%% 2. print card in table %%% \xdef\colour{\csname #2\endcsname} \colour\thinspace #3% % %Needed for immediate postfix mark(s) }% end \pc % \def\strip#1#2{% Version 3/3/90 %Function: deletes card value #1 % from #2, i.e., \Ns, or ... \def\wis##1#1##2\wis{% %Function: #1 is deleted from argument % in \wis ... \wis and result % is assigned to \hnd; % (last card is replaced by --) \global\hnd={##1##2} \xdef\pa{##1} \xdef\pb{##2} \ifx\pa\empty {\ifx\pb\empty \global\hnd={--}% void colour \fi}\fi }% end \wis \expandafter\wis\the #2\wis }% end \strip % \def\showgame{ %Purpose: Shows all cards still active % in the play, via \Ns, ..., \Wc, % (note use of upper case for players) %Used: \crdima, \hand, \LFTINF, \RGTINF % \Ns, ..., \Wc $$\crdima{\LFTINF}{\RGTINF}% {\hand{\the\Ns}{\the\Nh}{\the\Nd}% {\the\Nc}}% {\hand{\the\Es}{\the\Eh}{\the\Ed}% {\the\Ec}}% {\hand{\the\Ss}{\the\Sh}{\the\Sd}% {\the\Sc}}% {\hand{\the\Ws}{\the\Wh}{\the\Wd}% {\the\Wc}}% $$}% end \showgame %end input play.tex %bridge data \def\LFTINF{Puzzle} \def\RGTINF{\vtop{\hbox{6NT,} \hbox{by East}}} % \Ns={KQ76}\Es={T9}\Ss={8542}\Ws={AJ3} \Nh={J98} \Eh={A2}\Sh={QT74}\Wh={K653} \Nd={J942}\Ed={T5}\Sd={Q876}\Wd={AK3} \Nc={65}\Ec={KJ9xxxx}\Sc={2}\Wc={AQT} \showgame \LEADS\bplay h4! & hK & h8 & h2 & --& 1\LEADW\cr cA & c5 & cx & c2 & --& 2\cr cQ & c6 & cx & s2 & --& 3\cr cT & h9 & cK & s4 & --& 4\LEADE\cr cJ & s5 & s3 & s6 & --& 5\cr c9 & s8 & h5 & s7 & --& 6\cr cx & d6 & sJ & d2 & --& 7\cr \bintermezzo \def\RGTINF{\vtop{\hbox to 0pt{NS squeezed on\hss} \hbox to 0pt{\c\ continuation?\hss} \hbox to 7ex{\hss}}} %phantom for alignment \Ec={{\ooalign{\hfil\raise.07ex% \hbox{x}\hfil\crcr\mathhexbox20D}}} \showgame \Ec={x} \eintermezzo cx & h7 & h6 & hJ & --& 8\cr \omit et cetera \hidewidth \cr \eplay }%end of scope \noindent Tables which also require updating of memory occur with typesetting of chess, for example \cite{pt92}, or GO, \cite{hk91}. \write16{Before Bordered: \arabic{page}} \penalty2000 \relax % \end{itemize} % \section{Bordered table}% \write16{Bordered table starts at: \arabic{page}}% A bordered table consists of a caption, a header, row stubs, a table proper and a footer, all with appropriate separators. Special cases occur when some of the elements are absent. Abstraction from ruled and non-ruled is realized at the user level. Ruled can be specified either as horizontal, vertical or both. Dotted rules, also the partial ones, can be specified.\footnote {The chameleon sized {\tt\char92hrule} and {\tt\char92vrule}, don't have dotted analogons, however.} No variation in the line thicknesss has been encoded.\footnote{It is not difficult to introduce a parameter {\tt\char92linethickness}.} Framing is treated just as if a general document element has to be framed. I chose to leave the caption and the footer outside the frame. The positioning of the elements can be specified as centered, flushed left, respectively flushed right. A user may supply his own template. Caption, border (first, header, row stubs), and footer can be specified; all mutual orthogonal and independent from \verb|\data|. % \begin{itemize} \item Bordered table model \write16{Bordered table: \arabic{page}} {\def\caption{$\leftarrow$\hfill C a p t i o n\hfill$\rightarrow$} \def\first{\hbox to6ex{\hss First\hss}} \def\header{\hbox to18ex{\hss Header\hss}} \def\rowstblst{{\hfil$\vcenter to20ex{\vss\offinterlineskip \fifo rowstblst\ofif\vss}$}} \def\data{$\vcenter{\offinterlineskip\hbox{Table}\kern1ex\hbox{Proper}}$} \def\footer{\hbox to\thsize {$\leftarrow$\hss{\small F o o t e r}\hss\hss\hss$\rightarrow$}} \def\fifo#1{\ifx\ofif#1\ofif\fi\process{#1}\fifo}\def\ofif#1\fifo{\fi} \def\process#1{\hbox to0pt{\hss#1\hss}\kern.5ex} \nonframed $$\vcenter{\btable\data}\qquad\qquad \vcenter{\framed\btable\data}$$ \immediate\write16{Bordered table} }%end scope via {\small \begin{verbatim} \def\caption{$\leftarrow$\hfill C a p t i o n\hfill$\rightarrow$} \def\first{\hbox to6ex{\hss First\hss}} \def\header{\hbox to18ex{\hss Header\hss}} \def\rowstblst{{\hfil$\vcenter to20ex{\vss\offinterlineskip \fifo rowstblst\ofif\vss}$}} \def\data{$\vcenter{\offinterlineskip\hbox{Table}\kern1ex\hbox{Proper}}$} \def\footer{\hbox to\thsize {$\leftarrow$\hss{\small F o o t e r}\hss\hss\hss$\rightarrow$}} $$\vcenter{\btable\data}\qquad\qquad \vcenter{\framed\btable\data}$$ \end{verbatim}}%end scope \noindent with, \cite{cgl92c}, \cite{cgl92d} {\small \begin{verbatim} \def\fifo#1{\ifx\ofif#1\ofif\fi\process{#1}\fifo}\def\ofif#1\fifo{\fi} \def\process#1{\hbox to0pt{\hss#1\hss}\kern.5ex} \end{verbatim}}%end scope % \noindent Rules can be specified via for example \verb|\ruled|, \verb|\hruled|, \verb|\vruled|, \verb|\nonruled|, respectively \verb|\dotruled|.\footnote{The latter requires some extra work: table measurement via 2 passes.} The rules that separate the border can be eliminated, by redefinition of the macros \verb|\headersep| and \verb|\rowstbsep|. Furthermore, there are \verb|\ctr|, \verb|\fll|, and \verb|\flr|, for controling the positioning of the elements of the table. The framing can be controled by \verb|\framed|, \verb|\dotframed|, or \verb|\nonframed|. \end{itemize} % \subsection{Encoding} {\small\begin{verbatim} %btable.tex version 1, 17/7/92 author: cgl@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&&\lft####\rgt\cr} \else\def\template{\colsepsurround####\hfil&&\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{&\colsepsurround\colsep\colsepsurround&} \def\prs{&\colsepsurround\lineglue&} \def\srp{&\lineglue\colsepsurround&} \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{&\colsepsurround\rowstbsep\colsepsurround&} \def\hs{\colsepsurround\tstrut\cr \ifx\empty\headersep\else\noalign{\headersep}\fi \ifx\empty\rowstblst\else\ea\nxtrs\fi} \preinsert %User action \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%Pick up what is needed, \thsize,... \ifx\caption\empty\else\hbox to\thsize{\strut\hfil\caption\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\caption{}\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 \logmsp \def\spicspan{\span\omit} \def\logmsp#1{\omit\mscount=#1\multiply\mscount by2 \advance\mscount by-1 \loop\ifnum\mscount>1 \spicspan\advance\mscount by-1 \repeat} %To handle the row stub list: \rsl \def\nxtrs{\ifx\empty\rsl\else\def\nxtel{\ea\nrs\rsl\srn}\ea\nxtel\fi} \def\nrs#1#2\srn{\gdef\rsl{#2}#1\rss} %end btable.tex \end{verbatim} } \par\noindent \verb|\btable|\quad Implements the bordered table model. Note that the table is measured in order to set the width of the header and the footer. The measurement is also useful for dotted horizontal lines. When no template is provided, then a default will be created, automatically. \\[.5ex] {\tt\char92}$\langle X\rangle$\verb|sep|\quad Parameters which govern the kind of separators. \par\noindent \verb|\nxtrs| \quad Yields the next element of the row stub list. {\em The last element of the list has to be enclosed by an extra pair of braces.\/} I could have introduced an explicit list terminator instead, but that would have created incompatibilities with the termination in other defs. Weird? \\[.5ex] \verb|\cvsize, \tsht, \tsdp, \thsize, \tvsize|\quad These dimension variables stand for vertical cell size, table strut height, table strut depth, table horizontal size, and table vertical size. \\[.5ex] \verb|\preinsert, \postinsert|\quad For flexibility. Default \verb|\preinsert| is empty. \verb|\postinsert| delivers by default the table sizes globally into \verb|\thsize|, and \verb|\tvsize|. % % \def\rowstblst{}\def\caption{}\def\header{}\def\footer{} % \subsection{Examples of use} Before the invoke of \verb|\btable\data| do \\ Redefine \verb|\data| with column and row separators, \verb|\cs|, respectively \verb|\rs|. \\ Choose from the `attributes'\\ -- \verb|\ruled|, \verb|\hruled|, \verb|\vruled|, \verb|\dotruled| \hfill Default:\hbox to13ex{\hfil\verb|\nonruled|}\\ -- \verb|\framed|, \verb|\dotframed| \hfill Default:\hbox to13ex{\hfil\verb|\nonframed|}\\ -- \verb|\fll|, \verb|\flr| \hfill Default:\hbox to13ex{\hfil\verb|\ctr|}\\ Suplly the caption, header, first element, row stubs, or footer via redefinitions of the corresponding macros. \nonruled\nonframed\ctr %Defaults \penalty-250 \begin{itemize} \item Just data, \cite{cgl91} \write16{Just data: \arabic{page}} {\small $$\def\data{2\cs7\cs6\rs 9\cs5\cs1\rs 4\cs3\cs8} \vcenter{\framed\ruled\btable\data}\qquad\qquad\qquad \immediate\write16{ Size 3-3 Magic Sq: \the\thsize, \the\tvsize, page: \arabic{page}} \def\data{16\cs 3\cs 2\cs13\rs 5\cs10\cs11\cs 8\rs 9\cs 6\cs 7\cs12\rs 4\cs\bf15\cs\bf14\cs 1} \ruled\framed\setbox0=\btable\data%for measuring sizes \write16{ Size 4-4 Magic Sq: \the\thsize, \the\tvsize, page: \arabic{page}} \vcenter{\dotruled\dotframed\btable\data}\qquad$$ }%end scope \noindent via {\small\begin{verbatim} $$\def\data{2\cs7\cs6\rs 9\cs5\cs1\rs 4\cs3\cs8} \vcenter{\framed\ruled\btable\data}\qquad\qquad\qquad \def\data{16\cs 3\cs 2\cs13\rs 5\cs 10\cs 11\cs 8\rs 9\cs 6\cs 7\cs12\rs 4\cs\bf15\cs\bf14\cs 1} \ruled\framed\setbox0=\btable\data%for measuring sizes \vcenter{\dotruled\dotframed\btable\data}\qquad$$ \end{verbatim} }%end scope \item Data plus header, \TeX book p.246 {\small $$\def\header{\hfill Year\hfill\cs\hfill World Population\hfill} \def\data{8000 B.C.\cs5,000,000\rs50 A.D.\cs200,000,000} \flr\vruled\vcenter{\btable\data}\qquad \ruled\framed\vcenter{\btable\data}$$ } via the simpler nearly descriptive mark up {\small\begin{verbatim} \def\header{\hfill Year\hfill\cs\hfill World Population\hfill} \def\data{8000 B.C.\cs 5,000,000\rs 50 A.D.\cs200,000,000} $$\flr\vruled\vcenter{\btable\data}\qquad \ruled\framed\vcenter{\btable\data}$$ \end{verbatim} } % \item Data with row stubs, \TeX book p.232 \par\noindent \nonruled\nonframed\ctr $$\def\rowstblst{{Horizontal lists}{Vertical lists}{{Math lists}}} \def\rowstbsep{}\def\data{Chapter 14\rs Chapter 15\rs Chapter 17} \vcenter{\vbox{\small{\btable\data}}} \qquad\vcenter{\hbox{via}}\ \vcenter{\vbox{\small\hsize=.45\hsize\parindent=0pt \begin{verbatim} \def\rowstblst{{Horizontal lists} {Vertical lists}{{Math lists}}} \def\rowstbsep{}%Default a \vrule \def\data{Chapter 14\rs Chapter 15\rs Chapter 17} $$\btable\data$$ \end{verbatim} }}$$ \item Data, row stubs, header, caption and footer \write16{Data row stubs etc. \arabic{page}} \par\noindent {\small\nonruled\nonframed $$\def\data{11\cs12\rs21\cs22} \vcenter{\framed\btable\data} \qquad \def\header{\logmsp2\hfill Header\hfill} \def\rowstblst{{$1^{st}$ row}{{$2^{nd}$ row}}} \vcenter{\btable\data} \qquad \def\caption{Caption}\def\footer{Footer} \vcenter{\dotruled\btable\data} \qquad \vcenter{\ruled\framed\btable\data}$$ }% \par\noindent after data definition, \verb|\def\data{11\cs12\rs21\cs22}|, via\footnote{Note the invariance of the {\tt\char92data} specification.} {\small\begin{verbatim} $$\vcenter{\framed\btable\data} \qquad \def\header{\logmsp2\hfill Header\hfill} \def\rowstblst{{$1^{st}$ row}{{$2^{nd}$ row}}} \vcenter{\btable\data} \qquad \def\caption{Caption}\def\footer{Footer} \vcenter{\dotruled\btable\data} \qquad \vcenter{\ruled\framed\btable\data}$$ \end{verbatim} } \item Walter's spreadsheet, \TeX book, p.244. No preamble has to be defined. It makes ex22.10 superfluous. How about that? {\small$$ \def\data{1\cs\logmsp2Adjusted gross income \dotfill\cs\$4,000\rs 2\cs Zero bracket amount for \rs \cs a single individual \dotfill\cs\hfill\$2,300\cs \rs 3\cs Earned income \dotfill\cs \hfill\underbar{ 1,500}\cs \rs 4\cs\logmsp2Substract line 3 from line 2 \dotfill\cs\hfill\underbar{ 800}\rs 5\cs Add lines 1 and 4. Enter here \rs \cs\logmsp2and on Form 1040, line 35 \dotfill\cs\$4,800} \def\colsepsurround{\kern.5ex}\cvsize=3ex \fll\btable\data $$} \par\noindent The above is encoded, as a 4-column table, via {\small \begin{verbatim} \def\data{1\cs\logmsp2Adjusted gross income \dotfill\cs\$4,000\rs 2\cs Zero bracket amount for \rs \cs a single individual \dotfill\cs\hfill\$2,300\cs \rs 3\cs Earned income \dotfill\cs \hfill\underbar{ 1,500}\cs \rs 4\cs\logmsp2Substract line 3 from line 2 \dotfill\cs\hfill\underbar{ 800}\rs 5\cs Add lines 1 and 4. Enter here \rs \cs\logmsp2and on Form 1040, line 35 \dotfill\cs\$4,800} \def\colsepsurround{\kern.5ex}\cvsize=3ex $$\fll\btable\data$$ \end{verbatim} } % \item Part of AAP's table, \cite{AAP89}, or \cite{cgl90a} \immediate\write16{AAP table} {\small\nonframed\nonruled\ctr \def\nl{\hfil\strut\break\strut}\catcode`?=\active \def?{\kern1.1ex} \def\caption{AAP's table:\qquad Job Changes 1973--1980\hfill} \def\rowstblst{{Texas}{{Maryland}}} \def\header{\copy1\cs\copy2\cs\copy3} \def\data{$+20$\cs---\cs22\%\rs $+?5$\cs 42\cs24\%} \def\footer{Source: David Kinzer, `Turnover Of Hospital Chief Executive Officers: A Hospital Association Perspective,' Hospital and health Services Administration May-June 1982.} \setbox1=\vtop{\noindent\hsize14ex Gain/Loss of\nl hospitals \nl since 1973} \setbox2=\vtop{\noindent\hsize13ex Total No\nl of CEO Job\nl Changes\nl 1973--90} \setbox3=\vtop{\noindent\hsize10ex Survival\nl Rate of\nl CEO's} $$\btable\data$$ } obtained via {\small\begin{verbatim} \def\caption{AAP's table:\qquad Job Changes 1973--1980\hfill} \def\rowstblst{{Texas}{{Maryland}}} \def\header{\copy1\cs\copy2\cs\copy3} \def\data{$+20$\cs---\cs22\%\rs $+?5$\cs 42\cs24\%} \def\footer{Source: David Kinzer, `Turnover Of Hospital Chief Executive Officers: A Hospital Association Perspective,' Hospital and health Services Administration May-June 1982.} $$\btable\data$$ \end{verbatim} } \noindent with auxiliaries {\small\begin{verbatim} \def\nl{\hfil\strut\break\strut}\catcode`?=\active \def?{\kern1.1ex} \setbox1=\vtop{\noindent\hsize14ex Gain/Loss of\nl hospitals\nl since 1973} \setbox2=\vtop{\noindent\hsize13ex Total No\nl of CEO Job\nl Changes\nl 1973--90} \setbox3=\vtop{\noindent\hsize10ex Survival\nl Rate of\nl CEO's} \end{verbatim} } % \item AT\&T table diversions, \TeX book p.247, \cite{lesk79} {\small\begin{verbatim} \def\caption{AT\&T Common Stock} \def\header{Year\cs Price\cs Dividend} \catcode`?=\active \def?{\kern1.1ex} \def\data{1971\cs41--54\cs\llap{\$}2.60\rs 2\cs41--54\cs 2.70\rs 3\cs46--55\cs 2.87\rs 4\cs40--53\cs 3.24\rs 5\cs45--52\cs 3.40\rs 6\cs51--59\cs ?.95\rlap*} \def\footer{* (first quarter only)} \def\caption{}\def\header{\logmsp3 \hfil AT\&T Common Stock\hfil\rs \hfill Year\hfill\cs\hfill Price\hfill\cs \hfill Dividend\hfill} \vcenter{\flr\ruled\btable\data}$$ \end{verbatim} } \noindent yields \def\rowstblst{} {\def\caption{AT\&T Common Stock\hfill} \def\header{Year\cs Price\cs Dividend} \catcode`?=\active \def?{\kern1.1ex} \def\data{1971\cs41--54\cs\llap{\$}2.60\rs 2\cs41--54\cs 2.70\rs 3\cs46--55\cs 2.87\rs 4\cs40--53\cs 3.24\rs 5\cs45--52\cs 3.40\rs 6\cs51--59\cs ?.95\rlap*} \def\footer{* (first quarter only)} $$\framed\vcenter{\vbox{\small\btable\data}}\qquad\qquad \def\caption{}\def\header{\logmsp3 \hfil AT\&T Common Stock\hfil\rs \hfill Year\hfill\cs\hfill Price\hfill\cs \hfill Dividend\hfill} \vcenter{\flr\ruled\btable\data}$$ } \noindent It remains a matter of choice what should be considered as header and what as caption. A footnote facility, which will append the footnote to a footnote list similar to the row stub list, could have been implemented. % Because table footnotes are the exception rather than the rule, I refrained from implementing it, for the moment. % \item Pittman's, \cite{jep88}, deterministic multiplication table. Typographically and in other programming languages a trifle. In \TeX\ the encoding matters. \def\header{}\def\rowstblst{}\def\caption{}\def\first{}\def\footer{} \let\nx=\noexpand \let\ea=\expandafter \newcount\rcnt \newcount\ccnt \newcount\tnum \newcount\mrow \newcount\mcol \rcnt1 \ccnt1 \mrow2 \mcol3 \def\rows{\global\ccnt1 \cols \global\advance\rcnt1 \ifnum\rcnt>\mrow\swor\fi\rs\rows} \def\swor#1\rows{\fi} \def\cols{\tnum\rcnt \multiply\tnum\ccnt \the\tnum \global\advance\ccnt1 \ifnum\ccnt>\mcol\sloc\fi\cs\cols} \def\sloc#1\cols{\fi} % $$\nonruled\nonframed \vcenter{\btable\rows}\qquad\qquad \global\ccnt=1 \global\rcnt=1 \mrow2 \mcol3 \def\first{$\times$} \def\header{\row} \def\row{\the\ccnt\global\advance\ccnt1 \ifnum\ccnt>\mcol\wor\fi\cs\row} \def\wor#1\row{\fi} \def\rowstblst{\ifnum\rcnt=\mrow\gdef\rowstblst{}\fi} \def\nxtrs{\the\rcnt\rss} \vcenter{\btable\rows}\qquad\qquad % \global\ccnt=1 \global\rcnt=1 \mrow3 \mcol4 \def\rowstblst{\ifnum\rcnt=\mrow\gdef\rowstblst{}\fi} \framed\vcenter{\btable\rows} $$ via {\small\begin{verbatim} \let\nx=\noexpand \let\ea=\expandafter \newcount\rcnt \newcount\ccnt \newcount\tnum \newcount\mrow \newcount\mcol \rcnt1 \ccnt1 \mrow2 \mcol3 \def\rows{\global\ccnt1 \cols \global\advance\rcnt1 \ifnum\rcnt>\mrow\swor\fi\rs\rows} \def\swor#1\rows{\fi} \def\cols{\tnum\rcnt \multiply\tnum\ccnt \the\tnum \global\advance\ccnt1 \ifnum\ccnt>\mcol\sloc\fi\cs\cols} \def\sloc#1\cols{\fi} \vcenter{\btable\rows}\qquad\qquad % \global\ccnt=1 \global\rcnt=1 \mrow2 \mcol3 \def\first{$\times$} \def\header{\row} \def\row{\the\ccnt\global\advance\ccnt1 \ifnum\ccnt>\mcol\wor\fi\cs\row} \def\wor#1\row{\fi} \def\rowstblst{\ifnum\rcnt=\mrow\gdef\rowstblst{}\fi} \def\nxtrs{\the\rcnt\rss} \vcenter{\btable\rows}\qquad\qquad % \global\ccnt=1 \global\rcnt=1 \mrow3 \mcol4 \def\rowstblst{\ifnum\rcnt=\mrow\gdef\rowstblst{}\fi} \framed\vcenter{\btable\rows}$$ \end{verbatim} } \end{itemize} \def\header{}\def\rowstblst{}\def\caption{}\def\first{}\def\footer{} % \subsection{No mark up} \write16{No mark up. \arabic{page}} For simple tables the data can be specified without \verb|\cs|-s, and \verb|\rs|-s, that is without explicit markers for column and row separators. These can be inserted by \TeX, see \TeX book p.249, \cite{cgl92c}, or \cite{ds92}. For special cases, for example crosswords, \cite{cgl92b}, this is handy. \\ Pondering about lists, make you realize that the table proper data forms a nested list with \verb|\rs| and \verb|\cs|, respectively first level and second level separators. One could also adopt $\langle cr\rangle$ and {\tt\char32} for that, in other words allow natural data provision. % \section{Simultaneous row and column spans} When one kind of spans is the issue one can use \verb|\logmsp|---for logical columns, as an extension to \verb|\multispan|--- either within \verb|\halign|, for column spans, or within \verb|\valign|, for row spans. Simultaneous row and column spans require more work. \\ First, we have to account for the blocks proper. This is done via leaving space open, overprinting the left open space, and the use of a {\it Ghost Row Separator}. For a block of even {\em row\/} size, I chose to insert lines of height zero. I call these ghost lines. For a block with an odd number of rows, I chose to modify the middle line. \\ Next, when we are dealing with {\em ruled\/} tables we have to hide the rules that should otherwise traverse the block. This can be done for partial vertical rules via \verb|\logmsp{n}\hfil|, with n an integer. For partial horizontal rules there are two aspects. First, the table wide rules are not typeset, and second, partial horizontal rules have to be typeset around the blocks. I supplied the macros \verb|\prs|, Partial Rule Separator, and \verb|\srp|, {\em mirror\/} Separator Rule Partial, to enclose a partial rule. The kind of partial rule is determined by the replacement text of \verb|\lineglue|. \\[.5ex] Row spans in the row stub list can be handled similarly. For even spans define an appropriate \verb|\ghostrow|, with a copy of the block in it. For odd spans provide a copy of the block in the row stub list. Provide suitable empty row stub elements, $\{\,\}$, in both cases. % \subsection{Partial rules} For a horizontal rule over one (logical) column use\\ \verb|...\prs\lineglue\srp...|\quad instead of \quad\verb|...\cs...\cs...|.\\ \verb|\lineglue| is defined by the $\langle X\rangle$\verb|ruled| macros. \\[.5ex] The \verb|\prs|, Partial Rule Separator, accounts for that part of the rule, which extends into the hidden column for the separator. \verb|\srp| is its mirror terminator. At the line-ends of the table one can simply use \verb|\cr|, as mirror terminator. The respective (symmetric) definitions are {\small\begin{verbatim} \def\prs{&\colsepsurround\lineglue&} \def\srp{&\lineglue\colsepsurround&} \end{verbatim} } \noindent For a horizontal rule over $\langle n\rangle$ (logical) columns use {\small\begin{verbatim} ...\prs\logmsp{n}\lineglue\srp...%n logical columns \end{verbatim}} %\noindent If we define \verb|\def\lineglue{\dotfill}|, then we %have dotted partial horizontal rules. % \subsection{Mark up bridge form} The header row of the bridge form can be characterized by: one 3-row span, two 2-column spans, and two 2-column partial horizontal rules. Furthermore, the repetition of the number of rows is interesting. {\small\begin{verbatim} \def\header{\cs\logmsp2\hfil Contract\hfil\cs \cs\logmsp2\hfil Scores\hfil\cs\grs \cs N--S\cs E--W\cs\cs N--S\cs E--W\cs} \def\data{\lines} \framed\ruled\btable\data \end{verbatim} } \noindent with auxiliaries {\small\begin{verbatim} \newcount\bcnt \def\lines{\global\advance\bcnt by 1 \ifnum\bcnt=3 et cetera\hidewidth \senil\fi\the\bcnt.\cs\cs\cs\cs\cs\cs\rs\lines} \def\senil#1\lines{\fi} % \def\ghostrow{\omit\colsepsurround% \vbox to 0pt{\vss\hbox to 5ex{\hss Pair\hss}\vskip.5ex \hbox to 5ex{\hss No\hss}\vss}\prs\logmsp2\lineglue\srp \vbox to 0pt{\vss\hbox to 5ex{\hss Re-\hss}\vskip.5ex \hbox to5ex{\hss sults\hss}\vss}\prs\logmsp2\lineglue\srp \vtop to 0pt{\vss\hbox to 5ex{\hss MP$\,$s\hss}\vss}\colsepsurround\cr} \end{verbatim} } \par\noindent The row span extends implicitly into the first and third row. The last row of the data does not take vertical rules, automatically.\footnote{For a real form---24 or more rows---just modify {\tt\char92lines}.} \subsection{Blocks; connected cells} \write16{Blocks: \arabic{page}} In order to specify spans of {\em logical\/} columns, we need an adapted version of \verb|\multispan|, \TeX book p.354, as given in the Encoding subsection. \\ Spans form a block. Around the blocks partial rules emerge. % How to cope with those is explained in the Partial Rule section. % \newbox\block\def\rowstblst{}\def\header{}\def\footer{} % \begin{itemize} \item{\bf Odd blocks}, 1-by-2 etc.\quad Use \verb|\logmsp|, \verb|\srp|, \verb|\lineglue| and the like. Define appropriate \verb|\ghostrow|-s. \par\noindent {\small \def\rowstblst{}\def\header{}\def\footer{}\def\caption{} $$\setbox\block=\hbox{$1*2$} \def\data{\logmsp2\colsepsurround\hfil\copy\block\hfil\cs13\rs 21\cs22\cs23\rs 31\cs32\cs33} {\ruled\setbox0=\btable\data} \vcenter{\dotruled\btable\data}\qquad\qquad % %3-by-2, and connected cells \setbox\block=\hbox{{\large A}\enspace% $\left\{\vrule height3ex depth3ex width0pt\right.$} \def\data{\logmsp2\hfil\cs13\grs \logmsp2\colsepsurround\hfil\vbox to 0pt{\vss \copy\block\vss}\hfil\cs23\grs \logmsp2\hfil\cs33\rs 41\cs42\cs43} \def\ghostrow{\logmsp2\hfil\prs\lineglue\cr \ifx\empty\rowstblst\else\ea\nxtrs\fi} \vcenter{\ruled\btable\data} \qquad\qquad % %3-by-3 block and all around \setbox\block=\hbox{\Large$3*3$} \def\data{\logmsp3\hfil\cs14\grs \logmsp3\hfil\vbox to 0pt {\vss\copy\block\vss}\hfil\cs24\grs \logmsp3\hfil\cs34\rs 41\cs42\cs43\cs44} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp3\hfil\prs\lineglue\cr \ifx\empty\rowstblst\else\ea\nxtrs\fi} \def\caption{{\Large Caption}} \def\header{\logmsp4 Header\hfil$\Downarrow$\ } \def\rowstblst{{row 1}{row 2}{row 3}{{\hfil$\Rightarrow$}}} \def\footer{Footer} \vcenter{\ruled\framed\btable\data}$$ } \par\noindent can be obtained via {\small\begin{verbatim} $$\setbox\block=\hbox{$1*2$} \def\data{\logmsp2\colsepsurround\hfil\copy\block\hfil\cs13\rs 21\cs22\cs23\rs 31\cs32\cs33} %end \data {\ruled\setbox0=\btable\data}%For measurement \vcenter{\dotruled\btable\data}\qquad\qquad % %3-by-2, and connected cells \def\data{\logmsp2\hfil\cs13\grs \logmsp2\colsepsurround\hfil\vbox to0pt{\vss \copy\block\vss}\hfil\cs23\grs \logmsp2\hfil\cs33\rs 41\cs42\cs43} %end \data \setbox\block=\hbox{{\large A}\enspace% $\left\{\vrule height3ex depth3ex width0pt\right.$} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp2\hfil\prs\lineglue\cr \ifx\empty\rowstblst\else\ea\nxtrs\fi} \vcenter{\ruled\btable\data}\qquad\qquad % %3-by-3 block and all around \def\data{\logmsp3\hfil\cs14\grs \logmsp3\hfil\vbox to 0pt{\vss\copy\block\vss}\hfil\cs24\grs \logmsp3\hfil\cs34\rs 41\cs42\cs43\cs44} %end \data \setbox\block=\hbox{\Large$3*3$} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp3\hfil\prs\lineglue\cr\ifx\empty\rowstblst\else\ea\nxtrs\fi} \def\caption{{\Large Caption}} \def\header{\logmsp4 Header\hfil$\Downarrow$\ } \def\rowstblst{{row 1}{row 2}{row 3}{{\hfil$\Rightarrow$}}} \def\footer{Footer} \vcenter{\ruled\framed\btable\data}$$ \end{verbatim} } \penalty-250 \item{\bf Even blocks}, 2-by-1 etc.\quad Leave the cells for the block open in \verb|\data|. Use \verb|\grs|, \verb|\prs|, \verb|\lineglue|, and the like. Define \verb|\ghostrow|. \par\noindent {\small \def\rowstblst{}\def\header{}\def\footer{}\def\caption{} $$%2-by-1 \setbox\block=\hbox{A} \def\data{\cs12\cs13\grs \cs22\cs23\rs 31\cs32\cs33} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \hfil\vbox to0pt{\vss\copy\block\vss}\hfil\prs \logmsp2\lineglue\cr\nxtrs} {\ruled\framed\setbox0=\btable\data}%for measurement \vcenter{\dotruled\btable\data} \qquad\qquad % \setbox\block=\hbox{\large$2*2$} \def\data{\logmsp2\hfil\cs13\grs \logmsp2\hfil\cs23\rs 31\cs32\cs33} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp2\colsepsurround\hfil% \vbox to0pt{\copy\block\vss}\hfil\prs\lineglue\cr\nxtrs} \vcenter{\framed\btable\data} \qquad\qquad % \setbox\block=\hbox{\large$2*3$} \def\data{\logmsp3\cs14\grs \logmsp3\cs24\rs 31\cs32\cs33\cs34} \def\caption{{\Large Caption}} \def\rowstblst{{row 1}{row 2}{{\hfil$\Rightarrow$}}} \def\header{\logmsp4 Header\hfil$\Downarrow$} \def\footer{Footer} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp3\hfil% \vbox to0pt{\vss\copy\block\vss}\hfil\prs\lineglue\cr\nxtrs} \vcenter{\framed\ruled\btable\data}$$ } \par\noindent can be obtained via {\small\begin{verbatim} $$\setbox\block=\hbox{\large A}%2-by-1 block \def\data{\cs12\cs13\grs \cs22\cs23\rs 31\cs32\cs33} %end \data \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi% \hfil\vbox to0pt{\vss\copy\block\vss}\hfil\prs \logmsp2\lineglue\cr\nxtrs} {\ruled\framed\setbox0=\btable\data}%for measurement \vcenter{\dotruled\btable\data} \qquad\qquad % \setbox\block=\hbox{\large$2*2$} \def\data{\logmsp2\hfil\cs13\grs \logmsp2\hfil\cs23\rs 31\cs32\cs33} %end \data \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi% \logmsp2\colsepsurround\hfil% \vbox to0pt{\copy\block\vss}\hfil\prs\lineglue\cr\nxtrs} \vcenter{\framed\btable\data} \qquad\qquad % \setbox\block=\hbox{\large$2*3$} \def\data{\logmsp3\cs14\grs \logmsp3\cs24\rs 31\cs32\cs33\cs34} %end \data \def\caption{{\Large Caption}} \def\rowstblst{{row 1}{row 2}{{\hfil$\Rightarrow$}}} \def\header{\logmsp4 Header\hfil$\Downarrow$\ } \def\footer{Footer} \def\ghostrow{\ifx\empty\rowstblst\else\omit\lineglue\ea\srp\fi \logmsp3\hfil% \vbox to0pt{\vss\copy\block\vss}\hfil\prs\lineglue\cr\nxtrs} \vcenter{\framed\ruled\btable\data}$$ \end{verbatim} } \penalty-250 \item {\bf Multiple blocks}: in row stub \`and table proper \write16{Multiple blocks: \arabic{page}} {\small \def\rowstblst{}\def\header{}\def\footer{}\def\caption{} $$ \setbox\block=\vbox{\hbox{\large A}\kern3ex\hbox{\large B}} \def\data{\cs12\cs13\grs $\vcenter to0pt{\vss\copy\block\vss}$\cs22\cs23\grs \cs32\cs33\lr} \def\ghostrow{\rss\prs\logmsp2\lineglue\cr\nxtrs} \def\lr{\tstrut\colsepsurround\cr \prs\logmsp3\lineglue\gobble} \def\gobble#1#2{}%kludge to undo \tstrut, \colsepsurround \def\preinsert{\def\rss{&\colsepsurround\hfil\colsepsurround&} \def\hs{\colsepsurround\tstrut\cr\prs\logmsp3\lineglue\cr\nxtrs}} \vcenter{\btable\data}\qquad\qquad\qquad \def\header{\logmsp3\hfill Header\hfill} \def\footer{Footer} \def\caption{{\Large Caption}} \def\rowstblst{{}{$\vcenter to0pt{\vss\Bigg\{\vss}$}{{}}} \vcenter{\ruled\btable\data} $$ } \noindent via {\small\begin{verbatim} $$\setbox\block=\vbox{\hbox{\large A}\kern3ex\hbox{\large B}} \def\data{ \cs12\cs13\grs $\vcenter to0pt{\vss\copy\block\vss}$\cs22\cs23\grs \cs32\cs33\lr} \vcenter{\btable\data}\qquad\qquad\qquad \def\caption{{\Large Caption}} \def\header{\logmsp3\hfill Header\hfill} \def\rowstblst{{}{$\vcenter to0pt{\vss\Bigg\{\vss}$}{{}}} $$ \def\footer{Footer} \vcenter{\ruled\btable\data} \end{verbatim} } \noindent with {\small\begin{verbatim} \def\ghostrow{\rss\prs\logmsp2\lineglue\cr\nxtrs} \def\lr{\tstrut\colsepsurround\cr\prs\logmsp3\lineglue\gobble} \def\gobble#1#2{}%kludge to undo \tstrut, \colsepsurround \def\preinsert{\def\rss{&\colsepsurround\hfil\colsepsurround&} \def\hs{\colsepsurround\tstrut\cr\prs\logmsp3\lineglue\cr\nxtrs}} \end{verbatim} } \noindent Not much is gained in clarity for complicated tables. The logical structure at the top level is there, however. \end{itemize} % \section*{Conclusions} Tables are diverse, and a variety of tools is needed. \\[.5ex] Some (deterministic) tables can be generated completely by computer, no detailed user mark up is needed, just the invoke of the macro. \\[.5ex] Mark up of bordered scientific tables can be done via the provided bordered table macro \verb|\btable|, in the SGML spirit. \\[.5ex] Complex tables need detailed formatting commands and \TeX nowledge, in agreement with \DeK, \TeX book p.245 \begin{quote}`People who know how to make ruled tables are generally known as \TeX\ masters. Are you ready?' \end{quote} \noindent Hard things: not to introduce parameters which are already available, and to avoid redundancy. However, I could not get around \verb|\colsepsurround|, because of the impossibility to control the kind of glue inserted by \verb|\tabskip|. \\ I pity the lack of dotted equivalents of \verb|\hrule|, and \verb|\vrule|, as \TeX\ primitives. %I nearly succeeded, because I could not extend the %partial horizontal rules to the frame. %It was hard to prevent %improper use of \verb|\omit|.\\[.5ex] \\[.5ex] Typesetting tables requires a discipline to be adhered to. What about a discipline of \TeX ing? % %\section*{References}\vspace{.5cm} \begin{thebibliography}{Schneiderman 87} \bibitem{AAP89} {\sc Association of American Publishers}, ``Markup of Tabular Material'', Version 2.0 AAP Inc., 1989. \bibitem{ga92}{} Asher, ``Inside Type \& Set'', TUGboat, 13.1, 1992, pp.~13--22. \bibitem{abk89}{} Anne {\sc Br\"uggeman-Klein}, D. {\sc Wood}, ``Drawing Trees nicely with \TeX'', EP-ODD, 2, 2, 1989, pp.101\dash115. \bibitem{dc92}{} David {\sc Carlisle}, ``longtable.sty'', from the fileserver, 1992. \bibitem{rfc85}{} Ray F. {\sc Cowan}, ``tables.tex'', from the fileserver, 1985. 7p. \bibitem{ah89}{} Amy {\sc Hendrickson}, {\em Macro\TeX}, version 0, 1989. \bibitem{taj}{} Theo A. {\sc Jurriens}, ``supertabular.sty'', from the fileserver, 1989. \bibitem{khanh90}{} Khanh {\sc Ha}, ``Easy Table'', TUGboat, 11.2, 1990, pp.~250--264. \bibitem{dek73}{} Donald E. {\sc Knuth}, {\em The Art of Computer Programming, 3. Sorting and Searching}, Addison-Wesley, Reading Mass., 1973. \bibitem{dek84}{} Donald E. {\sc Knuth}, {\em The \TeX book}, Addison-Wesley, Reading Mass., 1984. \bibitem{hk91} Hanna {\sc Ko{\l}odziejska}, ``Go diagrams with \TeX'', MAPS 91.2, 1991, pp.~63--68. %\bibitem{cgl89}{} Kees {\sc van der Laan}, %``Typesetting Bridge via \LaTeX'', TUGboat, 10.1, 1989, pp.~113--116. \bibitem{cgl90}{} Kees {\sc van der Laan}, ``Typesetting Bridge via \TeX'', TUGboat, 11.2, 1990, pp.~265--276. (An earlier \LaTeX\ set-up appeared in TUGboat, 10.1, 1989, pp.~113--116.) \bibitem{cgl90a}{} Kees {\sc van der Laan}, ``SGML(, \TeX\ and \dots)'', TUGboat, 12.1, 1991, pp.~90--104. Proceedings Euro\TeX{} 90. Also MAPS 90.1. \bibitem{cgl91}{} Kees {\sc van der Laan}, ``Math into BLUes, Part I'', TUGboat, 12.4, 1991, pp.~485--501. (Part II has appeared in GUTenberg Cahiers 10\&11, Proceedings Euro\TeX{} 91.) Also MAPS 90.2. \bibitem{cgl92a}{} Kees {\sc van der Laan}, ``Tower of Hanoi, revisited'', TUGboat, 13.1, 1992, pp.~91--94. Also MAPS 92.1, pp.~125\dash127. \bibitem{cgl92b}{} Kees {\sc van der Laan}, ``Typsetting Crosswords via \TeX'', This proceedings. Also MAPS 92.1, pp.~128\dash131. \bibitem{cgl92c}{} Kees {\sc van der Laan}, ``FIFO and LIFO incognito'', This proceedings. Also MAPS, 92.1, pp.~121\dash124. \bibitem{cgl92d}{} Kees {\sc van der Laan}, ``FIFO and LIFO sing the BLUes'', MAPS, 92.2. \bibitem{lam86}{} Leslie {\sc Lamport}, {\em \LaTeX{} user's guide and reference manual}, Addison-Wesley, Reading, Mass., 1986. \bibitem{lesk79}{} M. E. {\sc Lesk}, ``Tbl -- a program to format tables'', UNIX manual, pp.~157--174, 1979. \bibitem{jep88} J.E {\sc Pittman}, ``Loopy.\TeX'', TUGboat, 9.3, 1988, pp.~289--291. \bibitem{ds92}David {\sc Salomon}, ``Advanced \TeX\ course: Insights \& Hindsights,'' MAPS Special, 1992, 252p. \bibitem{mds89}{} Michael D. {\sc Spivak}, {\em LAmS\TeX---The Synthesis}. \TeX plorators. \bibitem{pt92} Piet {\sc Tutelaers}, ``A font and a style for typesetting chess using \LaTeX\ or \TeX'', TUGboat, 13.1, 1992, pp.~85--90. \bibitem{pesw}{} Paul E. S. {\sc Wormer}, ``Young tableaux'', from the listserver tex-nl@hearn. \end{thebibliography} \end{document}