Whitespace cleanup.
[mdwtools] / mdwtab.dtx
index ee11ce6..3c4b419 100644 (file)
@@ -44,7 +44,7 @@
 %<+color>                [2003/08/24 1.10 Fix for people who can't spell]
 % \end{meta-comment}
 %
-% \CheckSum{3391}
+% \CheckSum{3404}
 %% \CharacterTable
 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
 % The |*| or optional \<rule-params> give rule-drawing parameters for the |h|
 % and |c| subcommands.  (Note that you can't pass a |*| or an optional
 % parameters argument to the |h| or |c| subcommands directly.)  See
-% section~\ref{sec:ruleparams}. 
+% section~\ref{sec:ruleparams}.
 %
 % The argument works a bit like a table preamble, really.  Each letter is a
 % command.  The following are supported:
 % then you get an extra thick rule at the bottom of the page.  This is a bit
 % of a problem, because if the rule isn't there in the footer and you get
 % a break between two rows \emph{without} a rule between them, then the page
-% looks very odd.  
+% looks very odd.
 %
 % If you want to do ruled longtables, I'd recommend that you proceed as
 % follows:
 % Note that if you do gobble the |\tab@mkpream|, it's your responsibility to
 % insert another one at the very end of your macro's expansion (so that
 % further preamble characters can be read).
-% 
+%
 % The replacement text is inserted directly.  It's normal to insert preamble
 % elements here.  There are several to choose from:
 %
 %   \[ "*" \]
 %   \[ "[" <colour-model> "]" \]
 %   "{" <colour> "}"
-%   \[ "[" <left-overhang> "]" 
+%   \[ "[" <left-overhang> "]"
 %      \[ "[" <right-overhang> "]" \] \]
 % \]]
 % \end{grammar}
 %
 %
 % \subsection{Parser states}
-% 
+%
 % Now we start on the parser.  It's really simple, deep down.  We progress
 % from state to state, extracting tokens from the preamble and building
 % command names from them.  Each command calls one of the element-building
 % routines, which works out which state it should be in.  We go through each
 % of the states in between (see later) doing default things for the ones we
 % missed out.
-% 
+%
 % Anyway, here's some symbolic names for the states.  It makes my life
 % easier.
 %
 \coldef <#1{\tabuserposttype{#1}}
 \coldef ?#1#2{%
   \ifx>#1\expandafter\tabuserpretype%
-  \else\expandafter\tabusrposttype\fi%
+  \else\expandafter\tabuserposttype\fi%
   {#2}%
   \tab@append\tab@shortline{#2}%
 }
   \tab@initread%
   \def\tab@multicol{\@arstrut}%
   \tab@preamble{\tab@multicol}%
-  \def\tab@midtext{\ignorespaces\@sharp\@sharp\@maybe@unskip}%
+  \let\tab@lefttext\tab@lefttexthook%
+  \let\tab@righttext\tab@righttexthook%
+  \let\tab@leftruletext\tab@leftruletexthook%
+  \let\tab@rightruletext\tab@rightruletexthook%
+  \def\tab@midtext{\tab@setcr\ignorespaces\@sharp\@sharp\@maybe@unskip}%
   \tab@readpreamble{#1}%
   \gdef\@preamble{\the\tab@preamble}%
   \let\tab@bgroup\begingroup%
 %
 % \begin{macro}{\tab@dohline}
 %
-% This is where hlines actually get drawn.  
+% This is where hlines actually get drawn.
 % Drawing lines is more awkward than it used to be, particularly in unboxed
 % tables.  It used to be a case simply of saying |\noalign{\hrule}|.
 % However, since unboxed tables are actually much wider than they look, this
   \if@fleqn%
     \eqaopenskip\mathindent%
     \splitleft\mathindent\relax%
-    \splitright\mathindent\@minus\mathindent\relax%  
+    \splitright\mathindent\@minus\mathindent\relax%
   \else%
     \eqaopenskip\@centering%
     \splitleft2.5em\@minus2.5em%
 % \end{environment}
 % \end{environment}
 %
-% Now we can define the column types. 
+% Now we can define the column types.
 %
 %    \begin{macrocode}
 \colpush{eqnarray}