%From: bjnw@castle.ed.ac.uk (Brian Wylie) %Subject: \bbegin{eqnarray}{rllccl} %Keywords: equation+array != eqnarray %I've been looking for a successor to the LaTeX eqnarray environment %which allowed more control over the format and number of "columns", as %one might naturally expect to be specified by % \begin{eqnarray}{rlc|cl} % right & left & centre & vline & centre & left \label{eqn2a} \\ % right & left & centre & vline & centre & left \label{eqn2b} % \end{eqnarray} %Having scoured Clarkson, etc, and failing to come find anything hopeful %I've finally plucked up the courage to have a go at it and see what I %could come up with (I don't really know any TeX but it tends to frighten %me when I look through latex.tex :-). %I've been pfaffing with it for a bit and haven't really managed to get %it completely together. I've included a copy of my attempts for your %perusal, and hope that you don't die laughing at the horrible nastiness %of this total abortion. %=========================>8 hackarray.sty 8<============================ % hackarray.sty % % Bastard offspring of the eqnarray and tabular environments % % (Only tested with fleqn.sty, probably won't work with anything else) \newlength{\tmp} \setlength{\tmp}{\textwidth} \addtolength{\tmp}{-\mathindent} \newcommand{\num}{\stepcounter{equation}\makeatletter \let\@currentlabel=\theequation{\rm (\theequation)}} \newenvironment{hackarray}[1]{\begin{displaymath}% \begin{tabular*}{\tmp}{#1@{\extracolsep{\fill}}l@{\protect\num}}}% {\end{tabular*}\end{displaymath}} % Use like a tabular environment BUT include an extra column of &'s at end % (which aren't specified in the column format) or put a label there. % Also remember that all text is formatted in text mode NOT math mode ! % e.g. % \begin{hackarray}{rlc|cl} % right & left & centre & vline & centre & left & \label{} \\ % right & left & centre & vline & centre & left & % \end{hackarray} \endinput =========================>8 hackarray.sty 8<============================ I realise that as a "eqnarray" substitute it's a bit lame to have each array element formatted in text mode (rather than math mode), however, for my immediate needs this wasn't a serious problem (most of it wasn't maths anyway) while there were other more worrying problems (like the need for the trailing null column). As you see, it has a few problems. These may be fixable, but I think I've done as much as I can. Any suggestions greatly appreciated, including any pointers to code which does things properly. Slainte, "Since parallel programming tools exist, Brian. MIMD machines are easy to use". -- Meiko 04/90