summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/amsmath/amscd.sty
blob: 56a4e95800173c904eb8ef7fe134a362b658b682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
%%
%% This is file `amscd.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% amscd.dtx 
%% 
%%% ====================================================================
%%% @LaTeX-file{
%%%   filename  = "amscd.dtx",
%%%   version   = "2.0",
%%%   date      = "1999/11/29",
%%%   time      = "14:30:07 EST",
%%%   author    = "American Mathematical Society",
%%%   copyright = "Copyright 1995, 1999 American Mathematical Society,
%%%                all rights reserved.  Copying of this file is
%%%                authorized only if either:
%%%                (1) you make absolutely no changes to your copy,
%%%                including name; OR
%%%                (2) if you do make changes, you first rename it
%%%                to some other name.",
%%%   address   = "American Mathematical Society,
%%%                Technical Support,
%%%                Electronic Products and Services,
%%%                P. O. Box 6248,
%%%                Providence, RI 02940,
%%%                USA",
%%%   telephone = "401-455-4080 or (in the USA and Canada)
%%%                800-321-4AMS (321-4267)",
%%%   FAX       = "401-331-3842",
%%%   checksum  = "07428 333 1152 12117",
%%%   email     = "tech-support@ams.org (Internet)",
%%%   codetable = "ISO/ASCII",
%%%   keywords  = "latex, commutative diagram",
%%%   supported = "yes",
%%%   abstract  = "This is a \LaTeX{} package that adapts the
%%%                commutative diagram macros of AMS-\TeX{} for
%%%                use in \LaTeX{}",
%%%   docstring = "The checksum field above contains a CRC-16
%%%                checksum as the first value, followed by the
%%%                equivalent of the standard UNIX wc (word
%%%                count) utility output of lines, words, and
%%%                characters.  This is produced by Robert
%%%                Solovay's checksum utility.",
%%% }
%%% ====================================================================
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must December 1994 or later
\ProvidesPackage{amscd}[1999/11/29 v1.2d]
\RequirePackage{amsgen}
\@ifundefined{math@cr}{%
  \def\math@cr{{\ifnum0=`}\fi
    \@ifstar{\global\@eqpen\@M\math@cr@}%
          {\global\@eqpen\interdisplaylinepenalty \math@cr@}}
  \def\math@cr@{\new@ifnextchar[\math@cr@@{\math@cr@@[\z@]}}
  \def\math@cr@@[#1]{\ifnum0=`{\fi}\math@cr@@@
    \noalign{\vskip#1\relax}}
  \def\restore@math@cr{\def\math@cr@@@{\cr}}
}{}
\restore@math@cr
\@ifundefined{rightarrowfill@}{
  \def\rightarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@
    $#1\copy\z@\mkern-6mu\cleaders
    \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
    \mkern-6mu\mathord\rightarrow$}
  \def\leftarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@
    $#1\mathord\leftarrow\mkern-6mu\cleaders
    \hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
    \mkern-6mu\box\z@$}
  \def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1-$}\ht\z@\z@
    $#1\mathord\leftarrow\mkern-6mu\cleaders
    \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
    \mkern-6mu\mathord\rightarrow$}
}{}
\def\atdef@#1{\expandafter\def\csname\space @\string#1\endcsname}
\@ifundefined{Iat}{%
  \DeclareRobustCommand{\Iat}{\FN@\at@}
}{}
\begingroup \catcode`\@=\active
\csname if\string @compatibility\endcsname
\else \fam=\mathcode`\@
  \xdef @{\mathchar\number\fam\space }
\fi
\gdef\CDat{\let @=\Iat}
\endgroup
\mathcode`\@="8000 % make @ pseudo-active in math
\def\at@{\let\next@\at@@
 \ifcat\noexpand\next a\else
 \ifcat\noexpand\next0\else
 \ifcat\noexpand\next\relax\else
 \let\next@\at@@@\fi\fi\fi\next@}
\def\at@@#1{\expandafter
  \ifx\csname\space @\string#1\endcsname\relax
    \DN@{\at@@@#1}%
  \else
    \DN@{\csname\space @\string#1\endcsname}%
  \fi\next@}%
\@ifundefined{default@tag}{%
  \def\default@tag{%
    \def\tag{\PackageError{amscd}{\protect\tag\space not allowed
      here}\@eha}}%
}{}%
\@ifundefined{at@@@}{%
  \def\at@@@{\PackageError{amscd}{\Invalid@@ @}{\the\athelp@}\char64\relax}
}{}
\@ifundefined{athelp@}{\csname newhelp\endcsname\athelp@
{Only certain combinations beginning with @ make sense to me.^^J%
I'll assume you wanted @@ for a printed @.}}{}
\@ifundefined{minaw@}{\newdimen\minaw@}{}
\@ifundefined{bigaw@}{\newdimen\bigaw@}{}
\minaw@11.111pt
\newdimen\minCDarrowwidth
\minCDarrowwidth2.5pc
\newif\ifCD@
\let\ampersand@\relax
\newenvironment{CD}{%
  \CDat
  \bgroup\relax\iffalse{\fi\let\ampersand@&\iffalse}\fi
  \CD@true\vcenter\bgroup\let\\\math@cr\restore@math@cr\default@tag
  \tabskip\z@skip\baselineskip20\ex@
  \lineskip3\ex@\lineskiplimit3\ex@\halign\bgroup
  &\hfill$\m@th##$\hfill\crcr
}{%
  \crcr\egroup\egroup\egroup
}
\def\CD@check#1#2{\ifCD@\DN@{#2}\else
  \DN@{\PackageError{amscd}{@\protect#1 not
    allowed outside of the CD environment}\@eha}%
  \fi\next@}
\atdef@>#1>#2>{\ampersand@
  \ifCD@ \global\bigaw@\minCDarrowwidth \else \global\bigaw@\minaw@ \fi
  \setboxz@h{$\m@th\scriptstyle\;{#1}\;\;$}%
  \ifdim\wdz@>\bigaw@\global\bigaw@\wdz@\fi
  \@ifnotempty{#2}{\setbox\@ne\hbox{$\m@th\scriptstyle\;{#2}\;\;$}%
    \ifdim\wd\@ne>\bigaw@\global\bigaw@\wd\@ne\fi}%
 \ifCD@\enskip\fi
   \mathrel{\mathop{\hbox to\bigaw@{\rightarrowfill@\displaystyle}}%
     \limits^{#1}\@ifnotempty{#2}{_{#2}}}%
 \ifCD@\enskip\fi \ampersand@}
\atdef@<#1<#2<{\ampersand@
  \ifCD@ \global\bigaw@\minCDarrowwidth \else \global\bigaw@\minaw@ \fi
  \setboxz@h{$\m@th\scriptstyle\;\;{#1}\;$}%
  \ifdim\wdz@>\bigaw@ \global\bigaw@\wdz@ \fi
  \@ifnotempty{#2}{\setbox\@ne\hbox{$\m@th\scriptstyle\;\;{#2}\;$}%
    \ifdim\wd\@ne>\bigaw@ \global\bigaw@\wd\@ne \fi}%
  \ifCD@\enskip\fi
    \mathrel{\mathop{\hbox to\bigaw@{\leftarrowfill@\displaystyle}}%
      \limits^{#1}\@ifnotempty{#2}{_{#2}}}%
  \ifCD@\enskip\fi \ampersand@}
\begingroup \catcode`\~=\active \lccode`\~=`\@
\lowercase{%
  \global\atdef@)#1)#2){~>#1>#2>}
  \global\atdef@(#1(#2({~<#1<#2<}
}% end lowercase
\endgroup
\atdef@ A#1A#2A{\CD@check{A..A..A}{\llap{$\m@th\vcenter{\hbox
  {$\scriptstyle#1$}}$}\Big\uparrow
  \rlap{$\m@th\vcenter{\hbox{$\scriptstyle#2$}}$}&&}}
\atdef@ V#1V#2V{\CD@check{V..V..V}{\llap{$\m@th\vcenter{\hbox
  {$\scriptstyle#1$}}$}\Big\downarrow
  \rlap{$\m@th\vcenter{\hbox{$\scriptstyle#2$}}$}&&}}
\atdef@={\CD@check={&\enskip\mathrel
  {\vbox{\hrule\@width\minCDarrowwidth\vskip2\ex@\hrule\@width
  \minCDarrowwidth}}\enskip&}}
\atdef@|{\CD@check|{\Big\Vert&&}}
\atdef@\vert{\CD@check\vert{\Big\Vert&&}}
\atdef@.{\CD@check.{&&}}
\endinput
%%
%% End of file `amscd.sty'.