| 1 |
%% |
| 2 |
%% This is file `amscd.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% amscd.dtx |
| 8 |
%% |
| 9 |
%% Copyright (C) 1995, 1999 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 December 1994 or later |
| 26 |
\ProvidesPackage{amscd}[2017/04/14 v2.1 AMS Commutative Diagrams] |
| 27 |
\RequirePackage{amsgen} |
| 28 |
\@ifundefined{math@cr}{% |
| 29 |
\def\math@cr{{\ifnum0=`}\fi |
| 30 |
\@ifstar{\global\@eqpen\@M\math@cr@}% |
| 31 |
{\global\@eqpen\interdisplaylinepenalty \math@cr@}} |
| 32 |
\def\math@cr@{\new@ifnextchar[\math@cr@@{\math@cr@@[\z@]}} |
| 33 |
\def\math@cr@@[#1]{\ifnum0=`{\fi}\math@cr@@@ |
| 34 |
\noalign{\vskip#1\relax}} |
| 35 |
\def\restore@math@cr{\def\math@cr@@@{\cr}} |
| 36 |
}{} |
| 37 |
\restore@math@cr |
| 38 |
\@ifundefined{rightarrowfill@}{ |
| 39 |
\def\rightarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@ |
| 40 |
$#1\copy\z@\mkern-6mu\cleaders |
| 41 |
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill |
| 42 |
\mkern-6mu\mathord\rightarrow$} |
| 43 |
\def\leftarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@ |
| 44 |
$#1\mathord\leftarrow\mkern-6mu\cleaders |
| 45 |
\hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill |
| 46 |
\mkern-6mu\box\z@$} |
| 47 |
\def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@ |
| 48 |
$#1\mathord\leftarrow\mkern-6mu\cleaders |
| 49 |
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill |
| 50 |
\mkern-6mu\mathord\rightarrow$} |
| 51 |
}{} |
| 52 |
\def\atdef@#1{\expandafter\def\csname\space @\string#1\endcsname} |
| 53 |
\@ifundefined{Iat}{% |
| 54 |
\DeclareRobustCommand{\Iat}{\FN@\at@} |
| 55 |
}{} |
| 56 |
\begingroup \catcode`\@=\active |
| 57 |
\csname if\string @compatibility\endcsname |
| 58 |
\else \fam=\mathcode`\@ |
| 59 |
\xdef @{\mathchar\number\fam\space } |
| 60 |
\fi |
| 61 |
\gdef\CDat{\let @=\Iat} |
| 62 |
\endgroup |
| 63 |
\mathcode`\@="8000 % make @ pseudo-active in math |
| 64 |
\def\at@{\let\next@\at@@ |
| 65 |
\ifcat\noexpand\next a\else |
| 66 |
\ifcat\noexpand\next0\else |
| 67 |
\ifcat\noexpand\next\relax\else |
| 68 |
\let\next@\at@@@\fi\fi\fi\next@} |
| 69 |
\def\at@@#1{\expandafter |
| 70 |
\ifx\csname\space @\string#1\endcsname\relax |
| 71 |
\DN@{\at@@@#1}% |
| 72 |
\else |
| 73 |
\DN@{\csname\space @\string#1\endcsname}% |
| 74 |
\fi\next@}% |
| 75 |
\@ifundefined{default@tag}{% |
| 76 |
\def\default@tag{% |
| 77 |
\def\tag{\PackageError{amscd}{\protect\tag\space not allowed |
| 78 |
here}\@eha}}% |
| 79 |
}{}% |
| 80 |
\@ifundefined{at@@@}{% |
| 81 |
\def\at@@@{\PackageError{amscd}{\Invalid@@ @}{\the\athelp@}\char64\relax} |
| 82 |
}{} |
| 83 |
\@ifundefined{athelp@}{\csname newhelp\endcsname\athelp@ |
| 84 |
{Only certain combinations beginning with @ make sense to me.^^J% |
| 85 |
I'll assume you wanted @@ for a printed @.}}{} |
| 86 |
\@ifundefined{minaw@}{\newdimen\minaw@}{} |
| 87 |
\@ifundefined{bigaw@}{\newdimen\bigaw@}{} |
| 88 |
\[email protected] |
| 89 |
\newdimen\minCDarrowwidth |
| 90 |
\minCDarrowwidth2.5pc |
| 91 |
\newif\ifCD@ |
| 92 |
\let\ampersand@\relax |
| 93 |
\newenvironment{CD}{% |
| 94 |
\CDat |
| 95 |
\bgroup\relax\iffalse{\fi\let\ampersand@&\iffalse}\fi |
| 96 |
\CD@true\vcenter\bgroup\let\\\math@cr\restore@math@cr\default@tag |
| 97 |
\tabskip\z@skip\baselineskip20\ex@ |
| 98 |
\lineskip3\ex@\lineskiplimit3\ex@\halign\bgroup |
| 99 |
&\hfill$\m@th##$\hfill\crcr |
| 100 |
}{% |
| 101 |
\crcr\egroup\egroup\egroup |
| 102 |
} |
| 103 |
\def\CD@check#1#2{\ifCD@\DN@{#2}\else |
| 104 |
\DN@{\PackageError{amscd}{@\protect#1 not |
| 105 |
allowed outside of the CD environment}\@eha}% |
| 106 |
\fi\next@} |
| 107 |
\atdef@>#1>#2>{\ampersand@ |
| 108 |
\ifCD@ \global\bigaw@\minCDarrowwidth \else \global\bigaw@\minaw@ \fi |
| 109 |
\setboxz@h{$\m@th\scriptstyle\;{#1}\;\;$}% |
| 110 |
\ifdim\wdz@>\bigaw@\global\bigaw@\wdz@\fi |
| 111 |
\@ifnotempty{#2}{\setbox\@ne\hbox{$\m@th\scriptstyle\;{#2}\;\;$}% |
| 112 |
\ifdim\wd\@ne>\bigaw@\global\bigaw@\wd\@ne\fi}% |
| 113 |
\ifCD@\enskip\fi |
| 114 |
\mathrel{\mathop{\hbox to\bigaw@{\rightarrowfill@\displaystyle}}% |
| 115 |
\limits^{#1}\@ifnotempty{#2}{_{#2}}}% |
| 116 |
\ifCD@\enskip\fi \ampersand@} |
| 117 |
\atdef@<#1<#2<{\ampersand@ |
| 118 |
\ifCD@ \global\bigaw@\minCDarrowwidth \else \global\bigaw@\minaw@ \fi |
| 119 |
\setboxz@h{$\m@th\scriptstyle\;\;{#1}\;$}% |
| 120 |
\ifdim\wdz@>\bigaw@ \global\bigaw@\wdz@ \fi |
| 121 |
\@ifnotempty{#2}{\setbox\@ne\hbox{$\m@th\scriptstyle\;\;{#2}\;$}% |
| 122 |
\ifdim\wd\@ne>\bigaw@ \global\bigaw@\wd\@ne \fi}% |
| 123 |
\ifCD@\enskip\fi |
| 124 |
\mathrel{\mathop{\hbox to\bigaw@{\leftarrowfill@\displaystyle}}% |
| 125 |
\limits^{#1}\@ifnotempty{#2}{_{#2}}}% |
| 126 |
\ifCD@\enskip\fi \ampersand@} |
| 127 |
\begingroup \catcode`\~=\active \lccode`\~=`\@ |
| 128 |
\lowercase{% |
| 129 |
\global\atdef@)#1)#2){~>#1>#2>} |
| 130 |
\global\atdef@(#1(#2({~<#1<#2<} |
| 131 |
}% end lowercase |
| 132 |
\endgroup |
| 133 |
\atdef@ A#1A#2A{\CD@check{A..A..A}{\llap{$\m@th\vcenter{\hbox |
| 134 |
{$\scriptstyle#1$}}$}\Big\uparrow |
| 135 |
\rlap{$\m@th\vcenter{\hbox{$\scriptstyle#2$}}$}&&}} |
| 136 |
\atdef@ V#1V#2V{\CD@check{V..V..V}{\llap{$\m@th\vcenter{\hbox |
| 137 |
{$\scriptstyle#1$}}$}\Big\downarrow |
| 138 |
\rlap{$\m@th\vcenter{\hbox{$\scriptstyle#2$}}$}&&}} |
| 139 |
\atdef@={\CD@check={&\enskip\mathrel |
| 140 |
{\vbox{\hrule\@width\minCDarrowwidth\vskip2\ex@\hrule\@width |
| 141 |
\minCDarrowwidth}}\enskip&}} |
| 142 |
\atdef@|{\CD@check|{\Big\Vert&&}} |
| 143 |
\atdef@\vert{\CD@check\vert{\Big\Vert&&}} |
| 144 |
\atdef@.{\CD@check.{&&}} |
| 145 |
\endinput |
| 146 |
%% |
| 147 |
%% End of file `amscd.sty'. |