| 1 |
%% |
| 2 |
%% This is file `amsmath.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% amsmath.dtx |
| 8 |
%% |
| 9 |
%% Copyright (C) 1995, 1999, 2000, 2013 American Mathematical Society. |
| 10 |
%% Copyright (C) 2016-2025 LaTeX Project and American Mathematical Society. |
| 11 |
%% |
| 12 |
%% This work may be distributed and/or modified under the |
| 13 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 14 |
%% of this license or (at your option) any later version. |
| 15 |
%% The latest version of this license is in |
| 16 |
%% https://www.latex-project.org/lppl.txt |
| 17 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 18 |
%% version 2005/12/01 or later. |
| 19 |
%% |
| 20 |
%% This work has the LPPL maintenance status `maintained'. |
| 21 |
%% |
| 22 |
%% The Current Maintainer of this work is the LaTeX Project. |
| 23 |
%% |
| 24 |
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) |
| 25 |
[1994/12/01]% LaTeX date must be December 1994 or later |
| 26 |
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty} |
| 27 |
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty} |
| 28 |
\DeclareCurrentRelease{}{2019-04-01} |
| 29 |
\ProvidesPackage{amsmath}[2025/07/09 v2.17z AMS math features] |
| 30 |
\edef\@temp{\catcode 96=\number\catcode 96 } |
| 31 |
\catcode\string `\`=12 |
| 32 |
\def\do#1{\catcode\number`#1=\number\catcode`#1} |
| 33 |
\edef\@temp{% |
| 34 |
\noexpand\AtEndOfPackage{% |
| 35 |
\@temp |
| 36 |
\do\"\do\'\do\(\do\)\do\*\do\+\do\,\do\-\do\.% |
| 37 |
\do\/\do\<\do\=\do\>\do\[\do\]\do\^\do\_\relax |
| 38 |
}% |
| 39 |
} |
| 40 |
\@temp |
| 41 |
\def\do#1{\catcode\number`#1=12 } |
| 42 |
\do\"\do\'\do\(\do\)\do\*\do\+\do\,\do\-\do\. |
| 43 |
\do\/\do\<\do\=\do\>\do\[\do\] |
| 44 |
\catcode`\^=7 \catcode`\_=8 |
| 45 |
\DeclareOption{intlimits}{\let\ilimits@\displaylimits} |
| 46 |
\DeclareOption{nointlimits}{\let\ilimits@\nolimits} |
| 47 |
\DeclareOption{sumlimits}{\let\slimits@\displaylimits} |
| 48 |
\DeclareOption{nosumlimits}{\let\slimits@\nolimits} |
| 49 |
\DeclareOption{namelimits}{\PassOptionsToPackage{namelimits}{amsopn}} |
| 50 |
\DeclareOption{nonamelimits}{% |
| 51 |
\PassOptionsToPackage{nonamelimits}{amsopn}} |
| 52 |
\newif\ifctagsplit@ |
| 53 |
\newif\iftagsleft@ |
| 54 |
\DeclareOption{leqno}{\tagsleft@true} |
| 55 |
\DeclareOption{reqno}{\tagsleft@false} |
| 56 |
\DeclareOption{centertags}{\ctagsplit@true} |
| 57 |
\DeclareOption{tbtags}{\ctagsplit@false} |
| 58 |
\DeclareOption{cmex10}{% |
| 59 |
\ifnum\cmex@opt=\@ne \def\cmex@opt{0}% |
| 60 |
\else \def\cmex@opt{10}\fi |
| 61 |
} |
| 62 |
\@ifundefined{cmex@opt}{\def\cmex@opt{7}}{} |
| 63 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 64 |
\newif\if@fleqn |
| 65 |
\newskip\@mathmargin |
| 66 |
\@mathmargin\@centering |
| 67 |
\DeclareOption{fleqn}{% |
| 68 |
\@fleqntrue |
| 69 |
\@mathmargin = -1sp |
| 70 |
\let\mathindent=\@mathmargin |
| 71 |
\AtBeginDocument{% |
| 72 |
\ifdim\@mathmargin= -1sp |
| 73 |
\@mathmargin\leftmargini minus\leftmargini |
| 74 |
\fi |
| 75 |
}% |
| 76 |
} |
| 77 |
\DeclareOption{alignedleftspaceyes}{\def\alignedspace@left{\null\,}} |
| 78 |
\DeclareOption{alignedleftspaceno}{\def\alignedspace@left{\null}} |
| 79 |
\DeclareOption{alignedleftspaceyesifneg}{% |
| 80 |
\def\alignedspace@left{% |
| 81 |
\edef\@tempa{\expandafter\@car\the\lastskip\@nil}% |
| 82 |
\if-\@tempa\null\,% |
| 83 |
\else |
| 84 |
\edef\@tempa{\expandafter\@car\the\lastkern\@nil}% |
| 85 |
\if-\@tempa\null\,% |
| 86 |
\else\null |
| 87 |
\fi |
| 88 |
\fi}% |
| 89 |
} |
| 90 |
\DeclareOption{?}{} |
| 91 |
\ExecuteOptions{% |
| 92 |
nointlimits,sumlimits,namelimits,centertags,alignedleftspaceyesifneg} |
| 93 |
\ProcessOptions\par |
| 94 |
\@ifpackagewith{amsmath}{?}{% |
| 95 |
\typeout{^^J% |
| 96 |
Documentation for the amsmath package is found in amsldoc.dvi^^J% |
| 97 |
(or .pdf or .tex).^^J% |
| 98 |
^^J% |
| 99 |
See also https://www.ams.org/tex/amslatex.html.^^J% |
| 100 |
^^J% |
| 101 |
Note: Using the first edition of The LaTeX Companion (1994) without^^J% |
| 102 |
errata as a guide for amsmath use is not recommended.^^J% |
| 103 |
}% |
| 104 |
}{% |
| 105 |
\typeout{% |
| 106 |
For additional information on amsmath, use the \lq ?\rq\space option.% |
| 107 |
}% |
| 108 |
} |
| 109 |
\ifnum\cmex@opt=7 \relax |
| 110 |
\DeclareFontShape{OMX}{cmex}{m}{n}{% |
| 111 |
<-8>cmex7<8>cmex8<9>cmex9% |
| 112 |
<10><10.95><12><14.4><17.28><20.74><24.88>cmex10% |
| 113 |
}{}% |
| 114 |
\expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax |
| 115 |
\else |
| 116 |
\ifnum\cmex@opt=\z@ % need to override cmex7 fontdef from amsfonts |
| 117 |
\begingroup |
| 118 |
\fontencoding{OMX}\fontfamily{cmex}% |
| 119 |
\expandafter\let\csname OMX+cmex\endcsname\relax |
| 120 |
\try@load@fontshape |
| 121 |
\endgroup |
| 122 |
\expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax |
| 123 |
\def\cmex@opt{10}% |
| 124 |
\fi |
| 125 |
\fi |
| 126 |
\RequirePackage{amstext}[1995/01/25] |
| 127 |
\RequirePackage{amsbsy}[1995/01/20] |
| 128 |
\RequirePackage{amsopn}[1995/01/20] |
| 129 |
\@ifpackageloaded{stix}{% |
| 130 |
\let\ams@newcommand\providecommand |
| 131 |
\let\ams@renewcommand\providecommand |
| 132 |
\let\ams@def\providecommand |
| 133 |
\let\ams@DeclareRobustCommand\providecommand |
| 134 |
}{% |
| 135 |
\let\ams@newcommand\newcommand |
| 136 |
\let\ams@renewcommand\renewcommand |
| 137 |
\let\ams@def\def |
| 138 |
\let\ams@DeclareRobustCommand\DeclareRobustCommand |
| 139 |
} |
| 140 |
\def\@amsmath@err{\PackageError{amsmath}} |
| 141 |
\providecommand{\AmS}{{\protect\AmSfont |
| 142 |
A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}} |
| 143 |
\newcommand{\AmSfont}{% |
| 144 |
\usefont{OMS}{cmsy}{\if\@xp\@car\f@series\@nil bb\else m\fi}{n}} |
| 145 |
\ifx\leavevmode@ifvmode\@undefined % kernel is < 2018/12 |
| 146 |
\def\@mathmeasure#1#2#3{\setbox#1\hbox{\frozen@everymath\@emptytoks |
| 147 |
\m@th$#2#3$}} |
| 148 |
\else |
| 149 |
\def\@mathmeasure#1#2#3{\setbox#1\hbox{% |
| 150 |
\m@th$#2#3$}} |
| 151 |
\fi |
| 152 |
\@ifundefined{inf@bad}{% |
| 153 |
\newcount\inf@bad \inf@bad=1000000 \relax |
| 154 |
}{} |
| 155 |
\let\tmspace\@undefined |
| 156 |
\let\,\@undefined |
| 157 |
\let\!\@undefined |
| 158 |
\let\:\@undefined |
| 159 |
\let\negmedspace\@undefined |
| 160 |
\let\negthickspace\@undefined |
| 161 |
\ifx\leavevmode@ifvmode\@undefined |
| 162 |
\DeclareRobustCommand\tmspace[3]{% |
| 163 |
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax} |
| 164 |
\else |
| 165 |
\DeclareRobustCommand\tmspace[3]{% |
| 166 |
\ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} |
| 167 |
\fi |
| 168 |
\DeclareRobustCommand\,{\tmspace+\thinmuskip{.1667em}} |
| 169 |
\let\thinspace\, |
| 170 |
\DeclareRobustCommand\!{\tmspace-\thinmuskip{.1667em}} |
| 171 |
\let\negthinspace\! |
| 172 |
\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} |
| 173 |
\let\medspace\: |
| 174 |
\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} |
| 175 |
\renewcommand\;{\tmspace+\thickmuskip{.2777em}} |
| 176 |
\let\thickspace\; |
| 177 |
\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} |
| 178 |
\newcommand{\mspace}[1]{\mskip#1\relax} |
| 179 |
\def\@tempa#1#2\@nil{% |
| 180 |
\ifx\delimiter#1\@tempcnta#2\relax\else\@tempcnta\z@\fi |
| 181 |
} |
| 182 |
\@xp\@tempa\vert\@empty\@nil |
| 183 |
\ifnum\@tempcnta>\z@ |
| 184 |
\advance\@tempcnta "4000000 |
| 185 |
\protected\xdef\lvert{\delimiter\number\@tempcnta\space } |
| 186 |
\advance\@tempcnta "1000000 |
| 187 |
\protected\xdef\rvert{\delimiter\number\@tempcnta\space } |
| 188 |
\else |
| 189 |
\ifx\@@undefined\lvert |
| 190 |
% Fall back to cmex encoding since we don't know what else to do. |
| 191 |
\DeclareMathDelimiter{\lvert} |
| 192 |
{\mathopen}{symbols}{"6A}{largesymbols}{"0C} |
| 193 |
\DeclareMathDelimiter{\rvert} |
| 194 |
{\mathclose}{symbols}{"6A}{largesymbols}{"0C} |
| 195 |
\fi |
| 196 |
\fi |
| 197 |
\@xp\@tempa\Vert\@empty\@nil |
| 198 |
\ifnum\@tempcnta>\z@ |
| 199 |
\advance\@tempcnta "4000000 |
| 200 |
\protected\xdef\lVert{\delimiter\number\@tempcnta\space } |
| 201 |
\advance\@tempcnta "1000000 |
| 202 |
\protected\xdef\rVert{\delimiter\number\@tempcnta\space } |
| 203 |
\else |
| 204 |
\ifx\@@undefined\lVert |
| 205 |
\DeclareMathDelimiter{\lVert} |
| 206 |
{\mathopen}{symbols}{"6B}{largesymbols}{"0D} |
| 207 |
\DeclareMathDelimiter{\rVert} |
| 208 |
{\mathclose}{symbols}{"6B}{largesymbols}{"0D} |
| 209 |
\fi |
| 210 |
\fi |
| 211 |
\@saveprimitive\over\@@over |
| 212 |
\@saveprimitive\atop\@@atop |
| 213 |
\@saveprimitive\above\@@above |
| 214 |
\@saveprimitive\overwithdelims\@@overwithdelims |
| 215 |
\@saveprimitive\atopwithdelims\@@atopwithdelims |
| 216 |
\@saveprimitive\abovewithdelims\@@abovewithdelims |
| 217 |
\DeclareRobustCommand{\primfrac}[1]{% |
| 218 |
\PackageWarning{amsmath}{% |
| 219 |
Foreign command \@backslashchar#1;\MessageBreak |
| 220 |
\protect\frac\space or \protect\genfrac\space should be used instead% |
| 221 |
\MessageBreak |
| 222 |
} |
| 223 |
\global\@xp\let\csname#1\@xp\endcsname\csname @@#1\endcsname |
| 224 |
\csname#1\endcsname |
| 225 |
} |
| 226 |
\renewcommand{\over}{\primfrac{over}} |
| 227 |
\renewcommand{\atop}{\primfrac{atop}} |
| 228 |
\renewcommand{\above}{\primfrac{above}} |
| 229 |
\renewcommand{\overwithdelims}{\primfrac{overwithdelims}} |
| 230 |
\renewcommand{\atopwithdelims}{\primfrac{atopwithdelims}} |
| 231 |
\renewcommand{\abovewithdelims}{\primfrac{abovewithdelims}} |
| 232 |
\ifx\directlua\@undefined |
| 233 |
\DeclareRobustCommand{\frac}[2]{{\begingroup#1\endgroup\@@over#2}} |
| 234 |
\else |
| 235 |
\DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}} |
| 236 |
\fi |
| 237 |
\DeclareRobustCommand{\dfrac}{\genfrac{}{}{}0} |
| 238 |
\DeclareRobustCommand{\tfrac}{\genfrac{}{}{}1} |
| 239 |
\DeclareRobustCommand{\binom}{\genfrac()\z@{}} |
| 240 |
\DeclareRobustCommand{\dbinom}{\genfrac(){0pt}0} |
| 241 |
\DeclareRobustCommand{\tbinom}{\genfrac(){0pt}1} |
| 242 |
\ifx\directlua\@undefined |
| 243 |
\ifx\XeTeXcharclass\@undefined |
| 244 |
\DeclareRobustCommand{\genfrac}[4]{% |
| 245 |
\def\@tempa{#1#2}% |
| 246 |
\edef\@tempb{\@nx\@genfrac\@mathstyle{#4}% |
| 247 |
\csname @@\ifx @#3@over\else above\fi |
| 248 |
\ifx\@tempa\@empty \else withdelims\fi\endcsname} |
| 249 |
\@tempb{#1#2#3}} |
| 250 |
\else |
| 251 |
\def\genfrac@rule#1#2#3#4{% |
| 252 |
\hbox{$\left#1\vcenter{\hrule \@width\z@ |
| 253 |
\@height |
| 254 |
\ifdim\fontdimen#2#3\tw@=\z@ |
| 255 |
#4\fontdimen6#3\tw@ |
| 256 |
\else |
| 257 |
\fontdimen#2#3\tw@ |
| 258 |
\fi |
| 259 |
}\right.$}} |
| 260 |
\def\genfrac@choice#1#2{% |
| 261 |
\ifx @#2@\else |
| 262 |
\ifx c#1\kern-\nulldelimiterspace\fi |
| 263 |
{\delimitershortfall\z@\delimiterfactor\@m |
| 264 |
\mathsurround\z@\nulldelimiterspace\z@ |
| 265 |
\mathchoice |
| 266 |
{\genfrac@rule{#2}{20}\textfont{2.39}}% |
| 267 |
{\genfrac@rule{#2}{21}\textfont{1}}% |
| 268 |
{\genfrac@rule{#2}{21}\scriptfont{1.45}}% |
| 269 |
{\genfrac@rule{#2}{21}\scriptscriptfont{1.35}}% |
| 270 |
}% |
| 271 |
\ifx o#1\kern-\nulldelimiterspace\fi |
| 272 |
\fi |
| 273 |
} |
| 274 |
\DeclareRobustCommand{\genfrac}[6]{{% |
| 275 |
\@mathstyle{#4}% |
| 276 |
\genfrac@choice o{#1}% |
| 277 |
{\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}% |
| 278 |
\genfrac@choice c{#2}% |
| 279 |
}} |
| 280 |
\fi |
| 281 |
\else |
| 282 |
\def\genfrac@rule#1#2#3{% |
| 283 |
\hbox{$\left#1\vcenter{\hrule \@width\z@ |
| 284 |
\@height |
| 285 |
\ifdim\Umathfractiondelsize#2=\z@ |
| 286 |
#3\fontdimen6#3\tw@ |
| 287 |
\else |
| 288 |
\Umathfractiondelsize#2% |
| 289 |
\fi |
| 290 |
}\right.$}} |
| 291 |
\def\genfrac@choice#1#2{% |
| 292 |
\ifx @#2@\else |
| 293 |
\ifx c#1\kern-\nulldelimiterspace\fi |
| 294 |
{\delimitershortfall\z@\delimiterfactor\@m |
| 295 |
\mathsurround\z@\nulldelimiterspace\z@ |
| 296 |
\mathchoice |
| 297 |
{\genfrac@rule{#2}\displaystyle{2.39}}% |
| 298 |
{\genfrac@rule{#2}\textstyle{1}}% |
| 299 |
{\genfrac@rule{#2}\scriptstyle{1.45}}% |
| 300 |
{\genfrac@rule{#2}\scriptscriptstyle{1.35}}% |
| 301 |
}% |
| 302 |
\ifx o#1\kern-\nulldelimiterspace\fi |
| 303 |
\fi |
| 304 |
} |
| 305 |
\DeclareRobustCommand{\genfrac}[6]{{% |
| 306 |
\@mathstyle{#4}% |
| 307 |
\genfrac@choice o{#1}% |
| 308 |
{\Ustack {\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}}% |
| 309 |
\genfrac@choice c{#2}% |
| 310 |
}} |
| 311 |
\fi |
| 312 |
\def\@genfrac#1#2#3#4#5{{#1{\begingroup#4\endgroup#2#3\relax#5}}} |
| 313 |
\def\@mathstyle#1{% |
| 314 |
\ifx\@empty#1\@empty\relax |
| 315 |
\else\ifcase#1\displaystyle % case 0 |
| 316 |
\or\textstyle\or\scriptstyle\else\scriptscriptstyle\fi\fi} |
| 317 |
\begingroup |
| 318 |
\edef\@tempa{\string\mathchar"} |
| 319 |
\edef\@tempd{\string\Umathchar"} |
| 320 |
\def\@tempb#1"#2\@nil{#1"} |
| 321 |
\edef\@tempc{\expandafter\@tempb\meaning\coprod "\@nil} |
| 322 |
\ifx\@tempc\@tempd\let\@tempc\@tempa\fi |
| 323 |
\ifx\@tempa\@tempc |
| 324 |
\global\let\coprod@\coprod |
| 325 |
\gdef\coprod{\DOTSB\coprod@\slimits@} |
| 326 |
\global\let\bigvee@\bigvee |
| 327 |
\gdef\bigvee{\DOTSB\bigvee@\slimits@} |
| 328 |
\global\let\bigwedge@\bigwedge |
| 329 |
\gdef\bigwedge{\DOTSB\bigwedge@\slimits@} |
| 330 |
\global\let\biguplus@\biguplus |
| 331 |
\gdef\biguplus{\DOTSB\biguplus@\slimits@} |
| 332 |
\global\let\bigcap@\bigcap |
| 333 |
\gdef\bigcap{\DOTSB\bigcap@\slimits@} |
| 334 |
\global\let\bigcup@\bigcup |
| 335 |
\gdef\bigcup{\DOTSB\bigcup@\slimits@} |
| 336 |
\global\let\prod@\prod |
| 337 |
\gdef\prod{\DOTSB\prod@\slimits@} |
| 338 |
\global\let\sum@\sum |
| 339 |
\gdef\sum{\DOTSB\sum@\slimits@} |
| 340 |
\global\let\bigotimes@\bigotimes |
| 341 |
\gdef\bigotimes{\DOTSB\bigotimes@\slimits@} |
| 342 |
\global\let\bigoplus@\bigoplus |
| 343 |
\gdef\bigoplus{\DOTSB\bigoplus@\slimits@} |
| 344 |
\global\let\bigodot@\bigodot |
| 345 |
\gdef\bigodot{\DOTSB\bigodot@\slimits@} |
| 346 |
\global\let\bigsqcup@\bigsqcup |
| 347 |
\gdef\bigsqcup{\DOTSB\bigsqcup@\slimits@} |
| 348 |
\fi |
| 349 |
\endgroup |
| 350 |
\newcommand{\leftroot}{\@amsmath@err{\Invalid@@\leftroot}\@eha} |
| 351 |
\newcommand{\uproot}{\@amsmath@err{\Invalid@@\uproot}\@eha} |
| 352 |
\newcount\uproot@ |
| 353 |
\newcount\leftroot@ |
| 354 |
\renewcommand{\root}{\relaxnext@ |
| 355 |
\DN@{\ifx\@let@token\uproot\let\next@\nextii@\else |
| 356 |
\ifx\@let@token\leftroot\let\next@\nextiii@\else |
| 357 |
\let\next@\plainroot@\fi\fi\next@}% |
| 358 |
\def\nextii@\uproot##1{\uproot@##1\relax\FN@\nextiv@}% |
| 359 |
\def\nextiv@{\ifx\@let@token\@sptoken\DN@. {\FN@\nextv@}\else |
| 360 |
\DN@.{\FN@\nextv@}\fi\next@.}% |
| 361 |
\def\nextv@{\ifx\@let@token\leftroot\let\next@\nextvi@\else |
| 362 |
\let\next@\plainroot@\fi\next@}% |
| 363 |
\def\nextvi@\leftroot##1{\leftroot@##1\relax\plainroot@}% |
| 364 |
\def\nextiii@\leftroot##1{\leftroot@##1\relax\FN@\nextvii@}% |
| 365 |
\def\nextvii@{\ifx\@let@token\@sptoken |
| 366 |
\DN@. {\FN@\nextviii@}\else |
| 367 |
\DN@.{\FN@\nextviii@}\fi\next@.}% |
| 368 |
\def\nextviii@{\ifx\@let@token\uproot\let\next@\nextix@\else |
| 369 |
\let\next@\plainroot@\fi\next@}% |
| 370 |
\def\nextix@\uproot##1{\uproot@##1\relax\plainroot@}% |
| 371 |
\bgroup\uproot@\z@\leftroot@\z@\FN@\next@} |
| 372 |
\def\plainroot@#1\of#2{\setbox\rootbox\hbox{% |
| 373 |
$\m@th\scriptscriptstyle{#1}$}% |
| 374 |
\mathchoice{\r@@t\displaystyle{#2}}{\r@@t\textstyle{#2}} |
| 375 |
{\r@@t\scriptstyle{#2}}{\r@@t\scriptscriptstyle{#2}}\egroup} |
| 376 |
|
| 377 |
\@ifundefined{sqrtsign}{\let\sqrtsign\@@sqrt}{} |
| 378 |
\def\r@@t#1#2{\setboxz@h{$\m@th#1\sqrtsign{#2}$}% |
| 379 |
\dimen@\ht\z@\advance\dimen@-\dp\z@ |
| 380 |
\setbox\@ne\hbox{$\m@th#1\mskip\uproot@ mu$}% |
| 381 |
\advance\dimen@ by1.667\wd\@ne |
| 382 |
\mkern-\leftroot@ mu\mkern5mu\raise.6\dimen@\copy\rootbox |
| 383 |
\mkern-10mu\mkern\leftroot@ mu\boxz@} |
| 384 |
\@ifundefined{varGamma}{% |
| 385 |
\DeclareMathSymbol{\varGamma}{\mathord}{letters}{"00} |
| 386 |
\DeclareMathSymbol{\varDelta}{\mathord}{letters}{"01} |
| 387 |
\DeclareMathSymbol{\varTheta}{\mathord}{letters}{"02} |
| 388 |
\DeclareMathSymbol{\varLambda}{\mathord}{letters}{"03} |
| 389 |
\DeclareMathSymbol{\varXi}{\mathord}{letters}{"04} |
| 390 |
\DeclareMathSymbol{\varPi}{\mathord}{letters}{"05} |
| 391 |
\DeclareMathSymbol{\varSigma}{\mathord}{letters}{"06} |
| 392 |
\DeclareMathSymbol{\varUpsilon}{\mathord}{letters}{"07} |
| 393 |
\DeclareMathSymbol{\varPhi}{\mathord}{letters}{"08} |
| 394 |
\DeclareMathSymbol{\varPsi}{\mathord}{letters}{"09} |
| 395 |
\DeclareMathSymbol{\varOmega}{\mathord}{letters}{"0A} |
| 396 |
}{} |
| 397 |
\@saveprimitive\overline\@@overline |
| 398 |
\DeclareRobustCommand{\overline}[1]{\@@overline{#1}} |
| 399 |
\DeclareRobustCommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}} |
| 400 |
\newcommand{\implies}{\DOTSB\;\Longrightarrow\;} |
| 401 |
\newcommand{\impliedby}{\DOTSB\;\Longleftarrow\;} |
| 402 |
\def\And{\DOTSB\;\mathchar"3026 \;} |
| 403 |
\newcommand{\nobreakdash}{\leavevmode |
| 404 |
\toks@\@emptytoks \def\@tempa##1{\toks@\@xp{\the\toks@-}\FN@\next@}% |
| 405 |
\DN@{\ifx\@let@token-\@xp\@tempa |
| 406 |
\else\setboxz@h{\the\toks@\nobreak}\unhbox\z@\fi}% |
| 407 |
\FN@\next@ |
| 408 |
} |
| 409 |
\DeclareRobustCommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript |
| 410 |
\mkern-\thinmuskip{:}\mskip6muplus1mu\relax} |
| 411 |
\let\ifgtest@\iffalse % initial value |
| 412 |
\def\gtest@true{\global\let\ifgtest@\iftrue} |
| 413 |
\def\gtest@false{\global\let\ifgtest@\iffalse} |
| 414 |
\let\DOTSI\relax |
| 415 |
\let\DOTSB\relax |
| 416 |
\let\DOTSX\relax |
| 417 |
{\uccode`7=`\\ \uccode`8=`m \uccode`9=`a \uccode`0=`t \uccode`!=`h |
| 418 |
\uppercase{% |
| 419 |
\gdef\math@#1#2#3#4#5#6\math@{\gtest@false\ifx 7#1\ifx 8#2% |
| 420 |
\ifx 9#3\ifx 0#4\ifx !#5\xdef\meaning@{#6}\gtest@true |
| 421 |
\fi\fi\fi\fi\fi}}} |
| 422 |
{\uccode`7=`c \uccode`8=`h \uccode`9=`\" |
| 423 |
\uppercase{\gdef\mathch@#1#2#3#4#5#6\mathch@{\gtest@false |
| 424 |
\ifx 7#1\ifx 8#2\ifx 9#5\gtest@true\xdef\meaning@{9#6}\fi\fi\fi}}} |
| 425 |
{\uccode`(=`U \uccode`)=`m |
| 426 |
\uppercase{\gdef\Umathch@#1#2#3#4"#5"#6\Umathch@{\gtest@false |
| 427 |
\ifx(#2\ifx)#3\gtest@true |
| 428 |
\ifcase"#5 \or\or\gdef\thedots@{\dotsb@}\or\gdef\thedots@{\dotsb@}\fi |
| 429 |
\fi\fi |
| 430 |
}}} |
| 431 |
\ifx\Umathcharnumdef\@undefined |
| 432 |
\gdef\thecharacter@#1\thecharacter@{} |
| 433 |
\else |
| 434 |
{\uccode`(=`t \uccode`)=`c |
| 435 |
\uppercase{\gdef\thecharacter@#1#2#3#4#5\thecharacter@{% |
| 436 |
\ifx(#1\ifx)#4% |
| 437 |
\@xp\getmathcode@\meaning@\getmathcode@ |
| 438 |
\fi\fi |
| 439 |
}}} |
| 440 |
\def\getmathcode@#1 #2 #3#4\getmathcode@{% |
| 441 |
\Umathcharnumdef\@tempa\Umathcodenum`#3\relax |
| 442 |
\edef\meaning@{\meaning\@tempa}% |
| 443 |
\@xp\Umathch@\meaning@\Umathch@ |
| 444 |
} |
| 445 |
\fi |
| 446 |
\newcount\classnum@ |
| 447 |
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum@4096 |
| 448 |
\ifcase\number\classnum@\or\or\gdef\thedots@{\dotsb@}\or |
| 449 |
\gdef\thedots@{\dotsb@}\fi} |
| 450 |
{\uccode`4=`b \uccode`5=`i \uccode`6=`n |
| 451 |
\uppercase{\gdef\mathbin@#1#2#3{\relaxnext@ |
| 452 |
\def\nextii@##1\mathbin@{\ifx\@sptoken\@let@token\gtest@true\fi}% |
| 453 |
\gtest@false\DN@##1\mathbin@{}% |
| 454 |
\ifx 4#1\ifx 5#2\ifx 6#3\DN@{\FN@\nextii@}\fi\fi\fi\next@}}} |
| 455 |
{\uccode`4=`r \uccode`5=`e \uccode`6=`l |
| 456 |
\uppercase{\gdef\mathrel@#1#2#3{\relaxnext@ |
| 457 |
\def\nextii@##1\mathrel@{\ifx\@sptoken\@let@token\gtest@true\fi}% |
| 458 |
\gtest@false\DN@##1\mathrel@{}% |
| 459 |
\ifx 4#1\ifx 5#2\ifx 6#3\DN@{\FN@\nextii@}\fi\fi\fi\next@}}} |
| 460 |
{\uccode`5=`m \uccode`6=`a \uccode`7=`c |
| 461 |
\uppercase{\gdef\macro@#1#2#3#4\macro@{\gtest@false |
| 462 |
\ifx 5#1\ifx 6#2\ifx 7#3\gtest@true |
| 463 |
\xdef\meaning@{\macro@@#4\macro@@}\fi\fi\fi}}} |
| 464 |
\def\macro@@#1->#2\macro@@{#2} |
| 465 |
\newcount\DOTSCASE@ |
| 466 |
{\uccode`6=`\\ \uccode`7=`D \uccode`8=`O \uccode`9=`T \uccode`0=`S |
| 467 |
\uppercase{\gdef\DOTS@#1#2#3#4#5{\gtest@false\DN@##1\DOTS@{}% |
| 468 |
\ifx 6#1\ifx 7#2\ifx 8#3\ifx 9#4\ifx 0#5\let\next@\DOTS@@ |
| 469 |
\fi\fi\fi\fi\fi |
| 470 |
\next@}}} |
| 471 |
{\uccode`3=`B \uccode`4=`I \uccode`5=`X |
| 472 |
\uppercase{\gdef\DOTS@@#1{\relaxnext@ |
| 473 |
\def\nextii@##1\DOTS@{\ifx\@sptoken\@let@token\gtest@true\fi}% |
| 474 |
\DN@{\FN@\nextii@}% |
| 475 |
\ifx 3#1\global\DOTSCASE@\z@\else |
| 476 |
\ifx 4#1\global\DOTSCASE@\@ne\else |
| 477 |
\ifx 5#1\global\DOTSCASE@\tw@\else\DN@##1\DOTS@{}% |
| 478 |
\fi\fi\fi\next@}}} |
| 479 |
{\uccode`5=`\\ \uccode`6=`n \uccode`7=`o \uccode`8=`t |
| 480 |
\uppercase{\gdef\not@#1#2#3#4{\relaxnext@ |
| 481 |
\def\nextii@##1\not@{\ifx\@sptoken\@let@token\gtest@true\fi}% |
| 482 |
\gtest@false\DN@##1\not@{}% |
| 483 |
\ifx 5#1\ifx 6#2\ifx 7#3\ifx 8#4\DN@{\FN@\nextii@}\fi\fi\fi |
| 484 |
\fi\next@}}} |
| 485 |
{\uccode`9=`\l % |
| 486 |
\uppercase{\gdef\striplong@#1#2#3\relax{% |
| 487 |
\ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}} |
| 488 |
\def\zap@to@space#1 {} |
| 489 |
\def\keybin@{\gtest@true |
| 490 |
\ifx\@let@token+\else\ifx\@let@token=\else |
| 491 |
\ifx\@let@token<\else\ifx\@let@token>\else |
| 492 |
\ifx\@let@token-\else\ifx\@let@token*\else\ifx\@let@token:\else |
| 493 |
\gtest@false\fi\fi\fi\fi\fi\fi\fi} |
| 494 |
\@ifundefined{@ldots}{\def\@ldots{\mathellipsis}}{} |
| 495 |
\DeclareRobustCommand{\ldots}{% |
| 496 |
\ifmmode \mathellipsis \else \textellipsis \fi |
| 497 |
} |
| 498 |
\DeclareRobustCommand{\dots}{% |
| 499 |
\ifmmode \@xp\mdots@\else \@xp\textellipsis \fi |
| 500 |
} |
| 501 |
\def\tdots@{\leavevmode\unskip\relaxnext@ |
| 502 |
\DN@{$\m@th\@ldots\, |
| 503 |
\ifx\@let@token,\,$\else\ifx\@let@token.\,$\else |
| 504 |
\ifx\@let@token;\,$\else\ifx\@let@token:\,$\else |
| 505 |
\ifx\@let@token?\,$\else\ifx\@let@token!\,$\else |
| 506 |
$ \fi\fi\fi\fi\fi\fi}% |
| 507 |
\ \FN@\next@} |
| 508 |
\def\mdots@{\FN@\mdots@@} |
| 509 |
\def\mdots@@{\gdef\thedots@{\dotso@}% |
| 510 |
\ifx\@let@token\boldsymbol |
| 511 |
\gdef\thedots@\boldsymbol{\boldsymboldots@}% |
| 512 |
\else |
| 513 |
\ifx,\@let@token \gdef\thedots@{\dotsc}% |
| 514 |
\else |
| 515 |
\ifx\not\@let@token |
| 516 |
\gdef\thedots@{\dotsb@}% |
| 517 |
\else |
| 518 |
\keybin@ |
| 519 |
\ifgtest@ % if \keybin@ test |
| 520 |
\gdef\thedots@{\dotsb@}% |
| 521 |
\else |
| 522 |
\xdef\meaning@{\meaning\@let@token. .........}% |
| 523 |
\xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}% |
| 524 |
\@xp\math@\meaning@\math@ |
| 525 |
\ifgtest@ % if \mathxxx test |
| 526 |
\@xp\mathch@\meaning@\mathch@ |
| 527 |
\ifgtest@ % if \mathchar |
| 528 |
\@xp\getmathch@\meaning@\getmathch@ |
| 529 |
\fi % end if \mathchar |
| 530 |
\else % \not \mathxxx |
| 531 |
\@xp\Umathch@\meaning@"0"\Umathch@ |
| 532 |
\ifgtest@ % if \Umathchar |
| 533 |
\else % else not \Umathchar |
| 534 |
\@xp\macro@\meaning@@\macro@ |
| 535 |
\ifgtest@ % if macro test |
| 536 |
\@xp\not@\meaning@\not@ |
| 537 |
\ifgtest@ % if macro starts \not test |
| 538 |
\gdef\thedots@{\dotsb@}% |
| 539 |
\else% else not \not |
| 540 |
\@xp\DOTS@\meaning@\DOTS@ |
| 541 |
\ifgtest@ % \if DOTS |
| 542 |
\ifcase\number\DOTSCASE@ %ifcase dots |
| 543 |
\gdef\thedots@{\dotsb@}% |
| 544 |
\or\gdef\thedots@{\dotsi}\else |
| 545 |
\fi % endifcase dots |
| 546 |
\else % not macro starts \DOTS |
| 547 |
\@xp\math@\meaning@\math@ |
| 548 |
\ifgtest@ % \if macro starts \mathxxxx |
| 549 |
\@xp\mathbin@\meaning@\mathbin@ |
| 550 |
\ifgtest@ % if macro starts \mathbin |
| 551 |
\gdef\thedots@{\dotsb@}% |
| 552 |
\else % not macro starting \mathbin |
| 553 |
\@xp\mathrel@\meaning@\mathrel@ |
| 554 |
\ifgtest@ % if macro starts \mathrel |
| 555 |
\gdef\thedots@{\dotsb@}% |
| 556 |
\fi % endif macro starts \mathrel (no else) |
| 557 |
\fi % endif macro starts \mathbin |
| 558 |
\fi % endif macro starts with \mathxxx (no else) |
| 559 |
\fi % endif macro starts \DOTS else |
| 560 |
\fi % end macro starting \not \ifgtest@ test (no else) |
| 561 |
\else |
| 562 |
\@xp\thecharacter@\meaning@\thecharacter@ |
| 563 |
\fi % end macro \ifgtest@ test (no else) |
| 564 |
\fi % end if \Umathchar test |
| 565 |
\fi % end \math@ \ifgtest@ |
| 566 |
\fi % end \keybin@ \ifgtest@ test (no else) |
| 567 |
\fi % end if \not (no else) |
| 568 |
\fi % end if comma (no else) |
| 569 |
\fi % end if boldsymbol (no else) |
| 570 |
\thedots@} |
| 571 |
\def\boldsymboldots@#1{% |
| 572 |
\bold@true\let\@let@token=#1\let\delayed@=#1\mdots@@ |
| 573 |
\boldsymbol#1\bold@false} |
| 574 |
\ams@def\@cdots{\mathinner{\cdotp\cdotp\cdotp}} |
| 575 |
\newcommand{\dotsi}{\!\@cdots} |
| 576 |
\let\dotsb@\@cdots |
| 577 |
\def\rightdelim@{\gtest@true |
| 578 |
\ifx\@let@token)\else |
| 579 |
\ifx\@let@token]\else |
| 580 |
\ifx\@let@token\rbrack\else |
| 581 |
\ifx\@let@token\}\else |
| 582 |
\ifx\@let@token\rbrace\else |
| 583 |
\ifx\@let@token\rangle\else |
| 584 |
\ifx\@let@token\rceil\else |
| 585 |
\ifx\@let@token\rfloor\else |
| 586 |
\ifx\@let@token\rgroup\else |
| 587 |
\ifx\@let@token\rmoustache\else |
| 588 |
\ifx\@let@token\right\else |
| 589 |
\ifx\@let@token\bigr\else |
| 590 |
\ifx\@let@token\biggr\else |
| 591 |
\ifx\@let@token\Bigr\else |
| 592 |
\ifx\@let@token\Biggr\else\gtest@false |
| 593 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} |
| 594 |
\def\extra@{% |
| 595 |
\rightdelim@\ifgtest@ |
| 596 |
\else\ifx\@let@token$\gtest@true |
| 597 |
\else\xdef\meaning@{\meaning\@let@token..........}% |
| 598 |
\@xp\macro@\meaning@\macro@\ifgtest@ |
| 599 |
\@xp\DOTS@\meaning@\DOTS@ |
| 600 |
\ifgtest@ |
| 601 |
\ifnum\DOTSCASE@=\tw@\gtest@true\else\gtest@false |
| 602 |
\fi\fi\fi\fi\fi} |
| 603 |
\newif\ifbold@ |
| 604 |
\def\dotso@{\relaxnext@ |
| 605 |
\ifbold@ |
| 606 |
\let\@let@token\delayed@ |
| 607 |
\def\nextii@{\extra@\@ldots\ifgtest@\,\fi}% |
| 608 |
\else |
| 609 |
\def\nextii@{\DN@{\extra@\@ldots\ifgtest@\,\fi}\FN@\next@}% |
| 610 |
\fi |
| 611 |
\nextii@} |
| 612 |
\def\extrap@#1{% |
| 613 |
\DN@{#1\,}% |
| 614 |
\ifx\@let@token,\else |
| 615 |
\ifx\@let@token;\else |
| 616 |
\ifx\@let@token.\else\extra@ |
| 617 |
\ifgtest@\else |
| 618 |
\let\next@#1\fi\fi\fi\fi\next@} |
| 619 |
\ams@DeclareRobustCommand{\cdots}{\DN@{\extrap@\@cdots}\FN@\next@} |
| 620 |
\let\dotsb\cdots |
| 621 |
\let\dotsm\cdots |
| 622 |
\DeclareRobustCommand{\dotso}{\relax |
| 623 |
\ifmmode \DN@{\extrap@\@ldots}% |
| 624 |
\else \let\next@\tdots@\fi |
| 625 |
\FN@\next@} |
| 626 |
\DeclareRobustCommand{\dotsc}{% |
| 627 |
\DN@{\ifx\@let@token;\@ldots\,% |
| 628 |
\else \ifx\@let@token.\@ldots\,% |
| 629 |
\else \extra@\@ldots \ifgtest@\,\fi |
| 630 |
\fi\fi}% |
| 631 |
\FN@\next@} |
| 632 |
\renewcommand{\longrightarrow}{% |
| 633 |
\DOTSB\protect\relbar\protect\joinrel\rightarrow} |
| 634 |
\renewcommand{\Longrightarrow}{% |
| 635 |
\DOTSB\protect\Relbar\protect\joinrel\Rightarrow} |
| 636 |
\renewcommand{\longleftarrow}{% |
| 637 |
\DOTSB\leftarrow\protect\joinrel\protect\relbar} |
| 638 |
\renewcommand{\Longleftarrow}{% |
| 639 |
\DOTSB\Leftarrow\protect\joinrel\protect\Relbar} |
| 640 |
\renewcommand{\longleftrightarrow}{\DOTSB\leftarrow\joinrel\rightarrow} |
| 641 |
\renewcommand{\Longleftrightarrow}{\DOTSB\Leftarrow\joinrel\Rightarrow} |
| 642 |
\renewcommand{\mapsto}{\DOTSB\mapstochar\rightarrow} |
| 643 |
\renewcommand{\longmapsto}{\DOTSB\mapstochar\longrightarrow} |
| 644 |
\renewcommand{\hookrightarrow}{\DOTSB\lhook\joinrel\rightarrow} |
| 645 |
\renewcommand{\hookleftarrow}{\DOTSB\leftarrow\joinrel\rhook} |
| 646 |
\renewcommand{\iff}{\DOTSB\;\Longleftrightarrow\;} |
| 647 |
\renewcommand{\doteq}{% |
| 648 |
\DOTSB\mathrel{\mathop{\kern0pt =}\limits^{\textstyle.}}} |
| 649 |
\newif\if@display |
| 650 |
\everydisplay\@xp{\the\everydisplay \@displaytrue} |
| 651 |
\renewcommand{\int}{\DOTSI\intop\ilimits@} |
| 652 |
\renewcommand{\oint}{\DOTSI\ointop\ilimits@} |
| 653 |
\def\intkern@{\mkern-6mu\mathchoice{\mkern-3mu}{}{}{}} |
| 654 |
\def\intdots@{\mathchoice{\@cdots}% |
| 655 |
{{\cdotp}\mkern1.5mu{\cdotp}\mkern1.5mu{\cdotp}}% |
| 656 |
{{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}% |
| 657 |
{{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}} |
| 658 |
\ams@newcommand{\iint}{\DOTSI\MultiIntegral{2}} |
| 659 |
\ams@newcommand{\iiint}{\DOTSI\MultiIntegral{3}} |
| 660 |
\ams@newcommand{\iiiint}{\DOTSI\MultiIntegral{4}} |
| 661 |
\newcommand{\idotsint}{\DOTSI\MultiIntegral{0}} |
| 662 |
\DeclareRobustCommand{\MultiIntegral}[1]{% |
| 663 |
\edef\ints@c{\noexpand\intop |
| 664 |
\ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi |
| 665 |
\ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi |
| 666 |
\ifnum#1>\thr@@\noexpand\intop\noexpand\intkern@\fi |
| 667 |
\noexpand\intop |
| 668 |
\noexpand\ilimits@ |
| 669 |
}% |
| 670 |
\futurelet\@let@token\ints@a |
| 671 |
} |
| 672 |
\def\ints@a{% |
| 673 |
\ifx\limits\@let@token \ints@b |
| 674 |
\else \ifx\displaylimits\@let@token \ints@b |
| 675 |
\else\ifx\ilimits@\displaylimits \ints@b |
| 676 |
\fi\fi\fi |
| 677 |
\ints@c |
| 678 |
} |
| 679 |
\def\ints@b{% |
| 680 |
\mkern-7mu\mathchoice{\mkern-2mu}{}{}{}% |
| 681 |
\mathop\bgroup |
| 682 |
\mkern7mu\mathchoice{\mkern2mu}{}{}{}% |
| 683 |
\let\ilimits@\egroup |
| 684 |
}% |
| 685 |
\newbox\Mathstrutbox@ |
| 686 |
\setbox\Mathstrutbox@=\hbox{} |
| 687 |
\def\Mathstrut@{\copy\Mathstrutbox@} |
| 688 |
\ifx\Umathcharnumdef\@undefined |
| 689 |
\def\resetMathstrut@{% |
| 690 |
\begingroup |
| 691 |
\setbox\z@\hbox{% |
| 692 |
\mathchardef\@tempa\mathcode`\(\relax |
| 693 |
\def\@tempb##1"##2##3{\the\textfont"##3\char"}% |
| 694 |
\expandafter\@tempb\meaning\@tempa \relax |
| 695 |
}% |
| 696 |
\edef\@tempa{% |
| 697 |
\ht\Mathstrutbox@\the\ht\z@\relax |
| 698 |
\dp\Mathstrutbox@\the\dp\z@\relax}% |
| 699 |
\expandafter\endgroup\@tempa |
| 700 |
} |
| 701 |
\else |
| 702 |
\def\resetMathstrut@{% |
| 703 |
\begingroup |
| 704 |
\Umathcharnumdef\@tempa\Umathcodenum`\(\relax |
| 705 |
\def\@tempb##1"##2"##3"##4\relax{% |
| 706 |
\endgroup |
| 707 |
\ht\Mathstrutbox@=\fontcharht\textfont"##3 "##4\relax |
| 708 |
\dp\Mathstrutbox@=\fontchardp\textfont"##3 "##4\relax}% |
| 709 |
\expandafter\@tempb\meaning\@tempa \relax |
| 710 |
} |
| 711 |
\fi |
| 712 |
\addto@hook\every@math@size{\resetMathstrut@} |
| 713 |
\newbox\strutbox@ |
| 714 |
\def\strut@{\copy\strutbox@} |
| 715 |
\def\reset@strutbox@{% |
| 716 |
\global\setbox\strutbox@\hbox{% |
| 717 |
\lower.5\normallineskiplimit |
| 718 |
\vbox{\kern-\normallineskiplimit\copy\strutbox}}} |
| 719 |
\addto@hook\every@math@size{\reset@strutbox@} |
| 720 |
\AtBeginDocument{\reset@strutbox@} |
| 721 |
\DeclareRobustCommand{\big}{\bBigg@\@ne} |
| 722 |
\DeclareRobustCommand{\Big}{\bBigg@{1.5}} |
| 723 |
\DeclareRobustCommand{\bigg}{\bBigg@\tw@} |
| 724 |
\DeclareRobustCommand{\Bigg}{\bBigg@{2.5}} |
| 725 |
\ifx\leavevmode@ifvmode\@undefined |
| 726 |
\def\bBigg@#1#2{% |
| 727 |
{\@mathmeasure\z@{\nulldelimiterspace\z@}% |
| 728 |
{\left#2\vcenter to#1\big@size{}\right.}% |
| 729 |
\box\z@}} |
| 730 |
\else |
| 731 |
\def\bBigg@#1#2{\leavevmode@ifvmode |
| 732 |
{\@mathmeasure\z@{\nulldelimiterspace\z@}% |
| 733 |
{\left#2\vcenter to#1\big@size{}\right.}% |
| 734 |
\box\z@}} |
| 735 |
\fi |
| 736 |
\addto@hook\every@math@size{% |
| 737 |
\global\big@size 1.2\ht\Mathstrutbox@ |
| 738 |
\global\advance\big@size 1.2\dp\Mathstrutbox@ } |
| 739 |
\newdimen\big@size |
| 740 |
\def\accentclass@{7} |
| 741 |
\def\noaccents@{\def\accentclass@{0}} |
| 742 |
\DeclareFontEncoding{OML}{}{\noaccents@} |
| 743 |
\DeclareFontEncoding{OMS}{}{\noaccents@} |
| 744 |
\ams@newcommand{\dddot}[1]{% |
| 745 |
{\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ |
| 746 |
\hbox{\,\normalfont...}\vss}}}} |
| 747 |
\ams@newcommand{\ddddot}[1]{% |
| 748 |
{\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ |
| 749 |
\hbox{\,\normalfont....}\vss}}}} |
| 750 |
\AtBeginDocument{% |
| 751 |
\MakeRobust\dddot |
| 752 |
\MakeRobust\ddddot |
| 753 |
} |
| 754 |
\def\set@mathaccent#1#2#3#4{% |
| 755 |
\xdef#2{% |
| 756 |
\@nx\mathaccentV |
| 757 |
{\@xp\@gobble\string#2}\hexnumber@#1#4}% |
| 758 |
\MakeRobust#2% |
| 759 |
} |
| 760 |
\def\@tempa#1{% |
| 761 |
\@ifundefined{\@xp\@gobble\string#1\space}% |
| 762 |
{\@xp\@tempb\meaning#1\@nil#1}% |
| 763 |
{\@xp\@xp\@xp\@tempb\@xp\meaning |
| 764 |
\csname\@xp\@gobble\string#1\space\endcsname\@nil#1}% |
| 765 |
} |
| 766 |
\def\@tempb#1>#2#3 #4\@nil#5{% |
| 767 |
\@xp\ifx\csname#3\endcsname\mathaccent |
| 768 |
\@tempc#4?"7777\@nil#5% |
| 769 |
\else |
| 770 |
\@xp\ifx\csname#3\endcsname\Umathaccent |
| 771 |
\@tempd#4\@nil#5% |
| 772 |
\else |
| 773 |
\PackageWarningNoLine{amsmath}{% |
| 774 |
Unable to redefine math accent \string#5}% |
| 775 |
\fi\fi} |
| 776 |
\def\@tempc#1"#2#3#4#5#6\@nil#7{% |
| 777 |
\@xp\let\csname\@xp\@gobble\string#7\space\endcsname\@undefined |
| 778 |
\chardef\@tempd="#3\relax\set@mathaccent\@tempd{#7}{#2}{#4#5}} |
| 779 |
\def\@tempd#1\@nil#2{% |
| 780 |
\PackageWarningNoLine{amsmath}{% |
| 781 |
Unable to redefine \string\Umathaccent\space\string#2}% |
| 782 |
} |
| 783 |
\@tempa{\hat} |
| 784 |
\@tempa{\check} |
| 785 |
\@tempa{\tilde} |
| 786 |
\@tempa{\acute} |
| 787 |
\@tempa{\grave} |
| 788 |
\@tempa{\dot} |
| 789 |
\@tempa{\ddot} |
| 790 |
\@tempa{\breve} |
| 791 |
\@tempa{\bar} |
| 792 |
\@tempa{\vec} |
| 793 |
\@ifundefined{mathring}{% |
| 794 |
\DeclareMathAccent{\mathring}{\mathalpha}{operators}{"17} |
| 795 |
}{% |
| 796 |
\@tempa{\mathring} |
| 797 |
} |
| 798 |
%%\@tempa\widetilde |
| 799 |
%%\@tempa\widehat |
| 800 |
\newcommand{\acc@check}{} |
| 801 |
\newcommand{\acc@error}{} |
| 802 |
\def\acc@check{\@ifnextchar\@empty\relax\acc@error} |
| 803 |
\def\acc@error{% |
| 804 |
\@amsmath@err{% |
| 805 |
Improper argument for math accent:\MessageBreak |
| 806 |
Extra braces must be added to prevent wrong output% |
| 807 |
}\@ehc |
| 808 |
} |
| 809 |
\newcount\macc@depth |
| 810 |
\long\def\@gobblethree#1#2#3{} |
| 811 |
\def\mathaccentV#1#2#3#4#5{% |
| 812 |
\ifmmode |
| 813 |
\gdef\macc@tmp{\macc@depth\@ne}% |
| 814 |
\setbox\z@\hbox{% |
| 815 |
\let\mathaccentV\macc@test |
| 816 |
\let\use@mathgroup\@gobbletwo \let\select@group\@gobblethree |
| 817 |
\frozen@everymath{}$#5$% |
| 818 |
}% |
| 819 |
\macc@tmp |
| 820 |
\ifnum\macc@depth=\@ne |
| 821 |
\global\let\macc@nucleus\@empty |
| 822 |
\mathaccent"\accentclass@ |
| 823 |
\else |
| 824 |
\@xp\macc@nested |
| 825 |
\fi |
| 826 |
#2#3#4{#5}% |
| 827 |
\macc@nucleus |
| 828 |
\else |
| 829 |
\@xp\nonmatherr@\csname#1\endcsname |
| 830 |
\fi |
| 831 |
} |
| 832 |
\def\macc@test#1#2#3#4{\xdef\macc@tmp{\macc@tmp\advance\macc@depth\@ne}} |
| 833 |
\def\macc@group{-1} |
| 834 |
\def\macc@nested#1#2#3#4{% |
| 835 |
\begingroup |
| 836 |
\let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar |
| 837 |
\mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}% |
| 838 |
\macc@set@skewchar\relax |
| 839 |
\let\mathaccentV\macc@nested@a |
| 840 |
\macc@nested@a\relax#1#2#3{#4}% |
| 841 |
\endgroup |
| 842 |
} |
| 843 |
\let\macc@palette\mathpalette |
| 844 |
\def\macc@nested@a#1#2#3#4#5{% |
| 845 |
\ifnum\macc@group=\mathgroup |
| 846 |
\else \macc@set@skewchar\relax \edef\macc@group{\the\mathgroup}% |
| 847 |
\fi |
| 848 |
\mathchardef\macc@code "\accentclass@ #2#3#4\relax |
| 849 |
\macc@palette\macc@a{#5}% |
| 850 |
} |
| 851 |
\def\macc@set@skewchar#1{% |
| 852 |
\begingroup |
| 853 |
\ifnum\mathgroup=\m@ne \let\@tempa\@ne |
| 854 |
\else |
| 855 |
\ifnum\skewchar\textfont\mathgroup=\m@ne \let\@tempa\@ne |
| 856 |
\else \let\@tempa\mathgroup |
| 857 |
\fi |
| 858 |
\fi |
| 859 |
\count@=\skewchar\textfont\@tempa |
| 860 |
\advance\count@"7100 |
| 861 |
\edef\@tempa{\endgroup |
| 862 |
\mathchardef\noexpand\macc@skewchar=\number\count@\relax}% |
| 863 |
\@tempa |
| 864 |
#1% |
| 865 |
} |
| 866 |
\def\macc@a#1#2{% |
| 867 |
\begingroup |
| 868 |
\let\macc@style#1\relax |
| 869 |
\def\macc@palette##1{##1\macc@style}% |
| 870 |
\advance\macc@depth\m@ne |
| 871 |
\ifnum\macc@depth=\z@ |
| 872 |
\gdef\macc@nucleus{#2}% |
| 873 |
\setbox\z@\hbox{$#1#2\@empty{}\macc@skewchar$}% |
| 874 |
\setbox\tw@\hbox{$#1#2\@empty\macc@skewchar$}% |
| 875 |
\dimen@\tw@\wd\tw@ \advance\dimen@-\tw@\wd\z@ |
| 876 |
\xdef\macc@kerna{\the\dimen@\relax}% |
| 877 |
\setbox4\hbox{$#1#2\acc@check\@empty$}% |
| 878 |
\global\setbox\@ne\hbox to\wd4{}% |
| 879 |
\ht\@ne\ht4 \dp\@ne\dp4 |
| 880 |
\xdef\macc@kernb{\the\wd4\relax}% |
| 881 |
\mathaccent\macc@code{\box\@ne\kern\macc@kerna}% |
| 882 |
\else |
| 883 |
\mathaccent\macc@code{\let\macc@adjust\@empty #1#2\@empty}% |
| 884 |
\macc@adjust |
| 885 |
\fi |
| 886 |
\endgroup |
| 887 |
} |
| 888 |
\def\macc@adjust{% |
| 889 |
\dimen@\macc@kerna\advance\dimen@\macc@kernb |
| 890 |
\kern-\dimen@ |
| 891 |
} |
| 892 |
\def\Hat{\hat} |
| 893 |
\def\Check{\check} |
| 894 |
\def\Tilde{\tilde} |
| 895 |
\def\Acute{\acute} |
| 896 |
\def\Grave{\grave} |
| 897 |
\def\Dot{\dot} |
| 898 |
\def\Ddot{\ddot} |
| 899 |
\def\Breve{\breve} |
| 900 |
\def\Bar{\bar} |
| 901 |
\def\Vec{\vec} |
| 902 |
\def\nonmatherr@#1{\@amsmath@err{\protect |
| 903 |
#1 allowed only in math mode}\@ehd} |
| 904 |
\DeclareRobustCommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin |
| 905 |
{\operator@font mod}\penalty900 |
| 906 |
\mkern5mu\nonscript\mskip-\medmuskip} |
| 907 |
\DeclareRobustCommand{\pod}[1]{\allowbreak |
| 908 |
\if@display\mkern18mu\else\mkern8mu\fi(#1)} |
| 909 |
\DeclareRobustCommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} |
| 910 |
\DeclareRobustCommand{\mod}[1]{\allowbreak\if@display\mkern18mu |
| 911 |
\else\mkern12mu\fi{\operator@font mod}\,\,#1} |
| 912 |
\DeclareRobustCommand{\cfrac}[3][c]{{\displaystyle\frac{% |
| 913 |
\strut\ifx r#1\hfill\fi#2\ifx l#1\hfill\fi}{#3}}% |
| 914 |
\kern-\nulldelimiterspace} |
| 915 |
\DeclareRobustCommand{\overset}[2]{\binrel@{#2}% |
| 916 |
\binrel@@{\mathop{\kern\z@#2}\limits^{#1}}} |
| 917 |
\DeclareRobustCommand{\underset}[2]{\binrel@{#2}% |
| 918 |
\binrel@@{\mathop{\kern\z@#2}\limits_{#1}}} |
| 919 |
\DeclareRobustCommand{\overunderset}[3]{\binrel@{#3}% |
| 920 |
\binrel@@{\mathop{\kern\z@#3}\limits^{#1}_{#2}}} |
| 921 |
\DeclareRobustCommand{\sideset}[3]{% |
| 922 |
\@mathmeasure\z@\displaystyle{#3}% |
| 923 |
\global\setbox\@ne\vbox to\ht\z@{}\dp\@ne\dp\z@ |
| 924 |
\setbox\tw@\box\@ne |
| 925 |
\@mathmeasure4\displaystyle{\copy\tw@#1}% |
| 926 |
\@mathmeasure6\displaystyle{#3\nolimits#2}% |
| 927 |
\dimen@-\wd6 \advance\dimen@\wd4 \advance\dimen@\wd\z@ |
| 928 |
\hbox to\dimen@{}\mathop{\kern-\dimen@\box4\box6}% |
| 929 |
} |
| 930 |
\ifx\leavevmode@ifvmode\@undefined |
| 931 |
\DeclareRobustCommand{\smash}[1][tb]{% |
| 932 |
\def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% |
| 933 |
\edef\finsm@sh{\csname mb@#1\endcsname\z@\z@\box\z@}% |
| 934 |
\ifmmode \@xp\mathpalette\@xp\mathsm@sh |
| 935 |
\else \@xp\makesm@sh |
| 936 |
\fi |
| 937 |
} |
| 938 |
\else |
| 939 |
\DeclareRobustCommand{\smash}[1][tb]{% |
| 940 |
\def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% |
| 941 |
\edef\finsm@sh{\csname mb@#1\endcsname\z@\z@ \leavevmode@ifvmode\box\z@}% |
| 942 |
\ifmmode \@xp\mathpalette\@xp\mathsm@sh |
| 943 |
\else \@xp\makesm@sh |
| 944 |
\fi |
| 945 |
} |
| 946 |
\fi |
| 947 |
\@ifundefined{Umathcode} |
| 948 |
{% |
| 949 |
\mathchardef\std@minus\mathcode`\-\relax |
| 950 |
\mathchardef\std@equal\mathcode`\=\relax |
| 951 |
} |
| 952 |
{% |
| 953 |
\Umathcharnumdef\std@minus\Umathcodenum`\-\relax |
| 954 |
\Umathcharnumdef\std@equal\Umathcodenum`\=\relax |
| 955 |
} |
| 956 |
\@ifundefined{Umathcode} |
| 957 |
{% |
| 958 |
\AtBeginDocument{% |
| 959 |
\mathchardef\std@minus\mathcode`\-\relax |
| 960 |
\mathchardef\std@equal\mathcode`\=\relax |
| 961 |
}% |
| 962 |
} |
| 963 |
{% |
| 964 |
\AtBeginDocument{% |
| 965 |
\Umathcharnumdef\std@minus\Umathcodenum`\-\relax |
| 966 |
\Umathcharnumdef\std@equal\Umathcodenum`\=\relax |
| 967 |
}% |
| 968 |
} |
| 969 |
\ams@DeclareRobustCommand\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}} |
| 970 |
\ams@DeclareRobustCommand\Relbar{\mathrel\std@equal} |
| 971 |
\def\arrowfill@#1#2#3#4{% |
| 972 |
$\m@th\thickmuskip0mu\medmuskip\thickmuskip\thinmuskip\thickmuskip |
| 973 |
\relax#4#1\mkern-7mu% |
| 974 |
\cleaders\hbox{$#4\mkern-2mu#2\mkern-2mu$}\hfill |
| 975 |
\mkern-7mu#3$% |
| 976 |
} |
| 977 |
\def\leftarrowfill@{\arrowfill@\leftarrow\relbar\relbar} |
| 978 |
\def\rightarrowfill@{\arrowfill@\relbar\relbar\rightarrow} |
| 979 |
\def\leftrightarrowfill@{\arrowfill@\leftarrow\relbar\rightarrow} |
| 980 |
\def\Leftarrowfill@{\arrowfill@\Leftarrow\Relbar\Relbar} |
| 981 |
\def\Rightarrowfill@{\arrowfill@\Relbar\Relbar\Rightarrow} |
| 982 |
\def\Leftrightarrowfill@{\arrowfill@\Leftarrow\Relbar\Rightarrow} |
| 983 |
\def\overarrow@#1#2#3{\vbox{\ialign{##\crcr#1#2\crcr |
| 984 |
\noalign{\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}} |
| 985 |
\ams@renewcommand{\overrightarrow}{% |
| 986 |
\mathpalette{\overarrow@\rightarrowfill@}} |
| 987 |
\ams@renewcommand{\overleftarrow}{% |
| 988 |
\mathpalette{\overarrow@\leftarrowfill@}} |
| 989 |
\ams@newcommand{\overleftrightarrow}{% |
| 990 |
\mathpalette{\overarrow@\leftrightarrowfill@}} |
| 991 |
\AtBeginDocument{% |
| 992 |
\expandafter\let\csname overleftarrow \endcsname\@undefined |
| 993 |
\expandafter\let\csname overrightarrow \endcsname\@undefined |
| 994 |
\MakeRobust\overrightarrow |
| 995 |
\MakeRobust\overleftarrow |
| 996 |
\MakeRobust\overleftrightarrow |
| 997 |
} |
| 998 |
\def\underarrow@#1#2#3{% |
| 999 |
\vtop{\ialign{##\crcr$\m@th\hfil#2#3\hfil$\crcr |
| 1000 |
\noalign{\nointerlineskip\kern1.3\ex@}#1#2\crcr}}} |
| 1001 |
\ams@newcommand{\underrightarrow}{% |
| 1002 |
\mathpalette{\underarrow@\rightarrowfill@}} |
| 1003 |
\ams@newcommand{\underleftarrow}{% |
| 1004 |
\mathpalette{\underarrow@\leftarrowfill@}} |
| 1005 |
\ams@newcommand{\underleftrightarrow}{% |
| 1006 |
\mathpalette{\underarrow@\leftrightarrowfill@}} |
| 1007 |
\AtBeginDocument{% |
| 1008 |
\MakeRobust\underrightarrow |
| 1009 |
\MakeRobust\underleftarrow |
| 1010 |
\MakeRobust\underleftrightarrow |
| 1011 |
} |
| 1012 |
\def\ext@arrow#1#2#3#4#5#6#7{% |
| 1013 |
\mathrel{\mathop{% |
| 1014 |
\setbox\z@\hbox{#5\displaystyle}% |
| 1015 |
\setbox\tw@\vbox{\m@th |
| 1016 |
\hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}% |
| 1017 |
\hbox{$\scriptstyle\mkern#3mu{#7}\mkern#4mu$}% |
| 1018 |
\copy\z@ |
| 1019 |
}% |
| 1020 |
\hbox to\wd\tw@{\unhbox\z@}}% |
| 1021 |
\limits |
| 1022 |
\@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi |
| 1023 |
#7\if0#2\else\mkern#2mu\fi}}% |
| 1024 |
\@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi |
| 1025 |
#6\if0#2\else\mkern#2mu\fi}}}% |
| 1026 |
} |
| 1027 |
\DeclareRobustCommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}} |
| 1028 |
\DeclareRobustCommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}} |
| 1029 |
\ifx\directlua\@undefined |
| 1030 |
\newenvironment{subarray}[1]{% |
| 1031 |
\vcenter\bgroup |
| 1032 |
\Let@ \restore@math@cr \default@tag |
| 1033 |
\baselineskip\fontdimen10 \scriptfont\tw@ |
| 1034 |
\advance\baselineskip\fontdimen12 \scriptfont\tw@ |
| 1035 |
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@ |
| 1036 |
\lineskiplimit\lineskip |
| 1037 |
\ialign\bgroup\ifx c#1\hfil\fi |
| 1038 |
$\m@th\scriptstyle##$\hfil\crcr |
| 1039 |
}{% |
| 1040 |
\crcr\egroup\egroup |
| 1041 |
} |
| 1042 |
\else |
| 1043 |
\newenvironment{subarray}[1]{% |
| 1044 |
\vcenter\bgroup |
| 1045 |
\Let@ \restore@math@cr \default@tag |
| 1046 |
\baselineskip \Umathstacknumup \scriptstyle |
| 1047 |
\advance\baselineskip \Umathstackdenomdown \scriptstyle |
| 1048 |
\lineskip \Umathstackvgap \scriptstyle |
| 1049 |
\lineskiplimit \lineskip |
| 1050 |
\ialign\bgroup\ifx c#1\hfil\fi |
| 1051 |
\Ustartmath |
| 1052 |
\m@th\scriptstyle## |
| 1053 |
\Ustopmath |
| 1054 |
\hfil\crcr |
| 1055 |
}{% |
| 1056 |
\crcr\egroup\egroup |
| 1057 |
} |
| 1058 |
\fi |
| 1059 |
\DeclareRobustCommand{\substack}[1]{\subarray{c}#1\endsubarray} |
| 1060 |
\newenvironment{smallmatrix}{\null\,\vcenter\bgroup |
| 1061 |
\Let@\restore@math@cr\default@tag |
| 1062 |
\baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip |
| 1063 |
\ialign\bgroup\hfil$\m@th\scriptstyle##$\hfil&&\thickspace\hfil |
| 1064 |
$\m@th\scriptstyle##$\hfil\crcr |
| 1065 |
}{% |
| 1066 |
\crcr\egroup\egroup\,% |
| 1067 |
} |
| 1068 |
\renewenvironment{matrix}{% |
| 1069 |
\matrix@check\matrix\env@matrix |
| 1070 |
}{% |
| 1071 |
\endarray \hskip -\arraycolsep |
| 1072 |
} |
| 1073 |
\def\env@matrix{\hskip -\arraycolsep |
| 1074 |
\let\@ifnextchar\new@ifnextchar |
| 1075 |
\array{*\c@MaxMatrixCols c}} |
| 1076 |
\newcount\c@MaxMatrixCols \c@MaxMatrixCols=10 |
| 1077 |
\def\matrix@check#1{% |
| 1078 |
\@xp\ifx\csname\@currenvir\endcsname#1% |
| 1079 |
\else\matrix@error#1% |
| 1080 |
\@xp\@gobble |
| 1081 |
\fi |
| 1082 |
} |
| 1083 |
\def\matrix@error#1{% |
| 1084 |
\@amsmath@err{% |
| 1085 |
Old form `\string#1' should be \string\begin{\@xp\@gobble\string#1}% |
| 1086 |
}{% |
| 1087 |
`\string#1{...}' is old Plain-TeX syntax whose use is |
| 1088 |
ill-advised in LaTeX.% |
| 1089 |
}% |
| 1090 |
} |
| 1091 |
\renewenvironment{pmatrix}{% |
| 1092 |
\left(% |
| 1093 |
\matrix@check\pmatrix\env@matrix |
| 1094 |
}{ |
| 1095 |
\endmatrix\right)% |
| 1096 |
} |
| 1097 |
\newenvironment{bmatrix}{\left[\env@matrix}{\endmatrix\right]} |
| 1098 |
\newenvironment{Bmatrix}{% |
| 1099 |
\left\lbrace\env@matrix |
| 1100 |
}{% |
| 1101 |
\endmatrix\right\rbrace |
| 1102 |
} |
| 1103 |
\newenvironment{vmatrix}{\left\lvert\env@matrix}{\endmatrix\right\rvert} |
| 1104 |
\newenvironment{Vmatrix}{\left\lVert\env@matrix}{\endmatrix\right\rVert} |
| 1105 |
\let\hdots\@ldots |
| 1106 |
\newcommand{\hdotsfor}[1]{% |
| 1107 |
\ifx[#1\@xp\shdots@for\else\hdots@for\@ne{#1}\fi} |
| 1108 |
\newmuskip\dotsspace@ |
| 1109 |
\def\shdots@for#1]{\hdots@for{#1}} |
| 1110 |
\def\hdots@for#1#2{\multicolumn{#2}c% |
| 1111 |
{\m@th\[email protected]\mkern-#1\dotsspace@ |
| 1112 |
\xleaders\hbox{$\m@th\mkern#1\dotsspace@.\mkern#1\dotsspace@$}% |
| 1113 |
\hfill |
| 1114 |
\mkern-#1\dotsspace@}% |
| 1115 |
} |
| 1116 |
\renewenvironment{cases}{% |
| 1117 |
\matrix@check\cases\env@cases |
| 1118 |
}{% |
| 1119 |
\endarray\right.% |
| 1120 |
} |
| 1121 |
\def\env@cases{% |
| 1122 |
\let\@ifnextchar\new@ifnextchar |
| 1123 |
\left\lbrace |
| 1124 |
\def\arraystretch{1.2}% |
| 1125 |
\array{@{}l@{\quad}l@{}}% |
| 1126 |
} |
| 1127 |
\newcounter{parentequation}% Counter for ``parent equation''. |
| 1128 |
\@ifundefined{ignorespacesafterend}{% |
| 1129 |
\def\ignorespacesafterend{\global\@ignoretrue}% |
| 1130 |
}{} |
| 1131 |
\newenvironment{subequations}{% |
| 1132 |
\refstepcounter{equation}% |
| 1133 |
\protected@edef\theparentequation{\theequation}% |
| 1134 |
\setcounter{parentequation}{\value{equation}}% |
| 1135 |
\setcounter{equation}{0}% |
| 1136 |
\def\theequation{\theparentequation\alph{equation}}% |
| 1137 |
\ignorespaces |
| 1138 |
}{% |
| 1139 |
\setcounter{equation}{\value{parentequation}}% |
| 1140 |
\ignorespacesafterend |
| 1141 |
} |
| 1142 |
\DeclareCommandCopy\numberwithin\counterwithin |
| 1143 |
\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}} |
| 1144 |
\newcount\dspbrk@lvl |
| 1145 |
\dspbrk@lvl=-1 |
| 1146 |
\interdisplaylinepenalty\@M |
| 1147 |
\DeclareRobustCommand{\allowdisplaybreaks}[1][4]{% |
| 1148 |
\interdisplaylinepenalty\getdsp@pen{#1}\relax |
| 1149 |
} |
| 1150 |
\def\getdsp@pen#1{% |
| 1151 |
\ifcase #1\@M \or 9999 \or 6999 \or 2999 \or \z@\fi |
| 1152 |
} |
| 1153 |
\DeclareRobustCommand{\displaybreak}{\new@ifnextchar[\dspbrk@{\dspbrk@[4]}} |
| 1154 |
\chardef\dspbrk@context=\sixt@@n |
| 1155 |
\def\dspbrk@[#1]{% |
| 1156 |
\ifmeasuring@ |
| 1157 |
\else |
| 1158 |
\ifcase\dspbrk@context % case 0 --- OK |
| 1159 |
\global\dspbrk@lvl #1\relax |
| 1160 |
\or % case 1 --- inside a box |
| 1161 |
\nogood@displaybreak |
| 1162 |
\else % other cases --- outside of a display |
| 1163 |
\@amsmath@err{\Invalid@@\displaybreak}\@eha |
| 1164 |
\fi |
| 1165 |
\fi |
| 1166 |
} |
| 1167 |
\def\nogood@displaybreak{% |
| 1168 |
\@amsmath@err{\protect |
| 1169 |
\displaybreak\space cannot be applied here}% |
| 1170 |
{One of the enclosing environments creates an |
| 1171 |
unbreakable box\MessageBreak |
| 1172 |
(e.g., split, aligned, gathered, ...).}% |
| 1173 |
} |
| 1174 |
\protected\def\math@cr{\relax\iffalse{\fi\ifnum0=`}\fi |
| 1175 |
\@ifstar{\global\@eqpen\@M\math@cr@}% |
| 1176 |
{\global\@eqpen |
| 1177 |
\ifnum\dspbrk@lvl <\z@ \interdisplaylinepenalty |
| 1178 |
\else -\@getpen\dspbrk@lvl \fi |
| 1179 |
\math@cr@}} |
| 1180 |
\def\math@cr@{\new@ifnextchar[\math@cr@@{\math@cr@@[\z@]}} |
| 1181 |
\def\math@cr@@[#1]{\ifnum0=`{\fi \iffalse}\fi\math@cr@@@ |
| 1182 |
\noalign{\vskip#1\relax}} |
| 1183 |
\def\Let@{\let\\\math@cr} |
| 1184 |
\def\restore@math@cr{\def\math@cr@@@{\cr}} |
| 1185 |
\restore@math@cr |
| 1186 |
\newcommand{\intertext}{\@amsmath@err{\Invalid@@\intertext}\@eha} |
| 1187 |
\def\intertext@{% |
| 1188 |
\def\intertext##1{% |
| 1189 |
\ifvmode\else\\\@empty\fi |
| 1190 |
\noalign{% |
| 1191 |
\penalty\postdisplaypenalty\vskip\belowdisplayskip |
| 1192 |
\vbox{\normalbaselines |
| 1193 |
\ifdim\linewidth=\columnwidth |
| 1194 |
\else \parshape\@ne \@totalleftmargin \linewidth |
| 1195 |
\fi |
| 1196 |
\noindent\ignorespaces##1\par}% |
| 1197 |
\penalty\predisplaypenalty\vskip\abovedisplayskip% |
| 1198 |
}% |
| 1199 |
}} |
| 1200 |
\newhelp\tag@help |
| 1201 |
{tag cannot be used at this point.\space |
| 1202 |
If you don't understand why^^Jyou should consult |
| 1203 |
the documentation.^^JBut don't worry: just continue, and I'll |
| 1204 |
forget what happened.} |
| 1205 |
\def\gobble@tag{\@ifstar\@gobble\@gobble} |
| 1206 |
\def\invalid@tag#1{\@amsmath@err{#1}{\the\tag@help}\gobble@tag} |
| 1207 |
\def\dft@tag{\invalid@tag{\string\tag\space not allowed here}} |
| 1208 |
\def\default@tag{\let\tag\dft@tag} |
| 1209 |
\default@tag |
| 1210 |
\def\maketag@@{\@ifstar\maketag@@@\tagform@} |
| 1211 |
\def\maketag@@@#1{\hbox{\m@th\normalfont#1}} |
| 1212 |
\def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}} |
| 1213 |
\iftagsleft@ |
| 1214 |
\def\@eqnnum{\hbox to1sp{}\rlap{\normalfont\normalcolor |
| 1215 |
\hskip -\displaywidth\tagform@\theequation}} |
| 1216 |
\else |
| 1217 |
\def\@eqnnum{{\normalfont\normalcolor \tagform@\theequation}} |
| 1218 |
\fi |
| 1219 |
\newcommand{\thetag}{\leavevmode\tagform@} |
| 1220 |
\let\df@tag\@empty |
| 1221 |
\def\make@df@tag{% |
| 1222 |
\def\@currentcounter{equation}% |
| 1223 |
\@ifstar\make@df@tag@@\make@df@tag@@@} |
| 1224 |
\def\make@df@tag@@#1{% |
| 1225 |
\gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}}} |
| 1226 |
\def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{#1}% |
| 1227 |
\toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}}} |
| 1228 |
\AddToHook{begindocument/end}{\let\ltx@label\label} |
| 1229 |
\AddToHook{build/page/reset}{\let \ltx@label \@gobble@with@sphack@om} |
| 1230 |
\def\label@in@display{% |
| 1231 |
\ifx\df@label\@empty\else |
| 1232 |
\@amsmath@err{Multiple \string\label's: |
| 1233 |
label '\df@label' will be lost}\@eha |
| 1234 |
\fi |
| 1235 |
\gdef\df@label |
| 1236 |
} |
| 1237 |
\toks@\@xp{\@arrayparboxrestore \let\label\ltx@label}% |
| 1238 |
\edef\@arrayparboxrestore{\the\toks@} |
| 1239 |
\let\df@label\@empty |
| 1240 |
\def\make@display@tag{% |
| 1241 |
\if@eqnsw \incr@eqnum \print@eqnum |
| 1242 |
\else \iftag@ \df@tag \global\let\df@tag\@empty \fi |
| 1243 |
\fi |
| 1244 |
\ifmeasuring@ |
| 1245 |
\else |
| 1246 |
\ifx\df@label\@empty |
| 1247 |
\else |
| 1248 |
\@xp\ltx@label\@xp{\df@label}% |
| 1249 |
\global\let\df@label\@empty |
| 1250 |
\fi |
| 1251 |
\fi |
| 1252 |
} |
| 1253 |
\def\tag@in@align{% |
| 1254 |
\relax |
| 1255 |
\iftag@ |
| 1256 |
\DN@{\invalid@tag{Multiple \string\tag}}% |
| 1257 |
\else |
| 1258 |
\global\tag@true |
| 1259 |
\nonumber |
| 1260 |
\let\next@\make@df@tag |
| 1261 |
\fi |
| 1262 |
\next@ |
| 1263 |
} |
| 1264 |
\newcommand{\raisetag}[1]{\skip@#1\relax |
| 1265 |
\xdef\raise@tag{\vskip\iftagsleft@\else-\fi\the\skip@\relax}% |
| 1266 |
} |
| 1267 |
\let\raise@tag\@empty |
| 1268 |
\newcommand{\notag}{\nonumber} |
| 1269 |
\renewcommand{\nonumber}{% |
| 1270 |
\if@eqnsw |
| 1271 |
\ifx\incr@eqnum\@empty \addtocounter{equation}\m@ne \fi |
| 1272 |
\fi |
| 1273 |
\let\print@eqnum\@empty \let\incr@eqnum\@empty |
| 1274 |
\global\@eqnswfalse |
| 1275 |
} |
| 1276 |
\def\print@eqnum{\tagform@\theequation} |
| 1277 |
\def\incr@eqnum{\refstepcounter{equation}\let\incr@eqnum\@empty} |
| 1278 |
\providecommand\dollardollar@begin{$$} |
| 1279 |
\providecommand\dollardollar@end{$$} |
| 1280 |
\newif\ifinalign@ |
| 1281 |
\newif\ifingather@ |
| 1282 |
\@xp\def\@xp\@arrayparboxrestore\@xp{\@arrayparboxrestore |
| 1283 |
\ingather@false\inalign@false \default@tag |
| 1284 |
\let\spread@equation\@spread@equation |
| 1285 |
\let\reset@equation\@empty |
| 1286 |
\def\print@eqnum{\tagform@\theequation}% |
| 1287 |
\def\incr@eqnum{\refstepcounter{equation}\let\incr@eqnum\@empty}% |
| 1288 |
} |
| 1289 |
\newif\iftag@ |
| 1290 |
\newif\ifst@rred |
| 1291 |
\newif\ifmeasuring@ |
| 1292 |
\newif\ifshifttag@ |
| 1293 |
\newcount\row@ |
| 1294 |
\newcount\column@ |
| 1295 |
\def\column@plus{% |
| 1296 |
\global\advance\column@\@ne |
| 1297 |
} |
| 1298 |
\newcount\maxfields@ |
| 1299 |
\def\add@amp#1{\if m#1&\@xp\add@amp\fi} |
| 1300 |
\def\add@amps#1{% |
| 1301 |
\begingroup |
| 1302 |
\count@#1\advance\count@-\column@ |
| 1303 |
\edef\@tempa{\endgroup |
| 1304 |
\@xp\add@amp\romannumeral\number\count@ 000q}% |
| 1305 |
\@tempa |
| 1306 |
} |
| 1307 |
\newhelp\andhelp@ |
| 1308 |
{An extra & here is so disastrous that you should probably exit^^J |
| 1309 |
and fix things up.} |
| 1310 |
\newdimen\eqnshift@ |
| 1311 |
\newdimen\alignsep@ |
| 1312 |
\newdimen\tagshift@ |
| 1313 |
\newcommand{\mintagsep}{.5\fontdimen6\textfont\tw@} |
| 1314 |
\newcommand{\minalignsep}{10pt} |
| 1315 |
\newdimen\tagwidth@ |
| 1316 |
\newdimen\totwidth@ |
| 1317 |
\newdimen\lineht@ |
| 1318 |
\def\tag@width#1{% |
| 1319 |
\ifcase\@xp#1\tag@lengths\fi |
| 1320 |
} |
| 1321 |
|
| 1322 |
\def\savetaglength@{% |
| 1323 |
\begingroup |
| 1324 |
\let\or\relax |
| 1325 |
\xdef\tag@lengths{\tag@lengths\or \the\wdz@}% |
| 1326 |
\endgroup |
| 1327 |
} |
| 1328 |
|
| 1329 |
\def\shift@tag#1{% |
| 1330 |
\ifcase\@xp#1\tag@shifts\fi\relax |
| 1331 |
} |
| 1332 |
|
| 1333 |
\let\tag@shifts\@empty |
| 1334 |
\def\saveshift@#1{% |
| 1335 |
\begingroup |
| 1336 |
\let\or\relax |
| 1337 |
\xdef\tag@shifts{\or#1\tag@shifts}% |
| 1338 |
\endgroup |
| 1339 |
} |
| 1340 |
\def\spread@equation{\reset@strutbox@ |
| 1341 |
\openup\jot \let\spread@equation\@empty} |
| 1342 |
\let\@spread@equation\spread@equation |
| 1343 |
\def\displ@y{\@display@init{}} |
| 1344 |
\def\@display@init#1{% |
| 1345 |
\global\lineht@\z@ |
| 1346 |
\global\dt@ptrue \spread@equation |
| 1347 |
\everycr{% |
| 1348 |
\noalign{% |
| 1349 |
#1% |
| 1350 |
\ifdt@p |
| 1351 |
\global\dt@pfalse |
| 1352 |
\vskip-\lineskiplimit |
| 1353 |
\vskip\normallineskiplimit |
| 1354 |
\else |
| 1355 |
\penalty\@eqpen \global\dspbrk@lvl\m@ne |
| 1356 |
\fi |
| 1357 |
}% |
| 1358 |
}% |
| 1359 |
} |
| 1360 |
\def\displ@y@{\@display@init{% |
| 1361 |
\global\column@\z@ \global\dspbrk@lvl\m@ne |
| 1362 |
\global\tag@false \global\let\raise@tag\@empty |
| 1363 |
}} |
| 1364 |
\def\black@#1{% |
| 1365 |
\noalign{% |
| 1366 |
\ifdim#1>\displaywidth |
| 1367 |
\dimen@\prevdepth |
| 1368 |
\nointerlineskip |
| 1369 |
\vskip-\ht\strutbox@ |
| 1370 |
\vskip-\dp\strutbox@ |
| 1371 |
\vbox{\noindent\hbox to\displaywidth{% |
| 1372 |
\hbox to#1{\strut@\hfill}}}% |
| 1373 |
\prevdepth\dimen@ |
| 1374 |
\fi |
| 1375 |
}% |
| 1376 |
} |
| 1377 |
\def\savecounters@{% |
| 1378 |
\begingroup |
| 1379 |
\def\@elt##1{% |
| 1380 |
\global\csname c@##1\endcsname\the\csname c@##1\endcsname}% |
| 1381 |
\xdef\@gtempa{% |
| 1382 |
\cl@@ckpt |
| 1383 |
\let\@nx\restorecounters@\@nx\@empty |
| 1384 |
}% |
| 1385 |
\endgroup |
| 1386 |
\let\restorecounters@\@gtempa |
| 1387 |
} |
| 1388 |
\let\restorecounters@\@empty |
| 1389 |
\def\savealignstate@{% |
| 1390 |
\begingroup |
| 1391 |
\let\or\relax |
| 1392 |
\xdef\@gtempa{% |
| 1393 |
\global\totwidth@\the\totwidth@ |
| 1394 |
\global\row@\the\row@ |
| 1395 |
\gdef\@nx\tag@lengths{\tag@lengths}% |
| 1396 |
\let\@nx\restorealignstate@\@nx\@empty |
| 1397 |
}% |
| 1398 |
\endgroup |
| 1399 |
\let\restorealignstate@\@gtempa |
| 1400 |
} |
| 1401 |
|
| 1402 |
\let\restorealignstate@\@empty |
| 1403 |
\def\savecolumn@{% |
| 1404 |
\edef\restorecolumn@{% |
| 1405 |
\global\column@\number\column@ |
| 1406 |
\let\@nx\restorecolumn@\@nx\@empty |
| 1407 |
}% |
| 1408 |
} |
| 1409 |
\let\restorecolumn@\@empty |
| 1410 |
\newtoks\@envbody |
| 1411 |
\def\addto@envbody#1{\global\@envbody\@xp{\the\@envbody#1}} |
| 1412 |
\def\collect@body#1{% |
| 1413 |
\@envbody{\@xp#1\@xp{\the\@envbody}}% |
| 1414 |
\edef\process@envbody{\the\@envbody\@nx\end{\@currenvir}}% |
| 1415 |
\@envbody\@emptytoks \def\begin@stack{b}% |
| 1416 |
\begingroup |
| 1417 |
\@xp\let\csname\@currenvir\endcsname\collect@@body |
| 1418 |
\edef\process@envbody{\@xp\@nx\csname\@currenvir\endcsname}% |
| 1419 |
\process@envbody |
| 1420 |
} |
| 1421 |
\def\push@begins#1\begin#2{% |
| 1422 |
\ifx\end#2\else b\@xp\push@begins\fi |
| 1423 |
} |
| 1424 |
\def\collect@@body#1\end#2{% |
| 1425 |
\edef\begin@stack{\push@begins#1\begin\end \@xp\@gobble\begin@stack}% |
| 1426 |
\ifx\@empty\begin@stack |
| 1427 |
\endgroup |
| 1428 |
\@checkend{#2}% |
| 1429 |
\addto@envbody{#1}% |
| 1430 |
\else |
| 1431 |
\addto@envbody{#1\end{#2}}% |
| 1432 |
\fi |
| 1433 |
\process@envbody % A little tricky! Note the grouping |
| 1434 |
} |
| 1435 |
\def\math@cr@@@aligned{% |
| 1436 |
\ifodd\column@ \let\next@\@empty |
| 1437 |
\else \def\next@{&\kern-\alignsep@}% |
| 1438 |
\fi |
| 1439 |
\next@ \cr |
| 1440 |
} |
| 1441 |
\def\ams@start@box#1{% |
| 1442 |
\edef\reserved@a{\csname ams@pos@\expandafter\detokenize |
| 1443 |
\expandafter{\romannumeral-`\0#1}\endcsname}% |
| 1444 |
\expandafter\ifx\reserved@a\relax |
| 1445 |
\PackageWarning{amsmath}{% |
| 1446 |
Bracket group \detokenize{[#1]} at formula start!\MessageBreak |
| 1447 |
It could be a misspelled positional argument.\MessageBreak |
| 1448 |
If it belongs to the formula add a \relax in\MessageBreak |
| 1449 |
front to hide it}% |
| 1450 |
\def\ams@return@opt@arg{[#1]}\vcenter |
| 1451 |
\else |
| 1452 |
\let\ams@return@opt@arg\@empty\reserved@a |
| 1453 |
\fi |
| 1454 |
} |
| 1455 |
\def\ams@pos@t{\vtop} |
| 1456 |
\def\ams@pos@b{\vbox} |
| 1457 |
\def\ams@pos@c{\vcenter} |
| 1458 |
\let\ams@pos@\ams@pos@c |
| 1459 |
\newcommand{\start@aligned}[2]{% |
| 1460 |
\RIfM@\else |
| 1461 |
\nonmatherr@{\begin{\@currenvir}}% |
| 1462 |
\fi |
| 1463 |
\savecolumn@ % Assumption: called inside a group |
| 1464 |
\alignedspace@left |
| 1465 |
\ams@start@box{#1}\bgroup |
| 1466 |
\maxfields@#2\relax |
| 1467 |
\ifnum\maxfields@>\m@ne |
| 1468 |
\multiply\maxfields@\tw@ |
| 1469 |
\let\math@cr@@@\math@cr@@@alignedat |
| 1470 |
\alignsep@\z@skip |
| 1471 |
\else |
| 1472 |
\let\math@cr@@@\math@cr@@@aligned |
| 1473 |
\alignsep@\minalignsep |
| 1474 |
\fi |
| 1475 |
\Let@ \chardef\dspbrk@context\@ne |
| 1476 |
\default@tag |
| 1477 |
\spread@equation % no-op if already called |
| 1478 |
\global\column@\z@ |
| 1479 |
\ialign\bgroup |
| 1480 |
&\column@plus |
| 1481 |
\hfil |
| 1482 |
\strut@ |
| 1483 |
$\m@th\displaystyle{##}$% |
| 1484 |
\tabskip\z@skip |
| 1485 |
&\column@plus |
| 1486 |
$\m@th\displaystyle{{}##}$% |
| 1487 |
\hfil |
| 1488 |
\tabskip\alignsep@ |
| 1489 |
\crcr |
| 1490 |
\ams@return@opt@arg |
| 1491 |
} |
| 1492 |
\def\math@cr@@@alignedat{% |
| 1493 |
\ifnum\column@>\maxfields@ |
| 1494 |
\begingroup |
| 1495 |
\measuring@false |
| 1496 |
\@amsmath@err{Extra & on this line}% |
| 1497 |
{\the\andhelp@}% "An extra & here is disastrous" |
| 1498 |
\endgroup |
| 1499 |
\fi |
| 1500 |
\global\column@\z@ |
| 1501 |
\cr |
| 1502 |
} |
| 1503 |
\def\alignsafe@testopt#1#2{% |
| 1504 |
\relax\iffalse{\fi\ifnum`}=0\fi |
| 1505 |
\@ifnextchar[% |
| 1506 |
{\let\@let@token\relax \ifnum`{=\z@\fi\iffalse}\fi#1}% |
| 1507 |
{\let\@let@token\relax \ifnum`{=\z@\fi\iffalse}\fi#1[#2]}% |
| 1508 |
} |
| 1509 |
\newenvironment{aligned}{% |
| 1510 |
\let\@testopt\alignsafe@testopt |
| 1511 |
\aligned@a |
| 1512 |
}{% |
| 1513 |
\crcr\egroup |
| 1514 |
\restorecolumn@ |
| 1515 |
\egroup |
| 1516 |
} |
| 1517 |
\newcommand{\aligned@a}[1][c]{\start@aligned{#1}\m@ne} |
| 1518 |
\newenvironment{alignedat}{% |
| 1519 |
\let\@testopt\alignsafe@testopt |
| 1520 |
\alignedat@a |
| 1521 |
}{% |
| 1522 |
\endaligned |
| 1523 |
} |
| 1524 |
\newcommand{\alignedat@a}[1][c]{\start@aligned{#1}} |
| 1525 |
\newenvironment{gathered}[1][c]{% |
| 1526 |
\RIfM@\else |
| 1527 |
\nonmatherr@{\begin{gathered}}% |
| 1528 |
\fi |
| 1529 |
\alignedspace@left |
| 1530 |
\ams@start@box{#1}\bgroup |
| 1531 |
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr |
| 1532 |
\spread@equation |
| 1533 |
\ialign\bgroup |
| 1534 |
\hfil\strut@$\m@th\displaystyle##$\hfil |
| 1535 |
\crcr |
| 1536 |
\ams@return@opt@arg |
| 1537 |
}{% |
| 1538 |
\endaligned |
| 1539 |
} |
| 1540 |
\def\start@gather#1{% |
| 1541 |
\RIfM@ |
| 1542 |
\nomath@env |
| 1543 |
\DN@{\@namedef{end\@currenvir}{}\@gobble}% |
| 1544 |
\else |
| 1545 |
\dollardollar@begin |
| 1546 |
#1% |
| 1547 |
\ifst@rred \else \global\@eqnswtrue \fi |
| 1548 |
\let\next@\gather@ |
| 1549 |
\fi |
| 1550 |
\collect@body\next@ |
| 1551 |
} |
| 1552 |
\newenvironment{gather}{% |
| 1553 |
\start@gather\st@rredfalse |
| 1554 |
}{% |
| 1555 |
\math@cr \black@\totwidth@ \egroup |
| 1556 |
\dollardollar@end\ignorespacesafterend |
| 1557 |
} |
| 1558 |
|
| 1559 |
\newenvironment{gather*}{% |
| 1560 |
\start@gather\st@rredtrue |
| 1561 |
}{% |
| 1562 |
\endgather |
| 1563 |
} |
| 1564 |
\def\gather@#1{% |
| 1565 |
\ingather@true \let\split\insplit@ |
| 1566 |
\let\tag\tag@in@align \let\label\label@in@display |
| 1567 |
\chardef\dspbrk@context\z@ |
| 1568 |
\intertext@ \displ@y@ \Let@ |
| 1569 |
\let\math@cr@@@\math@cr@@@gather |
| 1570 |
\gmeasure@{#1}% |
| 1571 |
\global\shifttag@false |
| 1572 |
\tabskip\z@skip |
| 1573 |
\global\row@\@ne |
| 1574 |
\halign to\displaywidth\bgroup |
| 1575 |
\strut@ |
| 1576 |
\setboxz@h{$\m@th\displaystyle{##}$}% |
| 1577 |
\calc@shift@gather |
| 1578 |
\set@gather@field |
| 1579 |
\tabskip\@centering |
| 1580 |
&\setboxz@h{\strut@{##}}% |
| 1581 |
\place@tag@gather |
| 1582 |
\tabskip \iftagsleft@ \gdisplaywidth@ \else \z@skip \span\fi |
| 1583 |
\crcr |
| 1584 |
#1% |
| 1585 |
} |
| 1586 |
\def\gmeasure@#1{% |
| 1587 |
\begingroup |
| 1588 |
\measuring@true |
| 1589 |
\totwidth@\z@ |
| 1590 |
\global\let\tag@lengths\@empty |
| 1591 |
\savecounters@ |
| 1592 |
\setbox\@ne\vbox{% |
| 1593 |
\everycr{\noalign{\global\tag@false |
| 1594 |
\global\let\raise@tag\@empty \global\column@\z@}}% |
| 1595 |
\let\label\@gobble |
| 1596 |
\halign{% |
| 1597 |
\setboxz@h{$\m@th\displaystyle{##}$}% |
| 1598 |
\ifdim\wdz@>\totwidth@ |
| 1599 |
\global\totwidth@\wdz@ |
| 1600 |
\fi |
| 1601 |
&\setboxz@h{\strut@{##}}% |
| 1602 |
\savetaglength@ |
| 1603 |
\crcr |
| 1604 |
#1% |
| 1605 |
\math@cr@@@ |
| 1606 |
}% |
| 1607 |
}% |
| 1608 |
\restorecounters@ |
| 1609 |
\if@fleqn |
| 1610 |
\global\advance\totwidth@\@mathmargin |
| 1611 |
\fi |
| 1612 |
\iftagsleft@ |
| 1613 |
\ifdim\totwidth@>\displaywidth |
| 1614 |
\global\let\gdisplaywidth@\totwidth@ |
| 1615 |
\else |
| 1616 |
\global\let\gdisplaywidth@\displaywidth |
| 1617 |
\fi |
| 1618 |
\fi |
| 1619 |
\endgroup |
| 1620 |
} |
| 1621 |
\def\math@cr@@@gather{% |
| 1622 |
\ifst@rred\nonumber\fi |
| 1623 |
&\relax |
| 1624 |
\make@display@tag |
| 1625 |
\ifst@rred\else\global\@eqnswtrue\fi |
| 1626 |
\global\advance\row@\@ne |
| 1627 |
\cr |
| 1628 |
} |
| 1629 |
\def\calc@shift@gather{% |
| 1630 |
\dimen@\mintagsep\relax |
| 1631 |
\tagwidth@\tag@width\row@\relax |
| 1632 |
\if@fleqn |
| 1633 |
\global\eqnshift@\@mathmargin |
| 1634 |
\ifdim\tagwidth@>\z@ |
| 1635 |
\advance\dimen@\tagwidth@ |
| 1636 |
\iftagsleft@ |
| 1637 |
\ifdim\dimen@>\@mathmargin |
| 1638 |
\global\shifttag@true |
| 1639 |
\fi |
| 1640 |
\else |
| 1641 |
\advance\dimen@\@mathmargin |
| 1642 |
\advance\dimen@\wdz@ |
| 1643 |
\ifdim\dimen@>\displaywidth |
| 1644 |
\global\shifttag@true |
| 1645 |
\fi |
| 1646 |
\fi |
| 1647 |
\fi |
| 1648 |
\else |
| 1649 |
\global\eqnshift@\displaywidth |
| 1650 |
\global\advance\eqnshift@-\wdz@ |
| 1651 |
\ifdim\tagwidth@>\z@ |
| 1652 |
\multiply\dimen@\tw@ |
| 1653 |
\advance\dimen@\wdz@ |
| 1654 |
\advance\dimen@\tagwidth@ |
| 1655 |
\ifdim\dimen@>\displaywidth |
| 1656 |
\global\shifttag@true |
| 1657 |
\else |
| 1658 |
\ifdim\eqnshift@<4\tagwidth@ |
| 1659 |
\global\advance\eqnshift@-\tagwidth@ |
| 1660 |
\fi |
| 1661 |
\fi |
| 1662 |
\fi |
| 1663 |
\global\divide\eqnshift@\tw@ |
| 1664 |
\iftagsleft@ |
| 1665 |
\global\eqnshift@-\eqnshift@ |
| 1666 |
\global\advance\eqnshift@\displaywidth |
| 1667 |
\global\advance\eqnshift@-\wdz@ |
| 1668 |
\fi |
| 1669 |
\ifdim\eqnshift@<\z@ |
| 1670 |
\global\eqnshift@\z@ |
| 1671 |
\fi |
| 1672 |
\fi |
| 1673 |
} |
| 1674 |
\def\place@tag@gather{% |
| 1675 |
\iftagsleft@ |
| 1676 |
\kern-\gdisplaywidth@ |
| 1677 |
\ifshifttag@ |
| 1678 |
\rlap{\vbox{% |
| 1679 |
\normalbaselines |
| 1680 |
\boxz@ |
| 1681 |
\vbox to\lineht@{}% |
| 1682 |
\raise@tag |
| 1683 |
}}% |
| 1684 |
\global\shifttag@false |
| 1685 |
\else |
| 1686 |
\rlap{\boxz@}% |
| 1687 |
\fi |
| 1688 |
\else |
| 1689 |
\ifdim\totwidth@>\displaywidth |
| 1690 |
\dimen@\totwidth@ |
| 1691 |
\advance\dimen@-\displaywidth |
| 1692 |
\kern-\dimen@ |
| 1693 |
\fi |
| 1694 |
\ifshifttag@ |
| 1695 |
\llap{\vtop{% |
| 1696 |
\raise@tag |
| 1697 |
\normalbaselines |
| 1698 |
\setbox\@ne\null |
| 1699 |
\dp\@ne\lineht@ |
| 1700 |
\box\@ne |
| 1701 |
\boxz@ |
| 1702 |
}}% |
| 1703 |
\global\shifttag@false |
| 1704 |
\else |
| 1705 |
\llap{\boxz@}% |
| 1706 |
\fi |
| 1707 |
\fi |
| 1708 |
} |
| 1709 |
\def\set@gather@field{% |
| 1710 |
\iftagsleft@ |
| 1711 |
\global\lineht@\ht\z@ |
| 1712 |
\else |
| 1713 |
\global\lineht@\dp\z@ |
| 1714 |
\fi |
| 1715 |
\kern\eqnshift@ |
| 1716 |
\boxz@ |
| 1717 |
\hfil |
| 1718 |
} |
| 1719 |
\newif\ifxxat@ |
| 1720 |
|
| 1721 |
\newif\ifcheckat@ |
| 1722 |
|
| 1723 |
\let\xatlevel@\@empty |
| 1724 |
\def\start@align#1#2#3{% |
| 1725 |
\let\xatlevel@#1% always \z@, \@ne, or \tw@ |
| 1726 |
\maxfields@#3\relax |
| 1727 |
\ifnum\maxfields@>\m@ne |
| 1728 |
\checkat@true |
| 1729 |
\ifnum\xatlevel@=\tw@ |
| 1730 |
\xxat@true |
| 1731 |
\fi |
| 1732 |
\multiply\maxfields@\tw@ |
| 1733 |
\else |
| 1734 |
\checkat@false |
| 1735 |
\fi |
| 1736 |
\ifingather@ |
| 1737 |
\iffalse{\fi\ifnum0=`}\fi |
| 1738 |
\DN@{\vcenter\bgroup\savealignstate@\align@#2}% |
| 1739 |
\else |
| 1740 |
\ifmmode |
| 1741 |
\if@display |
| 1742 |
\DN@{\align@recover}% |
| 1743 |
\else |
| 1744 |
\nomath@env |
| 1745 |
\DN@{\@namedef{end\@currenvir}{}\@gobble}% |
| 1746 |
\fi |
| 1747 |
\else |
| 1748 |
\dollardollar@begin |
| 1749 |
\let\split\insplit@ |
| 1750 |
\DN@{\align@#2}% |
| 1751 |
\fi |
| 1752 |
\fi |
| 1753 |
\collect@body\next@ |
| 1754 |
} |
| 1755 |
\def\align@recover#1#2#3{% |
| 1756 |
\endgroup |
| 1757 |
\@amsmath@err{% |
| 1758 |
Erroneous nesting of equation structures;\MessageBreak |
| 1759 |
trying to recover with `aligned'% |
| 1760 |
}\@ehc |
| 1761 |
\begin{aligned}\relax#1\end{aligned}% |
| 1762 |
} |
| 1763 |
\newenvironment{alignat}{% |
| 1764 |
\start@align\z@\st@rredfalse |
| 1765 |
}{% |
| 1766 |
\endalign |
| 1767 |
} |
| 1768 |
\newenvironment{alignat*}{% |
| 1769 |
\start@align\z@\st@rredtrue |
| 1770 |
}{% |
| 1771 |
\endalign |
| 1772 |
} |
| 1773 |
\newenvironment{xalignat}{% |
| 1774 |
\start@align\@ne\st@rredfalse |
| 1775 |
}{% |
| 1776 |
\endalign |
| 1777 |
} |
| 1778 |
\newenvironment{xalignat*}{% |
| 1779 |
\start@align\@ne\st@rredtrue |
| 1780 |
}{% |
| 1781 |
\endalign |
| 1782 |
} |
| 1783 |
\newenvironment{xxalignat}{% |
| 1784 |
\start@align\tw@\st@rredtrue |
| 1785 |
}{% |
| 1786 |
\endalign |
| 1787 |
} |
| 1788 |
\newenvironment{align}{% |
| 1789 |
\start@align\@ne\st@rredfalse\m@ne |
| 1790 |
}{% |
| 1791 |
\math@cr \black@\totwidth@ |
| 1792 |
\egroup |
| 1793 |
\ifingather@ |
| 1794 |
\restorealignstate@ |
| 1795 |
\egroup |
| 1796 |
\nonumber |
| 1797 |
\ifnum0=`{\fi\iffalse}\fi |
| 1798 |
\else |
| 1799 |
\dollardollar@end |
| 1800 |
\fi |
| 1801 |
\ignorespacesafterend |
| 1802 |
} |
| 1803 |
\newenvironment{align*}{% |
| 1804 |
\start@align\@ne\st@rredtrue\m@ne |
| 1805 |
}{% |
| 1806 |
\endalign |
| 1807 |
} |
| 1808 |
\newenvironment{flalign}{% |
| 1809 |
\start@align\tw@\st@rredfalse\m@ne |
| 1810 |
}{% |
| 1811 |
\endalign |
| 1812 |
} |
| 1813 |
\newenvironment{flalign*}{% |
| 1814 |
\start@align\tw@\st@rredtrue\m@ne |
| 1815 |
}{% |
| 1816 |
\endalign |
| 1817 |
} |
| 1818 |
\def\align@#1#2{% |
| 1819 |
\inalign@true \intertext@ \Let@ \chardef\dspbrk@context\z@ |
| 1820 |
\ifingather@\else\displ@y@\fi |
| 1821 |
\let\math@cr@@@\math@cr@@@align |
| 1822 |
\ifxxat@\else \let\tag\tag@in@align \fi |
| 1823 |
\let\label\label@in@display |
| 1824 |
#1% set st@r |
| 1825 |
\ifst@rred\else \global\@eqnswtrue \fi |
| 1826 |
\measure@{#2}% |
| 1827 |
\global\row@\z@ |
| 1828 |
\tabskip\eqnshift@ |
| 1829 |
\halign\bgroup |
| 1830 |
\span\align@preamble\crcr |
| 1831 |
#2% |
| 1832 |
} |
| 1833 |
\def\math@cr@@@align{% |
| 1834 |
\ifst@rred\nonumber\fi |
| 1835 |
\if@eqnsw \global\tag@true \fi |
| 1836 |
\global\advance\row@\@ne |
| 1837 |
\add@amps\maxfields@ |
| 1838 |
\omit |
| 1839 |
\kern-\alignsep@ |
| 1840 |
\iftag@ |
| 1841 |
\setboxz@h{\@lign\strut@{\make@display@tag}}% |
| 1842 |
\place@tag |
| 1843 |
\fi |
| 1844 |
\ifst@rred\else\global\@eqnswtrue\fi |
| 1845 |
\global\lineht@\z@ |
| 1846 |
\cr |
| 1847 |
} |
| 1848 |
\def\math@cr@@@align@measure{% |
| 1849 |
&\omit |
| 1850 |
\global\advance\row@\@ne |
| 1851 |
\ifst@rred\nonumber\fi |
| 1852 |
\if@eqnsw \global\tag@true \fi |
| 1853 |
\ifnum\column@>\maxfields@ |
| 1854 |
\ifcheckat@ |
| 1855 |
\begingroup |
| 1856 |
\measuring@false |
| 1857 |
\@amsmath@err{Extra & on this line}% |
| 1858 |
{\the\andhelp@}% "An extra & here is disastrous" |
| 1859 |
\endgroup |
| 1860 |
\else |
| 1861 |
\global\maxfields@\column@ |
| 1862 |
\fi |
| 1863 |
\fi |
| 1864 |
\setboxz@h{\@lign\strut@{% |
| 1865 |
\if@eqnsw |
| 1866 |
\stepcounter{equation}% |
| 1867 |
\tagform@\theequation |
| 1868 |
\else |
| 1869 |
\iftag@\df@tag\fi |
| 1870 |
\fi |
| 1871 |
}}% |
| 1872 |
\savetaglength@ |
| 1873 |
\ifst@rred\else\global\@eqnswtrue\fi |
| 1874 |
\cr |
| 1875 |
} |
| 1876 |
\let\field@lengths\@empty |
| 1877 |
|
| 1878 |
\def\savefieldlength@{% |
| 1879 |
\begingroup |
| 1880 |
\let\or\relax |
| 1881 |
\xdef\field@lengths{% |
| 1882 |
\field@lengths |
| 1883 |
\ifnum\column@=0 |
| 1884 |
\or |
| 1885 |
\else |
| 1886 |
,% |
| 1887 |
\fi |
| 1888 |
\the\wdz@ |
| 1889 |
}% |
| 1890 |
\endgroup |
| 1891 |
} |
| 1892 |
|
| 1893 |
\def\fieldlengths@#1{% |
| 1894 |
\ifcase\@xp#1\field@lengths\fi |
| 1895 |
} |
| 1896 |
\let\maxcolumn@widths\@empty |
| 1897 |
\def\maxcol@width#1{% |
| 1898 |
\ifcase\@xp#1\maxcolumn@widths\fi\relax |
| 1899 |
} |
| 1900 |
\def\measure@#1{% |
| 1901 |
\begingroup |
| 1902 |
\measuring@true |
| 1903 |
\global\eqnshift@\z@ |
| 1904 |
\global\alignsep@\z@ |
| 1905 |
\global\let\tag@lengths\@empty |
| 1906 |
\global\let\field@lengths\@empty |
| 1907 |
\savecounters@ |
| 1908 |
\global\setbox0\vbox{% |
| 1909 |
\let\math@cr@@@\math@cr@@@align@measure |
| 1910 |
\everycr{\noalign{\global\tag@false |
| 1911 |
\global\let\raise@tag\@empty \global\column@\z@}}% |
| 1912 |
\let\label\@gobble |
| 1913 |
\global\row@\z@ |
| 1914 |
\tabskip\z@ |
| 1915 |
\halign{\span\align@preamble\crcr |
| 1916 |
#1% |
| 1917 |
\math@cr@@@ |
| 1918 |
\global\column@\z@ |
| 1919 |
\add@amps\maxfields@\cr |
| 1920 |
}% |
| 1921 |
}% |
| 1922 |
\restorecounters@ |
| 1923 |
\ifodd\maxfields@ |
| 1924 |
\global\advance\maxfields@\@ne |
| 1925 |
\fi |
| 1926 |
\ifnum\xatlevel@=\tw@ |
| 1927 |
\ifnum\maxfields@<\thr@@ |
| 1928 |
\let\xatlevel@\z@ |
| 1929 |
\fi |
| 1930 |
\fi |
| 1931 |
\setbox\z@\vbox{% |
| 1932 |
\unvbox\z@ \unpenalty \global\setbox\@ne\lastbox |
| 1933 |
}% |
| 1934 |
\global\totwidth@\wd\@ne |
| 1935 |
\if@fleqn \global\advance\totwidth@\@mathmargin \fi |
| 1936 |
\global\let\maxcolumn@widths\@empty |
| 1937 |
\begingroup |
| 1938 |
\let\or\relax |
| 1939 |
\loop |
| 1940 |
\global\setbox\@ne\hbox{% |
| 1941 |
\unhbox\@ne \unskip \global\setbox\thr@@\lastbox |
| 1942 |
}% |
| 1943 |
\ifhbox\thr@@ |
| 1944 |
\xdef\maxcolumn@widths{ \or \the\wd\thr@@ \maxcolumn@widths}% |
| 1945 |
\repeat |
| 1946 |
\endgroup |
| 1947 |
\dimen@\displaywidth |
| 1948 |
\advance\dimen@-\totwidth@ |
| 1949 |
\ifcase\xatlevel@ |
| 1950 |
\global\alignsep@\z@ |
| 1951 |
\let\minalignsep\z@ |
| 1952 |
\@tempcntb\z@ |
| 1953 |
\if@fleqn |
| 1954 |
\@tempcnta\@ne |
| 1955 |
\global\eqnshift@\@mathmargin |
| 1956 |
\else |
| 1957 |
\@tempcnta\tw@ |
| 1958 |
\global\eqnshift@\dimen@ |
| 1959 |
\global\divide\eqnshift@\@tempcnta |
| 1960 |
\fi |
| 1961 |
\or |
| 1962 |
\@tempcntb\maxfields@ |
| 1963 |
\divide\@tempcntb\tw@ |
| 1964 |
\@tempcnta\@tempcntb |
| 1965 |
\advance\@tempcntb\m@ne |
| 1966 |
\if@fleqn |
| 1967 |
\global\eqnshift@\@mathmargin |
| 1968 |
\global\alignsep@\dimen@ |
| 1969 |
\global\divide\alignsep@\@tempcnta |
| 1970 |
\else |
| 1971 |
\global\advance\@tempcnta\@ne |
| 1972 |
\global\eqnshift@\dimen@ |
| 1973 |
\global\divide\eqnshift@\@tempcnta |
| 1974 |
\global\alignsep@\eqnshift@ |
| 1975 |
\fi |
| 1976 |
\or |
| 1977 |
\@tempcntb\maxfields@ |
| 1978 |
\divide\@tempcntb\tw@ |
| 1979 |
\global\advance\@tempcntb\m@ne |
| 1980 |
\global\@tempcnta\@tempcntb |
| 1981 |
\global\eqnshift@\z@ |
| 1982 |
\global\alignsep@\dimen@ |
| 1983 |
\if@fleqn |
| 1984 |
\global\advance\alignsep@\@mathmargin\relax |
| 1985 |
\fi |
| 1986 |
\global\divide\alignsep@\@tempcntb |
| 1987 |
\fi |
| 1988 |
\ifdim\alignsep@<\minalignsep\relax |
| 1989 |
\global\alignsep@\minalignsep\relax |
| 1990 |
\ifdim\eqnshift@>\z@ |
| 1991 |
\if@fleqn\else |
| 1992 |
\global\eqnshift@\displaywidth |
| 1993 |
\global\advance\eqnshift@-\totwidth@ |
| 1994 |
\global\advance\eqnshift@-\@tempcntb\alignsep@ |
| 1995 |
\global\divide\eqnshift@\tw@ |
| 1996 |
\fi |
| 1997 |
\fi |
| 1998 |
\fi |
| 1999 |
\ifdim\eqnshift@<\z@ |
| 2000 |
\global\eqnshift@\z@ |
| 2001 |
\fi |
| 2002 |
\calc@shift@align |
| 2003 |
\global\tagshift@\totwidth@ |
| 2004 |
\global\advance\tagshift@\@tempcntb\alignsep@ |
| 2005 |
\if@fleqn |
| 2006 |
\ifnum\xatlevel@=\tw@ |
| 2007 |
\global\advance\tagshift@-\@mathmargin\relax |
| 2008 |
\fi |
| 2009 |
\else |
| 2010 |
\global\advance\tagshift@\eqnshift@ |
| 2011 |
\fi |
| 2012 |
\iftagsleft@ \else |
| 2013 |
\global\advance\tagshift@-\displaywidth |
| 2014 |
\fi |
| 2015 |
\dimen@\minalignsep\relax |
| 2016 |
\global\advance\totwidth@\@tempcntb\dimen@ |
| 2017 |
\ifdim\totwidth@>\displaywidth |
| 2018 |
\global\let\displaywidth@\totwidth@ |
| 2019 |
\else |
| 2020 |
\global\let\displaywidth@\displaywidth |
| 2021 |
\fi |
| 2022 |
\endgroup |
| 2023 |
} |
| 2024 |
\iftagsleft@\if@fleqn |
| 2025 |
\def\calc@shift@align{% |
| 2026 |
\global\let\tag@shifts\@empty |
| 2027 |
\begingroup |
| 2028 |
\@tempdima\@mathmargin\relax |
| 2029 |
\advance\@tempdima-\mintagsep\relax |
| 2030 |
\loop |
| 2031 |
\ifnum\row@>0 |
| 2032 |
\ifdim\tag@width\row@>\z@ |
| 2033 |
\x@calc@shift@lf |
| 2034 |
\else |
| 2035 |
\saveshift@0% |
| 2036 |
\fi |
| 2037 |
\advance\row@\m@ne |
| 2038 |
\repeat |
| 2039 |
\endgroup |
| 2040 |
} |
| 2041 |
\def\x@calc@shift@lf{% |
| 2042 |
\ifdim\eqnshift@=\z@ |
| 2043 |
\global\eqnshift@\@mathmargin\relax |
| 2044 |
\alignsep@\displaywidth |
| 2045 |
\advance\alignsep@-\totwidth@ |
| 2046 |
\global\divide\alignsep@\@tempcntb |
| 2047 |
\ifdim\alignsep@<\minalignsep\relax |
| 2048 |
\global\alignsep@\minalignsep\relax |
| 2049 |
\fi |
| 2050 |
\fi |
| 2051 |
\ifdim\tag@width\row@>\@tempdima |
| 2052 |
\saveshift@1% |
| 2053 |
\else |
| 2054 |
\saveshift@0% |
| 2055 |
\fi |
| 2056 |
} |
| 2057 |
\fi\fi |
| 2058 |
\iftagsleft@\else\if@fleqn |
| 2059 |
\def\calc@shift@align{% |
| 2060 |
\global\let\tag@shifts\@empty |
| 2061 |
\begingroup |
| 2062 |
\loop |
| 2063 |
\ifnum\row@>0 |
| 2064 |
\ifdim\tag@width\row@>\z@ |
| 2065 |
\x@calc@shift@rf |
| 2066 |
\else |
| 2067 |
\saveshift@0% |
| 2068 |
\fi |
| 2069 |
\advance\row@\m@ne |
| 2070 |
\repeat |
| 2071 |
\endgroup |
| 2072 |
} |
| 2073 |
\def\x@calc@shift@rf{% |
| 2074 |
\column@\z@ |
| 2075 |
\@tempdimb\z@ |
| 2076 |
\@tempdimc\z@ |
| 2077 |
\edef\@tempb{\fieldlengths@\row@}% |
| 2078 |
\@for\@tempa:=\@tempb\do{% |
| 2079 |
\advance\column@\@ne |
| 2080 |
\x@rcalc@width |
| 2081 |
}% |
| 2082 |
\begingroup |
| 2083 |
\advance\column@\m@ne |
| 2084 |
\divide\column@\tw@ |
| 2085 |
\ifnum\@tempcntb>\column@ |
| 2086 |
\advance\@tempcnta-\@tempcntb |
| 2087 |
\advance\@tempcnta\column@ |
| 2088 |
\@tempcntb\column@ |
| 2089 |
\fi |
| 2090 |
\tagwidth@\tag@width\row@\relax |
| 2091 |
\@tempdima\eqnshift@ |
| 2092 |
\advance\@tempdima\@tempdimc\relax |
| 2093 |
\advance\@tempdima\tagwidth@ |
| 2094 |
\dimen@\minalignsep\relax |
| 2095 |
\multiply\dimen@\@tempcntb |
| 2096 |
\advance\dimen@\mintagsep\relax |
| 2097 |
\advance\dimen@\@tempdima |
| 2098 |
\ifdim\dimen@>\displaywidth |
| 2099 |
\saveshift@1% |
| 2100 |
\else |
| 2101 |
\saveshift@0% |
| 2102 |
\dimen@\alignsep@\relax |
| 2103 |
\multiply\dimen@\@tempcntb |
| 2104 |
\advance\dimen@\@tempdima |
| 2105 |
\advance\dimen@\tagwidth@ |
| 2106 |
\ifdim\dimen@>\displaywidth |
| 2107 |
\dimen@\displaywidth |
| 2108 |
\advance\dimen@-\@tempdima |
| 2109 |
\ifnum\xatlevel@=\tw@ |
| 2110 |
\advance\dimen@-\mintagsep\relax |
| 2111 |
\fi |
| 2112 |
\divide\dimen@\@tempcnta |
| 2113 |
\ifdim\dimen@<\minalignsep\relax |
| 2114 |
\global\alignsep@\minalignsep\relax |
| 2115 |
\else |
| 2116 |
\global\alignsep@\dimen@ |
| 2117 |
\fi |
| 2118 |
\fi |
| 2119 |
\fi |
| 2120 |
\endgroup |
| 2121 |
} |
| 2122 |
\fi\fi |
| 2123 |
\iftagsleft@\else\if@fleqn\else |
| 2124 |
\def\calc@shift@align{% |
| 2125 |
\global\let\tag@shifts\@empty |
| 2126 |
\begingroup |
| 2127 |
\loop |
| 2128 |
\ifnum\row@>0 |
| 2129 |
\ifdim\tag@width\row@>\z@ |
| 2130 |
\x@calc@shift@rc |
| 2131 |
\else |
| 2132 |
\saveshift@0% |
| 2133 |
\fi |
| 2134 |
\advance\row@\m@ne |
| 2135 |
\repeat |
| 2136 |
\endgroup |
| 2137 |
} |
| 2138 |
\def\x@calc@shift@rc{% |
| 2139 |
\column@\z@ |
| 2140 |
\@tempdimb\z@ |
| 2141 |
\@tempdimc\z@ |
| 2142 |
\edef\@tempb{\fieldlengths@\row@}% |
| 2143 |
\@for\@tempa:=\@tempb\do{% |
| 2144 |
\advance\column@\@ne |
| 2145 |
\x@rcalc@width |
| 2146 |
}% |
| 2147 |
\begingroup |
| 2148 |
\advance\column@\m@ne |
| 2149 |
\divide\column@\tw@ |
| 2150 |
\ifnum\@tempcntb>\column@ |
| 2151 |
\advance\@tempcnta-\@tempcntb |
| 2152 |
\advance\@tempcnta\column@ |
| 2153 |
\@tempcntb\column@ |
| 2154 |
\fi |
| 2155 |
\tagwidth@\tag@width\row@\relax |
| 2156 |
\@tempdima\@tempdimc |
| 2157 |
\advance\@tempdima\tagwidth@ |
| 2158 |
\dimen@\minalignsep\relax |
| 2159 |
\multiply\dimen@\@tempcntb |
| 2160 |
\advance\dimen@\mintagsep\relax |
| 2161 |
\ifnum\xatlevel@=\tw@ \else |
| 2162 |
\advance\dimen@\mintagsep\relax |
| 2163 |
\fi |
| 2164 |
\advance\dimen@\@tempdima |
| 2165 |
\ifdim\dimen@>\displaywidth |
| 2166 |
\saveshift@1% |
| 2167 |
\else |
| 2168 |
\saveshift@0% |
| 2169 |
\dimen@\eqnshift@ |
| 2170 |
\advance\dimen@\@tempdima |
| 2171 |
\advance\dimen@\@tempcntb\alignsep@ |
| 2172 |
\advance\dimen@\tagwidth@ |
| 2173 |
\ifdim\dimen@>\displaywidth |
| 2174 |
\dimen@\displaywidth |
| 2175 |
\advance\dimen@-\@tempdima |
| 2176 |
\ifnum\xatlevel@=\tw@ |
| 2177 |
\advance\dimen@-\mintagsep\relax |
| 2178 |
\fi |
| 2179 |
\divide\dimen@\@tempcnta |
| 2180 |
\ifdim\dimen@<\minalignsep\relax |
| 2181 |
\global\alignsep@\minalignsep\relax |
| 2182 |
\eqnshift@\displaywidth |
| 2183 |
\advance\eqnshift@-\@tempdima |
| 2184 |
\advance\eqnshift@-\@tempcntb\alignsep@ |
| 2185 |
\global\divide\eqnshift@\tw@ |
| 2186 |
\else |
| 2187 |
\ifdim\dimen@<\eqnshift@ |
| 2188 |
\ifdim\dimen@<\z@ |
| 2189 |
\global\eqnshift@\z@ |
| 2190 |
\else |
| 2191 |
\global\eqnshift@\dimen@ |
| 2192 |
\fi |
| 2193 |
\fi |
| 2194 |
\ifdim\dimen@<\alignsep@ |
| 2195 |
\global\alignsep@\dimen@ |
| 2196 |
\fi |
| 2197 |
\fi |
| 2198 |
\fi |
| 2199 |
\fi |
| 2200 |
\endgroup |
| 2201 |
} |
| 2202 |
\fi\fi |
| 2203 |
\iftagsleft@\else |
| 2204 |
\def\x@rcalc@width{% |
| 2205 |
\ifdim\@tempa > \z@ |
| 2206 |
\advance\@tempdimc\@tempdimb |
| 2207 |
\ifodd\column@ |
| 2208 |
\advance\@tempdimc\maxcol@width\column@ |
| 2209 |
\@tempdimb\z@ |
| 2210 |
\else |
| 2211 |
\advance\@tempdimc\@tempa\relax |
| 2212 |
\@tempdimb\maxcol@width\column@ |
| 2213 |
\advance\@tempdimb-\@tempa\relax |
| 2214 |
\fi |
| 2215 |
\else |
| 2216 |
\advance\@tempdimb\maxcol@width\column@\relax |
| 2217 |
\fi |
| 2218 |
} |
| 2219 |
\fi |
| 2220 |
\iftagsleft@\if@fleqn\else |
| 2221 |
\def\calc@shift@align{% |
| 2222 |
\global\let\tag@shifts\@empty |
| 2223 |
\begingroup |
| 2224 |
\loop |
| 2225 |
\ifnum\row@>\z@ |
| 2226 |
\ifdim\tag@width\row@>\z@ |
| 2227 |
\x@calc@shift@lc |
| 2228 |
\else |
| 2229 |
\saveshift@0% |
| 2230 |
\fi |
| 2231 |
\advance\row@\m@ne |
| 2232 |
\repeat |
| 2233 |
\endgroup |
| 2234 |
} |
| 2235 |
\def\x@calc@shift@lc{% |
| 2236 |
\column@\z@ |
| 2237 |
\@tempdima\z@ % ``width of equation'' |
| 2238 |
\@tempdimb\z@ % ``indent of equation'' |
| 2239 |
\edef\@tempb{\fieldlengths@\row@}% |
| 2240 |
\@for\@tempa:=\@tempb\do{% |
| 2241 |
\advance\column@\@ne |
| 2242 |
\x@lcalc@width |
| 2243 |
}% |
| 2244 |
\begingroup |
| 2245 |
\tagwidth@\tag@width\row@\relax |
| 2246 |
\@tempdima\totwidth@ |
| 2247 |
\advance\@tempdima-\@tempdimb |
| 2248 |
\advance\@tempdima\tagwidth@ |
| 2249 |
\dimen@\minalignsep\relax |
| 2250 |
\multiply\dimen@\@tempcntb |
| 2251 |
\advance\dimen@\mintagsep\relax |
| 2252 |
\ifnum\xatlevel@=\tw@ \else |
| 2253 |
\advance\dimen@\mintagsep\relax |
| 2254 |
\fi |
| 2255 |
\advance\dimen@\@tempdima |
| 2256 |
\ifdim\dimen@>\displaywidth |
| 2257 |
\saveshift@1% |
| 2258 |
\else |
| 2259 |
\saveshift@0% |
| 2260 |
\dimen@\alignsep@ |
| 2261 |
\multiply\dimen@\count@ |
| 2262 |
\advance\dimen@\eqnshift@ |
| 2263 |
\advance\dimen@\@tempdimb |
| 2264 |
\ifdim\dimen@<2\tagwidth@ |
| 2265 |
\dimen@\displaywidth |
| 2266 |
\advance\dimen@-\@tempdima |
| 2267 |
\ifnum\xatlevel@=\tw@ |
| 2268 |
\advance\dimen@-\mintagsep\relax |
| 2269 |
\fi |
| 2270 |
\ifnum\@tempcnta>\z@ |
| 2271 |
\divide\dimen@\@tempcnta |
| 2272 |
\else \dimen@\z@ |
| 2273 |
\fi |
| 2274 |
\ifdim\dimen@<\minalignsep\relax |
| 2275 |
\global\alignsep@\minalignsep\relax |
| 2276 |
\dimen@\displaywidth |
| 2277 |
\advance\dimen@-\@tempdima |
| 2278 |
\advance\dimen@-\@tempcntb\alignsep@ |
| 2279 |
\global\divide\dimen@\tw@ |
| 2280 |
\else |
| 2281 |
\ifdim\dimen@<\alignsep@ |
| 2282 |
\global\alignsep@\dimen@ |
| 2283 |
\fi |
| 2284 |
\fi |
| 2285 |
\ifnum\xatlevel@=\tw@ |
| 2286 |
\dimen@\mintagsep\relax |
| 2287 |
\fi |
| 2288 |
\advance\dimen@\tagwidth@ |
| 2289 |
\advance\dimen@-\@tempdimb |
| 2290 |
\advance\dimen@-\count@\alignsep@ |
| 2291 |
\ifdim\dimen@>\eqnshift@ |
| 2292 |
\global\eqnshift@\dimen@ |
| 2293 |
\fi |
| 2294 |
\fi |
| 2295 |
\fi |
| 2296 |
\endgroup |
| 2297 |
} |
| 2298 |
\def\x@lcalc@width{% |
| 2299 |
\ifdim\@tempdima = \z@ |
| 2300 |
\ifdim\@tempa > \z@ |
| 2301 |
\@tempdima\p@ |
| 2302 |
\ifodd\column@ |
| 2303 |
\advance\@tempdimb \maxcol@width\column@ |
| 2304 |
\advance\@tempdimb-\@tempa |
| 2305 |
\fi |
| 2306 |
\count@\column@ |
| 2307 |
\advance\count@\m@ne |
| 2308 |
\divide\count@\tw@ |
| 2309 |
\advance\@tempcnta-\count@ |
| 2310 |
\advance\@tempcntb-\count@ |
| 2311 |
\else |
| 2312 |
\advance\@tempdimb \maxcol@width\column@\relax |
| 2313 |
\fi |
| 2314 |
\fi |
| 2315 |
} |
| 2316 |
\fi\fi |
| 2317 |
\def\place@tag{% |
| 2318 |
\iftagsleft@ |
| 2319 |
\kern-\tagshift@ |
| 2320 |
\if1\shift@tag\row@\relax |
| 2321 |
\rlap{\vbox{% |
| 2322 |
\normalbaselines |
| 2323 |
\boxz@ |
| 2324 |
\vbox to\lineht@{}% |
| 2325 |
\raise@tag |
| 2326 |
}}% |
| 2327 |
\else |
| 2328 |
\rlap{\boxz@}% |
| 2329 |
\fi |
| 2330 |
\kern\displaywidth@ |
| 2331 |
\else |
| 2332 |
\kern-\tagshift@ |
| 2333 |
\if1\shift@tag\row@\relax |
| 2334 |
\llap{\vtop{% |
| 2335 |
\raise@tag |
| 2336 |
\normalbaselines |
| 2337 |
\setbox\@ne\null |
| 2338 |
\dp\@ne\lineht@ |
| 2339 |
\box\@ne |
| 2340 |
\boxz@ |
| 2341 |
}}% |
| 2342 |
\else |
| 2343 |
\llap{\boxz@}% |
| 2344 |
\fi |
| 2345 |
\fi |
| 2346 |
} |
| 2347 |
\def\align@preamble{% |
| 2348 |
&\hfil |
| 2349 |
\strut@ |
| 2350 |
\setboxz@h{\@lign$\m@th\displaystyle{##}$}% |
| 2351 |
\ifmeasuring@\savefieldlength@\fi |
| 2352 |
\set@field |
| 2353 |
\tabskip\z@skip |
| 2354 |
&\setboxz@h{\@lign$\m@th\displaystyle{{}##}$}% |
| 2355 |
\ifmeasuring@\savefieldlength@\fi |
| 2356 |
\set@field |
| 2357 |
\hfil |
| 2358 |
\tabskip\alignsep@ |
| 2359 |
} |
| 2360 |
\def\set@field{% |
| 2361 |
\column@plus |
| 2362 |
\iftagsleft@ |
| 2363 |
\ifdim\ht\z@>\lineht@ |
| 2364 |
\global\lineht@\ht\z@ |
| 2365 |
\fi |
| 2366 |
\else |
| 2367 |
\ifdim\dp\z@>\lineht@ |
| 2368 |
\global\lineht@\dp\z@ |
| 2369 |
\fi |
| 2370 |
\fi |
| 2371 |
\boxz@ |
| 2372 |
} |
| 2373 |
\edef\split@err#1{% |
| 2374 |
\@nx\@amsmath@err{% |
| 2375 |
\string\begin{split} won't work here% |
| 2376 |
}{% |
| 2377 |
\@xp\@nx\csname |
| 2378 |
Did you forget a preceding \string\begin{equation}?^^J% |
| 2379 |
If not, perhaps the `aligned' environment is what |
| 2380 |
you want.\endcsname}% |
| 2381 |
} |
| 2382 |
\newenvironment{split}{% |
| 2383 |
\if@display |
| 2384 |
\ifinner |
| 2385 |
\@xp\@xp\@xp\split@aligned |
| 2386 |
\else |
| 2387 |
\ifst@rred \else \global\@eqnswtrue \fi |
| 2388 |
\fi |
| 2389 |
\else \let\endsplit\@empty \@xp\collect@body\@xp\split@err |
| 2390 |
\fi |
| 2391 |
\collect@body\gather@split |
| 2392 |
}{% |
| 2393 |
\crcr |
| 2394 |
\egroup |
| 2395 |
\egroup |
| 2396 |
\iftagsleft@ \@xp\lendsplit@ \else \@xp\rendsplit@ \fi |
| 2397 |
} |
| 2398 |
\let\split@tag\relax % init |
| 2399 |
\def\gather@split#1#2#3{% |
| 2400 |
\@xp\endgroup \reset@equation % math@cr will handle equation numbering |
| 2401 |
\iftag@ |
| 2402 |
\toks@\@xp{\df@tag}% |
| 2403 |
\edef\split@tag{% |
| 2404 |
\gdef\@nx\df@tag{\the\toks@}% |
| 2405 |
\global\@nx\tag@true \@nx\nonumber |
| 2406 |
}% |
| 2407 |
\else \let\split@tag\@empty |
| 2408 |
\fi |
| 2409 |
\spread@equation |
| 2410 |
\vcenter\bgroup |
| 2411 |
\gather@{\split@tag \begin{split}#1\end{split}}% |
| 2412 |
\def\endmathdisplay@a{% |
| 2413 |
\math@cr \black@ \totwidth@ \egroup |
| 2414 |
\egroup |
| 2415 |
}% |
| 2416 |
} |
| 2417 |
\def\insplit@{% |
| 2418 |
\global\setbox\z@\vbox\bgroup |
| 2419 |
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr |
| 2420 |
\default@tag % disallow use of \tag here |
| 2421 |
\ialign\bgroup |
| 2422 |
\hfil |
| 2423 |
\strut@ |
| 2424 |
$\m@th\displaystyle{##}$% |
| 2425 |
&$\m@th\displaystyle{{}##}$% |
| 2426 |
\hfill % Why not \hfil?---dmj, 1994/12/28 |
| 2427 |
\crcr |
| 2428 |
} |
| 2429 |
\def\rendsplit@{% |
| 2430 |
\ifinalign@ |
| 2431 |
\global\setbox9 \vtop{% |
| 2432 |
\unvcopy\z@ |
| 2433 |
\global\setbox8 \lastbox |
| 2434 |
\unskip |
| 2435 |
}% |
| 2436 |
\setbox\@ne\hbox{% |
| 2437 |
\unhcopy8 |
| 2438 |
\unskip |
| 2439 |
\global\setbox\tw@\lastbox |
| 2440 |
\unskip |
| 2441 |
\global\setbox\thr@@\lastbox |
| 2442 |
}% |
| 2443 |
\ifctagsplit@ |
| 2444 |
\gdef\split@{% |
| 2445 |
\hbox to\wd\thr@@{}% |
| 2446 |
&\vcenter{\vbox{\moveleft\wd\thr@@\boxz@}}% |
| 2447 |
}% |
| 2448 |
\else |
| 2449 |
\global\setbox7 \hbox{\unhbox\tw@\unskip}% |
| 2450 |
\gdef\split@{% |
| 2451 |
\global\@tempcnta\column@ |
| 2452 |
&\setboxz@h{}% |
| 2453 |
\savetaglength@ |
| 2454 |
\global\advance\row@\@ne |
| 2455 |
\vbox{\moveleft\wd\thr@@\box9}% |
| 2456 |
\crcr |
| 2457 |
\noalign{\global\lineht@\z@}% |
| 2458 |
\add@amps\@tempcnta |
| 2459 |
\box\thr@@ |
| 2460 |
&\box7 |
| 2461 |
}% |
| 2462 |
\fi |
| 2463 |
\else |
| 2464 |
\ifctagsplit@ |
| 2465 |
\gdef\split@{\vcenter{\boxz@}}% |
| 2466 |
\else |
| 2467 |
\gdef\split@{% |
| 2468 |
\boxz@ |
| 2469 |
}% |
| 2470 |
\fi |
| 2471 |
\fi |
| 2472 |
\aftergroup\split@ |
| 2473 |
} |
| 2474 |
\def\lendsplit@{% |
| 2475 |
\global\setbox9\vtop{\unvcopy\z@}% |
| 2476 |
\ifinalign@ |
| 2477 |
\setbox\@ne\vbox{% |
| 2478 |
\unvcopy\z@ |
| 2479 |
\global\setbox8\lastbox |
| 2480 |
}% |
| 2481 |
\setbox\@ne\hbox{% |
| 2482 |
\unhcopy8% |
| 2483 |
\unskip |
| 2484 |
\setbox\tw@\lastbox |
| 2485 |
\unskip |
| 2486 |
\global\setbox\thr@@\lastbox |
| 2487 |
}% |
| 2488 |
\ifctagsplit@ |
| 2489 |
\gdef\split@{% |
| 2490 |
\hbox to\wd\thr@@{}% |
| 2491 |
&\vcenter{\vbox{\moveleft\wd\thr@@\box9}}% |
| 2492 |
}% |
| 2493 |
\else |
| 2494 |
\gdef\split@{% |
| 2495 |
\hbox to\wd\thr@@{}% |
| 2496 |
&\vbox{\moveleft\wd\thr@@\box9}% |
| 2497 |
}% |
| 2498 |
\fi |
| 2499 |
\else |
| 2500 |
\ifctagsplit@ |
| 2501 |
\gdef\split@{\vcenter{\box9}}% |
| 2502 |
\else |
| 2503 |
\gdef\split@{\box9}% |
| 2504 |
\fi |
| 2505 |
\fi |
| 2506 |
\aftergroup\split@ |
| 2507 |
} |
| 2508 |
\def\split@aligned#1#2{% |
| 2509 |
\iffalse{\fi\ifnum0=`}\fi |
| 2510 |
\collect@body\split@al@a} |
| 2511 |
\def\split@al@a#1#2#3{% |
| 2512 |
\split@warning |
| 2513 |
\endgroup |
| 2514 |
\toks@{\begin{aligned}}% |
| 2515 |
\if@fleqn \split@al@tagcheck \fi |
| 2516 |
\the\toks@\relax#1\end{aligned}% |
| 2517 |
\ifnum0=`{\fi\iffalse}\fi |
| 2518 |
} |
| 2519 |
\def\split@al@tagcheck{% |
| 2520 |
\ifctagsplit@ |
| 2521 |
\else |
| 2522 |
\iftagsleft@ \toks@\@xp{\the\toks@ [t]}% |
| 2523 |
\else \toks@\@xp{\the\toks@ [b]}% |
| 2524 |
\fi |
| 2525 |
\fi |
| 2526 |
} |
| 2527 |
\def\split@warning{% |
| 2528 |
\PackageWarning{amsmath}{% |
| 2529 |
Cannot use `split' here;\MessageBreak trying to recover with `aligned'}% |
| 2530 |
} |
| 2531 |
\newskip\multlinegap |
| 2532 |
\multlinegap10pt |
| 2533 |
\newskip\multlinetaggap |
| 2534 |
\multlinetaggap10pt |
| 2535 |
\def\start@multline#1{% |
| 2536 |
\RIfM@ |
| 2537 |
\nomath@env |
| 2538 |
\DN@{\@namedef{end\@currenvir}{}\@gobble}% |
| 2539 |
\else |
| 2540 |
\dollardollar@begin |
| 2541 |
#1% |
| 2542 |
\ifst@rred |
| 2543 |
\nonumber |
| 2544 |
\else |
| 2545 |
\global\@eqnswtrue |
| 2546 |
\fi |
| 2547 |
\let\next@\multline@ |
| 2548 |
\fi |
| 2549 |
\collect@body\next@ |
| 2550 |
} |
| 2551 |
\newenvironment{multline}{% |
| 2552 |
\start@multline\st@rredfalse |
| 2553 |
}{% |
| 2554 |
\iftagsleft@ \@xp\lendmultline@ \else \@xp\rendmultline@ \fi |
| 2555 |
\ignorespacesafterend |
| 2556 |
} |
| 2557 |
\newenvironment{multline*}{\start@multline\st@rredtrue}{\endmultline} |
| 2558 |
\def\multline@#1{% |
| 2559 |
\Let@ |
| 2560 |
\@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}% |
| 2561 |
\chardef\dspbrk@context\z@ |
| 2562 |
\restore@math@cr |
| 2563 |
\let\tag\tag@in@align |
| 2564 |
\global\tag@false \global\let\raise@tag\@empty |
| 2565 |
\mmeasure@{#1}% |
| 2566 |
\let\tag\gobble@tag \let\label\@gobble |
| 2567 |
\tabskip \if@fleqn \@mathmargin \else \z@skip \fi |
| 2568 |
\totwidth@\displaywidth |
| 2569 |
\if@fleqn |
| 2570 |
\advance\totwidth@-\@mathmargin |
| 2571 |
\fi |
| 2572 |
\halign\bgroup |
| 2573 |
\hbox to\totwidth@{% |
| 2574 |
\if@fleqn |
| 2575 |
\hskip \@centering \relax |
| 2576 |
\else |
| 2577 |
\hfil |
| 2578 |
\fi |
| 2579 |
\strut@ |
| 2580 |
$\m@th\displaystyle{}##\endmultline@math |
| 2581 |
\hfil |
| 2582 |
}% |
| 2583 |
\crcr |
| 2584 |
\if@fleqn |
| 2585 |
\hskip-\@mathmargin |
| 2586 |
\def\multline@indent{\hskip\@mathmargin}% put it back |
| 2587 |
\else |
| 2588 |
\hfilneg |
| 2589 |
\def\multline@indent{\hskip\multlinegap}% |
| 2590 |
\fi |
| 2591 |
\iftagsleft@ |
| 2592 |
\iftag@ |
| 2593 |
\begingroup |
| 2594 |
\ifshifttag@ |
| 2595 |
\rlap{\vbox{% |
| 2596 |
\normalbaselines |
| 2597 |
\hbox{% |
| 2598 |
\strut@ |
| 2599 |
\make@display@tag |
| 2600 |
}% |
| 2601 |
\vbox to\lineht@{}% |
| 2602 |
\raise@tag |
| 2603 |
}}% |
| 2604 |
\multline@indent |
| 2605 |
\else |
| 2606 |
\setbox\z@\hbox{\make@display@tag}% |
| 2607 |
\dimen@\@mathmargin \advance\dimen@-\wd\z@ |
| 2608 |
\ifdim\dimen@<\multlinetaggap |
| 2609 |
\dimen@\multlinetaggap |
| 2610 |
\fi |
| 2611 |
\box\z@ \hskip\dimen@\relax |
| 2612 |
\fi |
| 2613 |
\endgroup |
| 2614 |
\else |
| 2615 |
\multline@indent |
| 2616 |
\fi |
| 2617 |
\else |
| 2618 |
\multline@indent |
| 2619 |
\fi |
| 2620 |
#1% |
| 2621 |
} |
| 2622 |
\def\endmultline@math{$} |
| 2623 |
\def\lendmultline@{% |
| 2624 |
\hfilneg |
| 2625 |
\hskip\multlinegap |
| 2626 |
\math@cr |
| 2627 |
\egroup |
| 2628 |
\dollardollar@end |
| 2629 |
} |
| 2630 |
\def\rendmultline@{% |
| 2631 |
\iftag@ |
| 2632 |
$\let\endmultline@math\relax |
| 2633 |
\ifshifttag@ |
| 2634 |
\hskip\multlinegap |
| 2635 |
\llap{\vtop{% |
| 2636 |
\raise@tag |
| 2637 |
\normalbaselines |
| 2638 |
\setbox\@ne\null |
| 2639 |
\dp\@ne\lineht@ |
| 2640 |
\box\@ne |
| 2641 |
\hbox{\strut@\make@display@tag}% |
| 2642 |
}}% |
| 2643 |
\else |
| 2644 |
\hskip\multlinetaggap |
| 2645 |
\make@display@tag |
| 2646 |
\fi |
| 2647 |
\else |
| 2648 |
\hskip\multlinegap |
| 2649 |
\fi |
| 2650 |
\hfilneg |
| 2651 |
\math@cr |
| 2652 |
\egroup\dollardollar@end |
| 2653 |
} |
| 2654 |
\def\mmeasure@#1{% |
| 2655 |
\begingroup |
| 2656 |
\measuring@true |
| 2657 |
\def\label##1{% |
| 2658 |
\begingroup\measuring@false\label@in@display{##1}\endgroup}% |
| 2659 |
\def\math@cr@@@{\cr}% |
| 2660 |
\let\shoveleft\@iden \let\shoveright\@iden |
| 2661 |
\savecounters@ |
| 2662 |
\global\row@\z@ |
| 2663 |
\setbox\@ne\vbox{% |
| 2664 |
\global\let\df@tag\@empty |
| 2665 |
\halign{% |
| 2666 |
\setboxz@h{\@lign$\m@th\displaystyle{}##$}% |
| 2667 |
\iftagsleft@ |
| 2668 |
\ifnum\row@=\@ne |
| 2669 |
\global\totwidth@\wdz@ |
| 2670 |
\global\lineht@\ht\z@ |
| 2671 |
\fi |
| 2672 |
\else |
| 2673 |
\global\totwidth@\wdz@ |
| 2674 |
\global\lineht@\dp\z@ |
| 2675 |
\fi |
| 2676 |
\crcr |
| 2677 |
#1% |
| 2678 |
\crcr |
| 2679 |
}% |
| 2680 |
}% |
| 2681 |
\ifx\df@tag\@empty\else\global\tag@true\fi |
| 2682 |
\if@eqnsw\global\tag@true\fi |
| 2683 |
\iftag@ |
| 2684 |
\setboxz@h{% |
| 2685 |
\if@eqnsw |
| 2686 |
\stepcounter{equation}% |
| 2687 |
\tagform@\theequation |
| 2688 |
\else |
| 2689 |
\df@tag |
| 2690 |
\fi |
| 2691 |
}% |
| 2692 |
\global\tagwidth@\wdz@ |
| 2693 |
\dimen@\totwidth@ |
| 2694 |
\advance\dimen@\tagwidth@ |
| 2695 |
\advance\dimen@\multlinetaggap |
| 2696 |
\iftagsleft@\else |
| 2697 |
\if@fleqn |
| 2698 |
\advance\dimen@\@mathmargin |
| 2699 |
\fi |
| 2700 |
\fi |
| 2701 |
\ifdim\dimen@>\displaywidth |
| 2702 |
\global\shifttag@true |
| 2703 |
\else |
| 2704 |
\global\shifttag@false |
| 2705 |
\fi |
| 2706 |
\fi |
| 2707 |
\restorecounters@ |
| 2708 |
\endgroup |
| 2709 |
} |
| 2710 |
\iftagsleft@ |
| 2711 |
\protected\def\shoveright#1{% |
| 2712 |
#1% |
| 2713 |
\hfilneg |
| 2714 |
\hskip\multlinegap |
| 2715 |
} |
| 2716 |
\else |
| 2717 |
\protected\def\shoveright#1{% |
| 2718 |
#1% |
| 2719 |
\hfilneg |
| 2720 |
\iftag@ |
| 2721 |
\ifshifttag@ |
| 2722 |
\hskip\multlinegap |
| 2723 |
\else |
| 2724 |
\hskip\tagwidth@ |
| 2725 |
\hskip\multlinetaggap |
| 2726 |
\fi |
| 2727 |
\else |
| 2728 |
\hskip\multlinegap |
| 2729 |
\fi |
| 2730 |
} |
| 2731 |
\fi |
| 2732 |
\if@fleqn |
| 2733 |
\def\shoveleft#1{#1}% |
| 2734 |
\else |
| 2735 |
\iftagsleft@ |
| 2736 |
\protected\def\shoveleft#1{% |
| 2737 |
\setboxz@h{$\m@th\displaystyle{}#1$}% |
| 2738 |
\setbox\@ne\hbox{$\m@th\displaystyle#1$}% |
| 2739 |
\hfilneg |
| 2740 |
\iftag@ |
| 2741 |
\ifshifttag@ |
| 2742 |
\hskip\multlinegap |
| 2743 |
\else |
| 2744 |
\hskip\tagwidth@ |
| 2745 |
\hskip\multlinetaggap |
| 2746 |
\fi |
| 2747 |
\else |
| 2748 |
\hskip\multlinegap |
| 2749 |
\fi |
| 2750 |
\hskip.5\wd\@ne |
| 2751 |
\hskip-.5\wdz@ \relax |
| 2752 |
#1% |
| 2753 |
} |
| 2754 |
\else |
| 2755 |
\protected\def\shoveleft#1{% |
| 2756 |
\setboxz@h{$\m@th\displaystyle{}#1$}% |
| 2757 |
\setbox\@ne\hbox{$\m@th\displaystyle#1$}% |
| 2758 |
\hfilneg |
| 2759 |
\hskip\multlinegap |
| 2760 |
\hskip.5\wd\@ne |
| 2761 |
\hskip-.5\wdz@ \relax |
| 2762 |
#1% |
| 2763 |
} |
| 2764 |
\fi |
| 2765 |
\fi |
| 2766 |
\let\@@eqno\eqno |
| 2767 |
\let\@@leqno\leqno |
| 2768 |
\def\eqno{\@@eqno\let\eqno\relax\let\leqno\relax} |
| 2769 |
\def\leqno{\@@leqno\let\leqno\relax\let\eqno\relax} |
| 2770 |
\let\veqno=\@@eqno |
| 2771 |
\iftagsleft@ \let\veqno=\@@leqno \fi |
| 2772 |
\@ifundefined{SK@@label}{% |
| 2773 |
\let\SK@@label\relax \let\SK@equationtrue\relax |
| 2774 |
}{} |
| 2775 |
\let\reset@equation\@empty |
| 2776 |
\let\alt@tag\@empty |
| 2777 |
\def\tag@in@display#1#{\relax\tag@in@display@a{#1}} |
| 2778 |
\def\tag@in@display@a#1#2{% |
| 2779 |
\iftag@ |
| 2780 |
\invalid@tag{Multiple \string\tag}\relax |
| 2781 |
\else |
| 2782 |
\global\tag@true \nonumber \reset@equation \st@rredtrue |
| 2783 |
\if *\string#1% |
| 2784 |
\gdef\alt@tag{\def\SK@tagform@{#2\@gobble}% |
| 2785 |
\ifx\SK@@label\relax \let\tagform@\SK@tagform@ \fi |
| 2786 |
}% |
| 2787 |
\make@df@tag@@{#2}% |
| 2788 |
\else |
| 2789 |
\make@df@tag@@@{#2}% |
| 2790 |
\fi |
| 2791 |
\fi |
| 2792 |
} |
| 2793 |
\let\restore@hfuzz\@empty |
| 2794 |
\def\mathdisplay#1{% |
| 2795 |
\ifmmode \@badmath |
| 2796 |
\else |
| 2797 |
\dollardollar@begin\def\@currenvir{#1}% |
| 2798 |
\let\dspbrk@context\z@ |
| 2799 |
\let\tag\tag@in@display \let\label\label@in@display \SK@equationtrue |
| 2800 |
\global\let\df@label\@empty \global\let\df@tag\@empty |
| 2801 |
\global\tag@false |
| 2802 |
\let\mathdisplay@push\mathdisplay@@push |
| 2803 |
\let\mathdisplay@pop\mathdisplay@@pop |
| 2804 |
\if@fleqn |
| 2805 |
\edef\restore@hfuzz{\hfuzz\the\hfuzz\relax}% |
| 2806 |
\hfuzz\maxdimen |
| 2807 |
\setbox\z@\hbox to\displaywidth\bgroup |
| 2808 |
\let\split@warning\relax \restore@hfuzz |
| 2809 |
\everymath\@emptytoks \m@th $\displaystyle |
| 2810 |
\fi |
| 2811 |
\fi |
| 2812 |
} |
| 2813 |
\def\endmathdisplay#1{% |
| 2814 |
\ifmmode \else \@badmath \fi |
| 2815 |
\endmathdisplay@a |
| 2816 |
\dollardollar@end |
| 2817 |
\global\let\df@label\@empty \global\let\df@tag\@empty |
| 2818 |
\global\tag@false \global\let\alt@tag\@empty |
| 2819 |
\global\@eqnswfalse |
| 2820 |
} |
| 2821 |
\def\endmathdisplay@a{% |
| 2822 |
\if@eqnsw \gdef\df@tag{\tagform@\theequation}\fi |
| 2823 |
\if@fleqn \@xp\endmathdisplay@fleqn |
| 2824 |
\else \ifx\df@tag\@empty \else \veqno \alt@tag \df@tag \fi |
| 2825 |
\ifx\df@label\@empty \else \@xp\ltx@label\@xp{\df@label}\fi |
| 2826 |
\fi |
| 2827 |
\ifnum\dspbrk@lvl>\m@ne |
| 2828 |
\postdisplaypenalty -\@getpen\dspbrk@lvl |
| 2829 |
\global\dspbrk@lvl\m@ne |
| 2830 |
\fi |
| 2831 |
} |
| 2832 |
\let\too@wide\@ne |
| 2833 |
\def\endmathdisplay@fleqn{% |
| 2834 |
$\hfil\hskip\@mathmargin\egroup |
| 2835 |
\ifnum\badness<\inf@bad \let\too@wide\@ne \else \let\too@wide\z@ \fi |
| 2836 |
\ifx\@empty\df@tag |
| 2837 |
\else |
| 2838 |
\setbox4\hbox{\df@tag |
| 2839 |
\ifx\df@label\@empty \else \@xp\ltx@label\@xp{\df@label}\fi |
| 2840 |
}% |
| 2841 |
\fi |
| 2842 |
\csname emdf@% |
| 2843 |
\ifx\df@tag\@empty U\else \iftagsleft@ L\else R\fi\fi |
| 2844 |
\endcsname |
| 2845 |
} |
| 2846 |
\def\emdf@U{% |
| 2847 |
\restore@hfuzz |
| 2848 |
\ifodd\too@wide % not too wide: just need to swap the glue around |
| 2849 |
\hbox to\displaywidth{\hskip\@mathmargin\unhbox\z@\unskip}% |
| 2850 |
\else % M+B > displaywidth |
| 2851 |
\emdf@Ua |
| 2852 |
\fi |
| 2853 |
} |
| 2854 |
\def\emdf@Ua{% |
| 2855 |
\hbox to\columnwidth{% |
| 2856 |
\ifdim\displayindent>\z@ |
| 2857 |
\hskip\displayindent minus\displayindent |
| 2858 |
\fi |
| 2859 |
\hskip\@mathmargin \unhbox\z@ \unskip |
| 2860 |
}% |
| 2861 |
\displayindent\z@ \displaywidth\columnwidth |
| 2862 |
} |
| 2863 |
\def\emdf@R{% |
| 2864 |
\setbox\tw@\hbox to\displaywidth{% |
| 2865 |
\hskip\@mathmargin \unhcopy\z@\unskip\hfil\hskip\mintagsep\copy4 |
| 2866 |
}% |
| 2867 |
\restore@hfuzz |
| 2868 |
\ifnum\badness<\inf@bad \box\tw@ \else \emdf@Ra \fi |
| 2869 |
} |
| 2870 |
\def\emdf@Ra{% |
| 2871 |
\skip@\displayindent minus\displayindent |
| 2872 |
\displayindent\z@ \displaywidth\columnwidth |
| 2873 |
\spread@equation \everycr{}\tabskip\z@skip |
| 2874 |
\halign{\hbox to\displaywidth{##}\cr |
| 2875 |
\relax |
| 2876 |
\ifdim\skip@>\z@ \hskip\skip@ \fi |
| 2877 |
\hskip\@mathmargin\unhbox\z@\unskip\hfil\cr |
| 2878 |
\noalign{\raise@tag}% |
| 2879 |
\hfil\box4 \cr}% |
| 2880 |
} |
| 2881 |
\def\emdf@L{% |
| 2882 |
\@tempdima\@mathmargin |
| 2883 |
\advance\@tempdima-\wd4 \advance\@tempdima-\mintagsep |
| 2884 |
\skip@\@tempdima minus\@tempdima |
| 2885 |
\setbox\tw@\hbox to\displaywidth{% |
| 2886 |
\copy4\hskip\mintagsep |
| 2887 |
\ifdim\skip@>\z@ \hskip\skip@\fi |
| 2888 |
\unhcopy\z@\unskip |
| 2889 |
}% |
| 2890 |
\restore@hfuzz |
| 2891 |
\ifnum\badness<\inf@bad \box\tw@ \else \emdf@La \fi |
| 2892 |
} |
| 2893 |
\def\emdf@La{% |
| 2894 |
\spread@equation \everycr{}\tabskip\z@skip |
| 2895 |
\halign{\hbox to\displaywidth{##}\cr |
| 2896 |
\box4 \hfil \cr |
| 2897 |
\noalign{\raise@tag}% |
| 2898 |
\hskip\@mathmargin\unhbox\z@\unskip\hfil\cr}% |
| 2899 |
} |
| 2900 |
\newtoks\mathdisplay@stack |
| 2901 |
\let\mathdisplay@push\@empty |
| 2902 |
\def\mathdisplay@@push{% |
| 2903 |
\begingroup |
| 2904 |
\toks@\@xp{\df@label}\@temptokena\@xp{\df@tag}% |
| 2905 |
\toks8\@xp{\alt@tag}% |
| 2906 |
\edef\@tempa{% |
| 2907 |
\global\if@eqnsw\@nx\@eqnswtrue\else\@nx\@eqnswfalse\fi |
| 2908 |
\global\iftag@\@nx\tag@false\else\@nx\tag@true\fi |
| 2909 |
\gdef\@nx\df@label{\the\toks@}\gdef\@nx\df@tag{\the\@temptokena}% |
| 2910 |
\gdef\@nx\alt@tag{\the\toks8}% |
| 2911 |
\global\mathdisplay@stack{\the\mathdisplay@stack}% |
| 2912 |
}% |
| 2913 |
\global\mathdisplay@stack\@xp{\@tempa} |
| 2914 |
\endgroup |
| 2915 |
} |
| 2916 |
\let\mathdisplay@pop\@empty |
| 2917 |
\def\mathdisplay@@pop{\the\mathdisplay@stack} |
| 2918 |
\if@fleqn |
| 2919 |
\renewenvironment{equation}{% |
| 2920 |
\incr@eqnum |
| 2921 |
\mathdisplay@push |
| 2922 |
\st@rredfalse \global\@eqnswtrue |
| 2923 |
\mathdisplay{equation}% |
| 2924 |
}{% |
| 2925 |
\endmathdisplay{equation}% |
| 2926 |
\mathdisplay@pop |
| 2927 |
\ignorespacesafterend |
| 2928 |
} |
| 2929 |
\else |
| 2930 |
\renewenvironment{equation}{% |
| 2931 |
\mathdisplay@push |
| 2932 |
\st@rredfalse \global\@eqnswtrue |
| 2933 |
\mathdisplay{equation}% |
| 2934 |
\incr@eqnum\mathopen{}% |
| 2935 |
}{% |
| 2936 |
\endmathdisplay{equation}% |
| 2937 |
\mathdisplay@pop |
| 2938 |
\ignorespacesafterend |
| 2939 |
} |
| 2940 |
\fi |
| 2941 |
\newenvironment{equation*}{% |
| 2942 |
\mathdisplay@push |
| 2943 |
\st@rredtrue \global\@eqnswfalse |
| 2944 |
\mathdisplay{equation*}% |
| 2945 |
}{% |
| 2946 |
\endmathdisplay{equation*}% |
| 2947 |
\mathdisplay@pop |
| 2948 |
\ignorespacesafterend |
| 2949 |
} |
| 2950 |
\DeclareRobustCommand{\[}{\begin{equation*}} |
| 2951 |
\DeclareRobustCommand{\]}{\end{equation*}} |
| 2952 |
\endinput |
| 2953 |
%% |
| 2954 |
%% End of file `amsmath.sty'. |