summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eqnarray/eqnarray.sty
blob: 3be35b4eadd5a1743e5aa5645e9e04d497eba39c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
%%
%% This is file `eqnarray.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% eqnarray.dtx  (with options: `style')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from eqnarray.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file eqnarray.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\def\fileversion{1.3}
\def\filedate{December 1, 2010}
\def\docdate{December 1, 2010}
  \typeout{equationarray \fileversion\space<\filedate>}
  % \typeout{English documentation\space\space<\docdate>}
  \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{eqnarray}
\RequirePackage{array}
\def\eqnarr@left{\@centering}
\let\eqnarr@opts\relax
\DeclareOption{fleqn}{
  \def\eqnarr@left{\mathindent}
  \def\eqnarr@opts{\displaywidth\linewidth
                   \advance\displaywidth-\mathindent} }
\ProcessOptions
\def\equationarray{%
 \col@sep\arraycolsep
 \def\d@llarbegin{$\displaystyle}%
 \def\d@llarend{$}%
 \stepcounter{equation}%
 \let\@currentlabel=\theequation
 \set@eqnsw \global\@eqcnt\z@ \global\@eqargcnt\z@
 \let\@classz\@eqnclassz
 \def\multicolumn##1##2##3{\@eqnmulticolumn{##1}{##2}{##3}%
                           \global\advance\@eqcnt##1
                           \global\advance\@eqcnt\m@ne}%
 \def\eqnnum##1{\global\@eqnswfalse\gdef\@eqnarrnum{##1}}
 \def\@halignto{to\displaywidth}%
 \@ifnextchar[{\@equationarray}{\@equationarray[.]}}
\let\@eqnmulticolumn=\multicolumn
\def\yesnumber{\global\@eqnswtrue}
\let\set@eqnsw=\yesnumber
\def\@amper{&}
\newcount\@eqargcnt  % counts number of columns
\def\@equationarray[#1]#2{%
     \eqnarr@opts
     \@tempdima \ht \strutbox
     \advance \@tempdima by\extrarowheight
     \setbox\@arstrutbox=\hbox{\vrule
               \@height\arraystretch \@tempdima
               \@depth\arraystretch \dp \strutbox
               \@width\z@}%
     \gdef\advance@eqargcnt{\global\advance\@eqargcnt\@ne}%
     \begingroup
     \@mkpream{#2}%
     \xdef\@preamble{%
      \if #1l\tabskip\z@ \else\if #1r\tabskip\@centering
                         \else\if #1c\tabskip\@centering
                         \else\tabskip\eqnarr@left \fi\fi\fi
      \halign \@halignto
      \bgroup \tabskip\z@ \@arstrut \@preamble
      \if #1l\tabskip\@centering \else\if #1r\tabskip\z@
                                 \else\tabskip\@centering \fi\fi
      \@amper\llap{\@sharp}\tabskip\z@\cr}%
     \endgroup
     \gdef\advance@eqargcnt{}%
     \bgroup
     \let\@sharp## \let\protect\relax
     \m@th   \let\\=\@equationcr
     \let\par\@empty
     $$                            % $$ BRACE MATCHING HACK
     \lineskip \z@
     \baselineskip \z@
     \@preamble}
\def\@eqnclassz{\@classx
   \@tempcnta \count@
   \advance@eqargcnt
   \prepnext@tok
   \@addtopreamble{%
      \global\advance\@eqcnt\@ne
      \ifcase \@chnum
      \hfil \d@llarbegin \insert@column \d@llarend\hfil \or
      \d@llarbegin \insert@column \d@llarend \hfil \or
      \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or
      $\vcenter
      \@startpbox{\@nextchar}\insert@column \@endpbox $\or
      \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
      \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
      \fi}\prepnext@tok}
\def\endequationarray{\@zequationcr
   \egroup
   \global\advance\c@equation\m@ne $$  % $$ BRACE MATCHING HACK
   \egroup\global\@ignoretrue
   \gdef\@preamble{}}
\def\@equationcr{${\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
    \@xequationcr}{\global\@eqpen\interdisplaylinepenalty
                   \@xequationcr}}
\def\@xequationcr{%
    \@ifnextchar[{\@argequationcr}{\ifnum0=`{\fi}${}%
    \@zequationcr}}
\def\@argequationcr[#1]{\ifnum0=`{\fi}${}\ifdim #1>\z@
   \@xargequationcr{#1}\else
   \@yargequationcr{#1}\fi}
\def\@xargequationcr#1{\unskip
   \@tempdima #1\advance\@tempdima \dp \@arstrutbox
   \vrule \@depth\@tempdima \@width\z@
   \@zequationcr\noalign{\penalty\@eqpen}}
\def\@yargequationcr#1{%
   \@zequationcr\noalign{\penalty\@eqpen\vskip #1}}
\let\@eqnarrnum\relax
\def\@zequationcr{\@whilenum\@eqcnt <\@eqargcnt
   \do{\@amper\omit\global\advance\@eqcnt\@ne}%
   \@amper
   \if@eqnsw\@eqnnum\stepcounter{equation}\else
     \@eqnarrnum\global\let\@eqnarrnum\relax\fi
   \set@eqnsw\global\@eqcnt\z@\cr}
\@namedef{equationarray*}{%
   \let\set@eqnsw=\nonumber \equationarray}
\@namedef{endequationarray*}{\endequationarray}
\endinput
%%
%% End of file `eqnarray.sty'.