X-Git-Url: https://git.distorted.org.uk/~mdw/mdwtools/blobdiff_plain/cd62ff5f802dfaabab9cc4922cba13e4112721b6..79d2ba13adadaf724f8daa40c464d1b07d980ab8:/mdwtab.dtx

diff --git a/mdwtab.dtx b/mdwtab.dtx
index a77c8f5..5f863b2 100644
--- a/mdwtab.dtx
+++ b/mdwtab.dtx
@@ -44,7 +44,7 @@
 %<+color>                [2003/08/24 1.10 Fix for people who can't spell]
 % \end{meta-comment}
 %
-% \CheckSum{3373}
+% \CheckSum{3402}
 %% \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
@@ -224,7 +224,7 @@
 %
 % \item David Carlisle's \package{colortbl} package entirely fails to work
 %       with \package{mdwtab}.  However, we now have colour support of our
-%	own which is at times similar in style.
+%       own which is at times similar in style.
 %
 % \end{itemize}
 %
@@ -270,7 +270,7 @@
 %
 % \begin{grammar}
 %
-% <tabular-env>	::= \[[
+% <tabular-env> ::= \[[
 %   "\\begin"
 %   \begin{stack}
 %     "{tabular}" \\ "{tabular*}" "{" <length> "}" \\
@@ -284,23 +284,23 @@
 %
 % <position-arg> ::= (see below)
 %
-% <preamble>	::= \[[
+% <preamble>    ::= \[[
 %   <first-column>
 %   \[ \< <column> \> \]
 % \]]
 %
 % <first-column> ::= \[[ \[ <rule> \] <column> \]]
 %
-% <column>	::= \[[
+% <column>      ::= \[[
 %   \[ <spacing> \] \[ \< <user-pre-text> \> \] <column-type>
 %   \[ \< <user-post-text> \> \] \[ <spacing> \] \[ <rule> \]
 % \]]
 %
-% <spacing>	::= \[[ "@" "{" <text> "}" \]]
+% <spacing>     ::= \[[ "@" "{" <text> "}" \]]
 %
 % <user-pre-text> ::= \[[ \[ "?" \] ">" "{" <text> "}" \]]
 %
-% <column-type>	::= \[[
+% <column-type> ::= \[[
 %   \begin{stack}
 %     \[ "T" \\ "M" \] \( "l" \\ "c" \\ "r" \) \\
 %     \( "p" \\ "m" \\ "b" \) "{" <length> "}" \\
@@ -310,7 +310,7 @@
 %
 % <user-post-text> ::= \[[ \[ "?" \] "<" "{" <text> "}" \]]
 %
-% <rule>	::= \[[ \( "|" \\ "!" "{" <text> "}" \) \]]
+% <rule>        ::= \[[ \( "|" \\ "!" "{" <text> "}" \) \]]
 %
 % \end{grammar}
 %
@@ -327,53 +327,53 @@
 % The actual column types are shown in table~\ref{tbl:columns}.
 %
 % \begin{table}
-% \begin{tabular}[C]{| >{\synshorts} c | m{3in} |}	   \hlx{hv[1]}
-%
-% \multicolumn{2}{|c|}{\bf Column types}		\\ \hlx{v[1]hv}
-% \bf Name	& \bf Meaning				\\ \hlx{vhv.}
-% "l"		& Left aligned text (\env{tabular}) or
-%		  equation (\env{array}).		\\ \hlx{.}
-% "c"		& Centred text (\env{tabular}) or
-%		  equation (\env{array}).		\\ \hlx{.}
-% "r"		& Right aligned text (\env{tabular}) or
-%		  equation (\env{array}).		\\ \hlx{vhv.}
+% \begin{tabular}[C]{| >{\synshorts} c | m{3in} |}         \hlx{hv[1]}
+%
+% \multicolumn{2}{|c|}{\bf Column types}                \\ \hlx{v[1]hv}
+% \bf Name      & \bf Meaning                           \\ \hlx{vhv.}
+% "l"           & Left aligned text (\env{tabular}) or
+%                 equation (\env{array}).               \\ \hlx{.}
+% "c"           & Centred text (\env{tabular}) or
+%                 equation (\env{array}).               \\ \hlx{.}
+% "r"           & Right aligned text (\env{tabular}) or
+%                 equation (\env{array}).               \\ \hlx{vhv.}
 % "Ml", "Mc" and "Mr" & Left, centre and right aligned
-%		  equations.*				\\ \hlx{.}
+%                 equations.*                           \\ \hlx{.}
 % "Tl", "Tc" and "Tr" & Left, centre and right aligned
-%		  text.*				\\ \hlx{vhv.}
+%                 text.*                                \\ \hlx{vhv.}
 % "p{"<width>"}" & Top aligned paragraph with the given
-%		  width.				\\ \hlx{.}
+%                 width.                                \\ \hlx{.}
 % "m{"<width>"}" & Vertically centred paragraph with
-%		  the given width.			\\ \hlx{.}
+%                 the given width.                      \\ \hlx{.}
 % "b{"<width>"}" & Bottom aligned paragraph with the
-%		  given width.				\\ \hlx{vhv.}
+%                 given width.                          \\ \hlx{vhv.}
 % "#{"<pre>"}{"<post>"}" & User defined column type:
-%		  \<pre> is inserted before the
-%		  cell entry, \<post> is inserted
-%		  afterwards.*				\\ \hlx{vhhv[1]}
-%
-% \multicolumn{2}{|c|}{\bf Other modifier characters}	\\ \hlx{v[1]hv}
-% \bf Name	& \bf Meaning				\\ \hlx{vhv.}
-% "|"		& Inserts a vertical rule between
-%		  columns.				\\ \hlx{.}
+%                 \<pre> is inserted before the
+%                 cell entry, \<post> is inserted
+%                 afterwards.*                          \\ \hlx{vhhv[1]}
+%
+% \multicolumn{2}{|c|}{\bf Other modifier characters}   \\ \hlx{v[1]hv}
+% \bf Name      & \bf Meaning                           \\ \hlx{vhv.}
+% "|"           & Inserts a vertical rule between
+%                 columns.                              \\ \hlx{.}
 % "$*["<params>"]" & Inserts a vertical rule of given
 %                 width between columns; "*" selects
 %                 "\arraythickrulewidth".*              \\ \hlx{.}
-% "!{"<text>"}"	& Inserts \<text> between columns,
-%		  treating it as a vertical rule.	\\ \hlx{vhv.}
-% "@{"<text>"}"	& Inserts \<text> instead of the
-%		  usual intercolumn space.		\\ \hlx{vhv.}
-% ">{"<text>"}"	& Inserts \<text> just before the
-%		  actual column entry.			\\ \hlx{.}
-% "<{"<text>"}"	& Inserts \<text> just after the
-%		  actual column entry.			\\ \hlx{.}
+% "!{"<text>"}" & Inserts \<text> between columns,
+%                 treating it as a vertical rule.       \\ \hlx{vhv.}
+% "@{"<text>"}" & Inserts \<text> instead of the
+%                 usual intercolumn space.              \\ \hlx{vhv.}
+% ">{"<text>"}" & Inserts \<text> just before the
+%                 actual column entry.                  \\ \hlx{.}
+% "<{"<text>"}" & Inserts \<text> just after the
+%                 actual column entry.                  \\ \hlx{.}
 % "?<{"<text>"}" & Inserts \<text> before the column
 %                 entry \emph{and} the rules list.*     \\ \hlx{.}
 % "?>{"<text>"}" & Inserts \<text> after the column
 %                 entry \emph{and} the rules list.*     \\ \hlx{vhv.}
 % "*{"<count>"}{"<chars>"}" & Inserts \<count>
-%		  copies of the \<chars> into the
-%		  preamble.				\\ \hlx{vhs}
+%                 copies of the \<chars> into the
+%                 preamble.                             \\ \hlx{vhs}
 %
 % \multicolumn{2}{@{}l}{* This column type is a new feature}
 % \end{tabular}
@@ -446,7 +446,7 @@
 % separated list of column numbers and ranges:
 %
 % \begin{grammar}
-% <cline-cmd>	::= \[[
+% <cline-cmd>   ::= \[[
 %   "\\cline"
 %   \[ "*" \] \\ \[ "[" <rule-params> "]" \]
 %   "{" \< <number> \[ "-" <number> \] \\ "," \> "}"
@@ -496,11 +496,11 @@
 %
 % \begin{grammar}
 %
-% <vgap-cmd>	::= \[[
+% <vgap-cmd>    ::= \[[
 %   "\\vgap" \[ "[" <which-cols> "]" \] "{" <length> "}"
 % \]]
 %
-% <which-cols>	::= \[[ \< <number> \[ "-" <number> \] \\ "," \> \]]
+% <which-cols>  ::= \[[ \< <number> \[ "-" <number> \] \\ "," \> \]]
 %
 % \end{grammar}
 %
@@ -527,7 +527,7 @@
 % The syntax is simple:
 % \begin{grammar}
 %
-% <hlx-cmd>	::= \[[
+% <hlx-cmd>     ::= \[[
 %   "\\hlx"
 %   \[ "*" \] \[ "[" <rule-params> "]" \]
 %   "{"
@@ -553,7 +553,7 @@
 % 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:
@@ -570,8 +570,8 @@
 %
 % \item [\lit*{z[}\<which-cols>\lit*{][}\<length>\lit*{]}]  Like \lit{v},
 %       except that the default gap is the current rule width (set by the
-%	\<rule-params>) rather than |\doublerulesep|.  This is a good thing
-%	to insert before a |\cline| row.
+%       \<rule-params>) rather than |\doublerulesep|.  This is a good thing
+%       to insert before a |\cline| row.
 %
 % \item [\lit*{s[}\<length>\lit*{]}]  Leaves a vertical gap with the
 %       given size.  If you omit the \<length> then |\doublerulesep| is
@@ -651,7 +651,7 @@
 % 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:
@@ -741,48 +741,48 @@
 % and tables look nicer.  They are all listed in table~\ref{tbl:config}.
 %
 % \begin{table}
-% \begin{tabular}[C]{| l | m{3in} |}				   \hlx{hv}
-% \bf Parameter		& \bf Meaning				\\ \hlx{vhv}
-% |\tabstyle|		& A command executed at the beginning of
-%			  a \env{tabular} or \env{tabular$*$}
-%			  environment.  By default does nothing.
-%			  Change using |\renewcommand|.		\\ \hlx{vhv}
-% |\extrarowheight|	& A length added to the height of every
-%			  row, used to stop table rules
-%			  overprinting ascenders.  Default 0\,pt.
-%			  Usage is deprecated now: use |\hlx|
-%			  instead.				\\ \hlx{vhv}
-% |\tabextrasep|	& Extra space added between rows in a
-%			  \env{tabular} or \env{tabular$*$}
-%			  environment (added \emph{before} any
-%			  following |\hline|).  Default 0\,pt.	\\
-% |\arrayextrasep|	& Analogous to |\tabextrasep|, but for
-%			  \env{array} environments.  Default
-%			  1\,jot (3\,pt).			\\
-% |\smarrayextrasep|	& Analogous to |\tabextrasep|, but for
-%			  \env{smarray} environments.  Default
-%			  1\,pt.				\\ \hlx{vhv}
-% |\tabcolsep|		& Space added by default on each side of
-%			  a table cell (unless suppressed by an
-%			  \lit{@}-expression) in \env{tabular}
-%			  environments.  Default is defined by
-%			  your document class.			\\
-% |\arraycolsep|	& Analogous to |\tabcolsep|, but for
-%			  \env{array} environments.  Default is
-%			  defined by your document class.	\\
-% |\smarraycolsep|	& Analogous to |\tabcolsep|, but for
-%			  \env{smarray} environments.  Default
-%			  is 3\,pt.				\\ \hlx{vhv}
-% |\arrayrulewidth|	& The width of horizontal and vertical
-%			  rules in tables.			\\
-% |\arraythickrulewidth|& The width of starred rules in tables.	\\
-% |\doublerulesep|	& Space added between two adjacent
-%			  vertical or horizontal rules.  Also
-%			  used by |\hlx{v}|.			\\ \hlx{vhv}
-% |\arraystretch|	& Command containing a factor to
-%			  multiply the default row height.
-%			  Default is defined by your document
-%			  class (usually 1).			\\ \hlx{vh}
+% \begin{tabular}[C]{| l | m{3in} |}                               \hlx{hv}
+% \bf Parameter         & \bf Meaning                           \\ \hlx{vhv}
+% |\tabstyle|           & A command executed at the beginning of
+%                         a \env{tabular} or \env{tabular$*$}
+%                         environment.  By default does nothing.
+%                         Change using |\renewcommand|.         \\ \hlx{vhv}
+% |\extrarowheight|     & A length added to the height of every
+%                         row, used to stop table rules
+%                         overprinting ascenders.  Default 0\,pt.
+%                         Usage is deprecated now: use |\hlx|
+%                         instead.                              \\ \hlx{vhv}
+% |\tabextrasep|        & Extra space added between rows in a
+%                         \env{tabular} or \env{tabular$*$}
+%                         environment (added \emph{before} any
+%                         following |\hline|).  Default 0\,pt.  \\
+% |\arrayextrasep|      & Analogous to |\tabextrasep|, but for
+%                         \env{array} environments.  Default
+%                         1\,jot (3\,pt).                       \\
+% |\smarrayextrasep|    & Analogous to |\tabextrasep|, but for
+%                         \env{smarray} environments.  Default
+%                         1\,pt.                                \\ \hlx{vhv}
+% |\tabcolsep|          & Space added by default on each side of
+%                         a table cell (unless suppressed by an
+%                         \lit{@}-expression) in \env{tabular}
+%                         environments.  Default is defined by
+%                         your document class.                  \\
+% |\arraycolsep|        & Analogous to |\tabcolsep|, but for
+%                         \env{array} environments.  Default is
+%                         defined by your document class.       \\
+% |\smarraycolsep|      & Analogous to |\tabcolsep|, but for
+%                         \env{smarray} environments.  Default
+%                         is 3\,pt.                             \\ \hlx{vhv}
+% |\arrayrulewidth|     & The width of horizontal and vertical
+%                         rules in tables.                      \\
+% |\arraythickrulewidth|& The width of starred rules in tables. \\
+% |\doublerulesep|      & Space added between two adjacent
+%                         vertical or horizontal rules.  Also
+%                         used by |\hlx{v}|.                    \\ \hlx{vhv}
+% |\arraystretch|       & Command containing a factor to
+%                         multiply the default row height.
+%                         Default is defined by your document
+%                         class (usually 1).                    \\ \hlx{vh}
 % \end{tabular}
 %
 % \caption{Parameters for configuring table environments}
@@ -816,7 +816,7 @@
 % This implementation allows you to define lots of different sets of columns.
 % You can change the current set using the |\colset| declaration:
 % \begin{grammar}
-% <colset-cmd>	::= \[[ "\\colset" "{" <set-name> "}" \]]
+% <colset-cmd>  ::= \[[ "\\colset" "{" <set-name> "}" \]]
 % \end{grammar}
 % This leaves a problem, though: at any particular moment, the current
 % column set could be anything, since other macros and packages can change
@@ -832,8 +832,8 @@
 % previous current column set.
 %
 % \begin{grammar}
-% <colpush-cmd>	::= \[[ "\\colpush" "{" <set-name> "}" \]]
-% <colpop-cmd>	::= \[[ "\\colpop" \]]
+% <colpush-cmd> ::= \[[ "\\colpush" "{" <set-name> "}" \]]
+% <colpop-cmd>  ::= \[[ "\\colpop" \]]
 % \end{grammar}
 %
 % The macros which manipulate the column set stack work \emph{locally}.
@@ -869,7 +869,7 @@
 % something lower-level.
 %
 % \begin{grammar}
-% <coldef-cmd>	::= \[[
+% <coldef-cmd>  ::= \[[
 %   "\\coldef"
 %     \[ "[" <set-name> "]" \]
 %     <col-name> <arg-template> "{" <replacement-text> "}"
@@ -890,7 +890,7 @@
 % 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:
 %
@@ -929,7 +929,7 @@
 %
 % \begin{grammar}
 %
-% <collet-cmd>	::= \[[
+% <collet-cmd>  ::= \[[
 %   \[ "[" <set-name> "]" \] <col-name> \[ "=" \] \[ "[" <set-name> "]" \]
 %   <col-name>
 % \]]
@@ -1029,7 +1029,7 @@
 % using the |\tab@cr| command:
 %
 % \begin{grammar}
-% <tabcr-cmd>	::= \[[
+% <tabcr-cmd>   ::= \[[
 %   "\\tab@cr" <command> "{" <non-star-text> "}" "{" <star-text> "}"
 % \]]
 % \end{grammar}
@@ -1082,7 +1082,7 @@
 %   \[ "*" \]
 %   \[ "[" <colour-model> "]" \]
 %   "{" <colour> "}"
-%   \[ "[" <left-overhang> "]" 
+%   \[ "[" <left-overhang> "]"
 %      \[ "[" <right-overhang> "]" \] \]
 % \]]
 % \end{grammar}
@@ -1237,7 +1237,7 @@
 %   \[ "[" \< <eqa-column> \> "]" \]
 % \]]
 %
-% <eqa-column>	::= \[[
+% <eqa-column>  ::= \[[
 %   \[ "q" \\ ":" \]
 %   \[ \< ">" "{" <pre-text> "}" \> \]
 %   \begin{stack}
@@ -1258,34 +1258,34 @@
 % table~\ref{tbl:eqnarray}.
 %
 % \begin{table}
-% \begin{tabular}[C]{| >{\synshorts} c | m{3in} |}	   \hlx{hv[1]}
-%
-% \multicolumn{2}{|c|}{\bf Column types}		\\ \hlx{v[1]hv}
-% \bf Name	& \bf Meaning				\\ \hlx{vhv.}
-% "l"		& Left aligned piece of equation.	\\ \hlx{.}
-% "c"		& Centred piece of equation.		\\ \hlx{.}
-% "x"		& Centred or flush-left whole equation
-%		  (depending on \textsf{fleqn} option).	\\ \hlx{.}
-% "r"		& Right aligned piece of equation.	\\ \hlx{vhv.}
-% "L"		& Left aligned piece of equation whose
-%		  width is considered to be 2\,em.	\\ \hlx{vhv.}
+% \begin{tabular}[C]{| >{\synshorts} c | m{3in} |}         \hlx{hv[1]}
+%
+% \multicolumn{2}{|c|}{\bf Column types}                \\ \hlx{v[1]hv}
+% \bf Name      & \bf Meaning                           \\ \hlx{vhv.}
+% "l"           & Left aligned piece of equation.       \\ \hlx{.}
+% "c"           & Centred piece of equation.            \\ \hlx{.}
+% "x"           & Centred or flush-left whole equation
+%                 (depending on \textsf{fleqn} option). \\ \hlx{.}
+% "r"           & Right aligned piece of equation.      \\ \hlx{vhv.}
+% "L"           & Left aligned piece of equation whose
+%                 width is considered to be 2\,em.      \\ \hlx{vhv.}
 % "Tl", "Tc" and "Tr" & Left, centre and right aligned
-%		  text.					\\ \hlx{vhhv[1]}
-%
-% \multicolumn{2}{|c|}{\bf Other modifier characters}	\\ \hlx{v[1]hv}
-% \bf Name	& \bf Meaning				\\ \hlx{vhv.}
-% ":"		& Leaves a big gap between equations.
-%		  By default, the `chunks' separated by
-%		  \lit{:}s are equally spaced on the
-%		  line.					\\ \hlx{.}
-% "q"		& Inserts 1\,em of space		\\ \hlx{vhv.}
-% ">{"<text>"}"	& Inserts \<text> just before the
-%		  actual column entry.			\\ \hlx{.}
-% "<{"<text>"}"	& Inserts \<text> just after the
-%		  actual column entry.			\\ \hlx{vhv.}
+%                 text.                                 \\ \hlx{vhhv[1]}
+%
+% \multicolumn{2}{|c|}{\bf Other modifier characters}   \\ \hlx{v[1]hv}
+% \bf Name      & \bf Meaning                           \\ \hlx{vhv.}
+% ":"           & Leaves a big gap between equations.
+%                 By default, the `chunks' separated by
+%                 \lit{:}s are equally spaced on the
+%                 line.                                 \\ \hlx{.}
+% "q"           & Inserts 1\,em of space                \\ \hlx{vhv.}
+% ">{"<text>"}" & Inserts \<text> just before the
+%                 actual column entry.                  \\ \hlx{.}
+% "<{"<text>"}" & Inserts \<text> just after the
+%                 actual column entry.                  \\ \hlx{vhv.}
 % "*{"<count>"}{"<chars>"}" & Inserts \<count>
-%		  copies of the \<chars> into the
-%		  preamble.				\\ \hlx{vh}
+%                 copies of the \<chars> into the
+%                 preamble.                             \\ \hlx{vh}
 % \end{tabular}
 %
 % \caption{\package{eqnarray} column types and modifiers}
@@ -1317,7 +1317,7 @@
 %
 % \begin{demo}[w]{Lots of equations}
 %\begin{eqnarray}[rl:rl:lq]
-% V_i &= v_i - q_i v_j,	& X_i &= x_i - q_i x_j,	&
+% V_i &= v_i - q_i v_j, & X_i &= x_i - q_i x_j, &
 %       U_i = u_i, \qquad \mbox{for $i \ne j$}  \\
 % V_j &= v_j,           & X_j &= x_j            &
 %       U_j u_j + \sum_{i \ne j} q_i u_i. \label{eq:A}
@@ -1533,31 +1533,31 @@
 % you like them.  These are all shown in table~\ref{tbl:eqnparms}.
 %
 % \begin{table}
-% \begin{tabular}[C]{| l | p{3in} |}				   \hlx{hv}
-% \bf Parameter		& \bf Use				\\ \hlx{vhv}
-% |\eqaopenskip|	& Length put on the left of an
-%			  \env{eqnarray} environment.  By
-%			  default, this is |\@centering| (to
-%			  centre the alignment) or |\mathindent|
-%			  (to left align) depending on whether
-%			  you're using the \textsf{fleqn}
-%			  document class option.		\\
-% |\eqacloseskip|	& Length put on the right of an
-%			  \env{eqnarray} environment.  By
-%			  default, this is |\@centering|, to
-%			  align the environment correctly.	\\ \hlx{vhv}
-% |\eqacolskip|		& Space added by the \lit{:} column
-%			  modifier.  This should be a rubber
-%			  length, although it only stretches in
-%			  \env{eqnarray}, not in \env{eqnalign}.
-%			  The default value is 1\smallf1/2\,em
-%			  with 1000\,pt of stretch.		\\
-% |\eqainskip|		& Space added at each side of a normal
-%			  column.  By default this is 0\,pt.	\\ \hlx{vhv}
-% |\eqastyle|		& The maths style used in the alignment.
-%			  By default, this is |\textstyle|,
-%			  and you probably won't want to change
-%			  it.					\\ \hlx{vh}
+% \begin{tabular}[C]{| l | p{3in} |}                               \hlx{hv}
+% \bf Parameter         & \bf Use                               \\ \hlx{vhv}
+% |\eqaopenskip|        & Length put on the left of an
+%                         \env{eqnarray} environment.  By
+%                         default, this is |\@centering| (to
+%                         centre the alignment) or |\mathindent|
+%                         (to left align) depending on whether
+%                         you're using the \textsf{fleqn}
+%                         document class option.                \\
+% |\eqacloseskip|       & Length put on the right of an
+%                         \env{eqnarray} environment.  By
+%                         default, this is |\@centering|, to
+%                         align the environment correctly.      \\ \hlx{vhv}
+% |\eqacolskip|         & Space added by the \lit{:} column
+%                         modifier.  This should be a rubber
+%                         length, although it only stretches in
+%                         \env{eqnarray}, not in \env{eqnalign}.
+%                         The default value is 1\smallf1/2\,em
+%                         with 1000\,pt of stretch.             \\
+% |\eqainskip|          & Space added at each side of a normal
+%                         column.  By default this is 0\,pt.    \\ \hlx{vhv}
+% |\eqastyle|           & The maths style used in the alignment.
+%                         By default, this is |\textstyle|,
+%                         and you probably won't want to change
+%                         it.                                   \\ \hlx{vh}
 % \end{tabular}
 %
 % \caption{Parameters for the \env{eqnarray} and \env{eqnalign} environments}
@@ -1628,15 +1628,15 @@
 %
 % \begin{grammar}
 %
-% <matrix-env>	::= \[[ <begin-matrix> <contents> <end-matrix> \]]
+% <matrix-env>  ::= \[[ <begin-matrix> <contents> <end-matrix> \]]
 %
 % <begin-matrix> ::= \[[ "\\begin{matrix}" \[ "[" <matrix-cols> "]" \] \]]
 %
-% <matrix-cols>	::= \[[
+% <matrix-cols> ::= \[[
 %   \< \[ "[" \] \[ "T" \] \( "l" \\ "c" \\ "r" \) \>
 % \]]
 %
-% <end-matrix>	::= \[[ "\\end{stack}" \]]
+% <end-matrix>  ::= \[[ "\\end{stack}" \]]
 %
 % \end{grammar}
 %
@@ -1946,14 +1946,14 @@
 %
 %
 % \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.
 %
@@ -2052,7 +2052,7 @@
 % {\bf while} $\it tab\_state \ne s$ {\bf do} \\
 % \qq $\mathit{tab\_state = tab\_state}+1$; \\
 % \qq {\bf if} $\it tab\_state = tab\_limitState$ {\bf then}
-%				$\it tab\_state=tab\_loopState$; \\
+%                               $\it tab\_state=tab\_loopState$; \\
 % \qq {\bf if} $\it tab\_state = tab\_preSpcState$ {\bf then} \\
 % \qq \qq {\bf if} $\it tab\_initRule$ {\bf then} \\
 % \qq \qq \qq $\it tab\_initRule = {\bf false}$; \\
@@ -2063,7 +2063,7 @@
 % \qq \qq {\bf end\,if}; \\
 % \qq {\bf end\,if}; \\
 % \qq {\bf if} $\it tab\_state \ne s$ {\bf then}
-%				$\it do\_default(tab\_state)$; \\
+%                               $\it do\_default(tab\_state)$; \\
 % {\bf end\,while};
 % \end{quote}
 %
@@ -2855,7 +2855,11 @@
   \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%
@@ -2969,7 +2973,7 @@
   \extrarowheight\z@%
   \col@sep\smarraycolsep%
   \let\tab@extrasep\smarrayextrasep%
-  \def\tab@bmaths{$\color@begingroup\scriptstyle}%
+  \def\tab@bmaths{\color@begingroup$\scriptstyle}%
   \def\tab@btext{\begingroup\scriptsize}%
   \setbox\z@\hbox{\scriptsize\strut}%
   \dimen@\ht\z@\dimen@ii\dp\z@\tab@setstrut%
@@ -3783,7 +3787,7 @@
 %
 % \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
@@ -3989,18 +3993,18 @@
 %       Computer Programming} use the little `stub lines' to show where
 %       data items cross byte boundaries:
 %
-%	^^A This actually looks terrifyingly similar to the original.
-%	^^A The leading @{} is there to stop the table looking off-centre,
-%	^^A because there's no left hand rule telling you where the table
-%	^^A starts, like there is on the right, just the \tabcolsep glue.
+%       ^^A This actually looks terrifyingly similar to the original.
+%       ^^A The leading @{} is there to stop the table looking off-centre,
+%       ^^A because there's no left hand rule telling you where the table
+%       ^^A starts, like there is on the right, just the \tabcolsep glue.
 %
-%	\begingroup
-%	\newcommand{\wide}[2]{\multicolumn{#1}{c|}{\ttfamily #2}}
-%	\begin{tabular}[C]{@{} r @{\qquad} | Mc | *{5}{c|}} \hlx{c{2-7} v}
-%          empty & - & 1 & 0 & 0 & 0 & 0		\\ \hlx{v c{2-7} v}
-%	occupied & + & \wide{2}{LINK} & \wide{3}{KEY}	\\ \hlx{v c{2-7}}
-%	\end{tabular}
-%	\endgroup
+%       \begingroup
+%       \newcommand{\wide}[2]{\multicolumn{#1}{c|}{\ttfamily #2}}
+%       \begin{tabular}[C]{@{} r @{\qquad} | Mc | *{5}{c|}} \hlx{c{2-7} v}
+%          empty & - & 1 & 0 & 0 & 0 & 0                \\ \hlx{v c{2-7} v}
+%       occupied & + & \wide{2}{LINK} & \wide{3}{KEY}   \\ \hlx{v c{2-7}}
+%       \end{tabular}
+%       \endgroup
 %
 % \end{itemize}
 %
@@ -4881,7 +4885,7 @@
   \if@fleqn%
     \eqaopenskip\mathindent%
     \splitleft\mathindent\relax%
-    \splitright\mathindent\@minus\mathindent\relax%  
+    \splitright\mathindent\@minus\mathindent\relax%
   \else%
     \eqaopenskip\@centering%
     \splitleft2.5em\@minus2.5em%
@@ -5143,7 +5147,7 @@
 % \end{environment}
 % \end{environment}
 %
-% Now we can define the column types. 
+% Now we can define the column types.
 %
 %    \begin{macrocode}
 \colpush{eqnarray}
@@ -5228,13 +5232,13 @@
 % The macro |\eqa@eqpos| will put its argument in the right place.
 %
 %    \begin{macrocode}
-\if@leqno
-  \def\eqa@eqpos#1{%
+\def\eqa@eqpos#1{%
+  \if@leqno%
     \hb@xt@.01\p@{}\rlap{\normalfont\normalcolor\hskip-\displaywidth#1}%
-  }
-\else
-  \def\eqa@eqpos#1{\normalfont\normalcolor#1}
-\fi
+  \else%
+    \normalfont\normalcolor#1%
+  \fi%
+}
 %    \end{macrocode}
 %
 % \end{macro}
@@ -5577,9 +5581,13 @@
 % we need to remove them by hand at the extremities of the environment.
 %
 %    \begin{macrocode}
-\def\subsplit{%
+\def\subsplit{\@ifnextchar[\subsplit@i{\subsplit@i[c]}}
+\def\subsplit@i[#1]{%
+  \let\@tempa\vcenter%
+  \if#1t\let\@tempa\vtop\fi%
+  \if#1b\let\@tempa\vbox\fi%
   \let\\\seq@cr%
-  \vcenter\bgroup%
+  \@tempa\bgroup%
   \seq@dosplit{\hfil\qquad$##$\qquad\hfil}{\hfilneg\hskip-2em}%
 }
 %    \end{macrocode}
