summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx')
-rw-r--r--Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx100
1 files changed, 73 insertions, 27 deletions
diff --git a/Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx b/Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx
index b543d7f1e5e..dc80a40e948 100644
--- a/Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx
+++ b/Master/texmf-dist/source/latex/eqnarray/eqnarray.dtx
@@ -1,6 +1,6 @@
-\def\fileversion{1.2}
-\def\filedate{17 May 1995}
-\def\docdate{17 May 1995}
+\def\fileversion{1.2a}
+\def\filedate{17 July 1997}
+\def\docdate{17 July 1997}
%
% \MakeShortVerb{\|}
%
@@ -9,6 +9,11 @@
% Version 1.2: Piet van Oostrum <piet@cs.ruu.nl> added the code which
% is necessary for the |fleqn| option.
% \def\filedate{17 May 1995} \def\docdate{17 May 1995}
+% Version 1.2a: \def\filedate{17 July 1997}, \def\docdate{17 July 1997}
+% Apart from a statement \RequirePackage{array} no
+% modifications have been made in the style file itself.
+% I improved the documentation and I packed
+% everything into an easier-to-use dtx file
% \fi
%
% \title{The |equationarray| environment}
@@ -16,7 +21,9 @@
% |roland.winkler@physik.uni-regensburg.de|}
% \maketitle
% \begin{abstract}\noindent
-% The |equationarray| combines the |eqnarray| and the |array| environment.
+% The |equationarray| combines the line numbering of the |eqnarray|
+% and the more flexible formatting features of the |array| environment.
+% This package requires the |array| package.
% \end{abstract}
%
% \section{Introduction}
@@ -26,9 +33,9 @@
% require more sophisticated mathematics, so three parts aren't
% enough. Simultaneously, we would like to have our equations
% numbered. If the equations aren't to be numbered, then the |array|
-% environment suffices (nevertheless it is often easier to use the
+% environment suffices. (Nevertheless it is often easier to use the
% |equationarray*| environment than both an |equation| plus an |array|
-% environment). If the equations aren't to be aligned with
+% environment.) If the equations aren't to be aligned with
% each other, then the |equation| environment is preferred.
%
% The following is a new version of Tony Li's |equationarray|
@@ -43,40 +50,56 @@
% California, tli@sargas.usc.edu starting 6/15/88.
%
% I know that my documentation of the |equationarray| environment is
-% rather short -- but maybe nobody else might like to use it and
-% even this work was superfluous. So if you think that it would be
+% rather short. So if you think that it would be
% useful to have a better documentation please let me know.
%
+%
% \section{Example}
%
% We give a short example for the use of |equationarray|. The
% text is
% %
% \begin{verbatim}
-% \newcolumntype{e}{@{}}
-% \begin{equationarray}{rclel}
-% \phi & = & \sum \bigg( & \frac{xxxxxxxxxx}{\phi}
-% \nonumber\\*[3ex]
-% & & & + \frac{yyyyyyyyyy}{\phi} \bigg) \\[4ex]
-% & = & \multicolumn{2}{l}{ \frac{zzzzzzzzzz}{\phi} }
+% \newcolumntype{e}{@{\quad}}
+% \arraycolsep 0.2em
+% \begin{equationarray}{p{2.5em}erclecercl}
+% now: & - i\partial_t \psi & = & H\,\psi & \Rightarrow
+% & \psi (t) & = & \psi (0) \exp (iEt) \\[3ex]
+% then: & - i\partial_t \psi & = & (H+E_0) \,\psi & \Rightarrow
+% & \psi (t+t_0) & = & \psi (t_0) \exp [i(E+E_0)t]
% \end{equationarray}
% \end{verbatim}
% %
-% and we obtain (usually my formulas are much longer $\ldots$)
+% \noindent and we obtain
% %
-% \newcolumntype{e}{@{}}
-% \begin{equationarray}{rclel}
-% \phi & = & \sum \bigg( & \frac{xxxxxxxxxx}{\phi}
-% \nonumber\\*[3ex]
-% & & & + \frac{yyyyyyyyyy}{\phi} \bigg) \\[4ex]
-% & = & \multicolumn{2}{l}{ \frac{zzzzzzzzzz}{\phi} }
+% \newcolumntype{e}{@{\quad}}
+% \arraycolsep 0.2em
+% \begin{equationarray}{p{2.5em}erclecercl}
+% now: & - i\partial_t \psi & = & H\,\psi & \Rightarrow
+% & \psi (t) & = & \psi (0) \exp (iEt) \\[3ex]
+% then: & - i\partial_t \psi & = & (H+E_0) \,\psi & \Rightarrow
+% & \psi (t+t_0) & = & \psi (t_0) \exp [i(E+E_0)t]
% \end{equationarray}
% %
-% One can avoid pagebreaks between two lines by using the
+% An |equationarray| behaves very much like an |array|.
+% For example, |equationarray| takes the same tokens for defining
+% columns, and new column types can be defined with
+% |\newcolumntype|. One can use |\multicolumn|, |\hline|, |\cline|,
+% and |\vline|, and |equationarray| makes use of |\arraycolsep|,
+% |\extracolsep|, and |\extrarowheight|.\footnote{Some people don't
+% like the large spacing between the columns of the standard
+% |eqnarray|. Don't be surprised that |equationarray| seems to have
+% the same ``bug''. You just have to change the value of
+% $\tt\backslash$|arraycolsep|, see the example above.} In an
+% |equationarray| all these things have the same meaning like in
+% an |array|. The main difference is that
+% by default each entry of an |equationarray| is displayed with
+% |\displaystyle| whereas |array| uses |\textstyle|.
+% One can avoid page breaks between two lines by using the
% star-version |\\*|. There is also the star-version |equationarray*|
-% which has usually no linenumbers. But if for a particular line you
-% still want a linenumber, you can use |\yesnumber|, (I find this
-% easier than many lines with |\nonumber|). With the options |[l]|
+% which has usually no line numbers. But if for a particular line you
+% still want a line number, you can use |\yesnumber|. (I find this
+% easier than many lines with |\nonumber|.) With the options |[l]|
% or |[r]| the |equationarray| will appear flushleft or flushright,
% with the options |[c]| the |equationarray| will be centered,
% e.g. |\begin{equationarray}[l]{rclll}|. The default will be centering
@@ -98,11 +121,20 @@
%
% \section{The code}
%
+%\iffalse
+%<*style>
+%\fi
% \begin{macrocode}
\typeout{equationarray \fileversion\space<\filedate>}
\typeout{English documentation\space\space<\docdate>}
% \end{macrocode}
%
+% |equationarray| can't do anything if one doesn't provide the
+% |array| package.
+% \begin{macrocode}
+\RequirePackage{array}
+% \end{macrocode}
+%
% Process the |fleqn| option.
% \begin{macrocode}
\def\eqnarr@left{\@centering}
@@ -124,6 +156,11 @@
\let\@currentlabel=\theequation
\set@eqnsw \global\@eqcnt\z@ \global\@eqargcnt\z@
\let\@classz\@eqnclassz
+% \end{macrocode}
+% We need an extended definition of |\multicolumn| which increases
+% the counter |\@eqcnt| according to the number of columns covered
+% by |\multicolumn|.
+% \begin{macrocode}
\def\multicolumn##1##2##3{\@eqnmulticolumn{##1}{##2}{##3}%
\global\advance\@eqcnt##1
\global\advance\@eqcnt\m@ne}%
@@ -239,7 +276,7 @@
% \end{macro}
%
% \begin{macro}{\@equationcr}
-% If we have |\\*| the command |\@equationcr| avoids pagebreaks
+% If we have |\\*| the command |\@equationcr| avoids page breaks
% \begin{macrocode}
\def\@equationcr{${\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
\@xequationcr}{\global\@eqpen\interdisplaylinepenalty
@@ -304,5 +341,14 @@
\@namedef{endequationarray*}{\endequationarray}
% \end{macrocode}
% \end{macro}
-%
+%\iffalse
+%</style>
+%<+driver>\documentclass{article}
+%<+driver>\usepackage{doc}
+%<+driver>\usepackage{array}
+%<+driver>\usepackage{eqnarray}
+%<+driver>\begin{document}
+%<+driver> \DocInput{eqnarray.dtx}
+%<+driver>\end{document}
+%\fi
\endinput