
 %%% fe-lcd.tex 
 %%  LamSTeX Commutative diagrams in AmSTeX:
 %%  L. Siebenmann, 5-92 <siebenmann@LALCLS.IN2P3.FR>
 %%  This is an update of a setup that has served well
 %%  at Labo Math Orsay since mid 1990.
 %%  Aims:
 %% --- add LamsTeX's Commutative Diagram module (LCD) to
 %% amstex in versions 2.0, 2.1 of 1990, 1991
 %% --- restore a missing dollar sign in LCD of 1989 (Ranicki)
 %% --- revise some definitions so that nothing goes wrong
 %% when semicolon changes between category 12 and 13
 %% for French use. The modified user macros
 %% are \rgaps, \cgaps, \dtX, dtY, \ds.
 %% --- the amstex version of \CD ... \endCD
 %% remains available under the new name
 %% \amsCD ... \endamsCD.

 %%% INSTRUCTIONS
 %%  Compile ON TOP OF some (hopefully almost any)
 %%  format containing AmSTeX in versions 2.0 or 2.1.
 %%  French use of AmSTeX is still requires special care:
 %%  one can use fe-ams.dmp in fe-format-dumper-cm on 
 %%  ftp matups.matups.fr

 %%  WARNING:
 %%  If you want to use all of LamsTeX in a French context
 %%  this file is not the right thing.  Instead
 %%  see for example fe-lams.dmp in fe-format-dumper-cm
 %%  

 %% Save AmS version of \CD ... \endCD
 \ifx\Cgaps\undefined% not Lams 
   \let\amsCD\CD\let\endamsCD\endCD
 \fi

 \catcode`\@=11
 \let\temp\relax
 \ifx\colonCt@\undefined
   \def\temp{\csname newcount\endcsname\Ct@}
 \fi
 \temp
  
 \chardef\colonCt@=\the\catcode`\;%% save just in case
  \catcode`\;=12 %% for duration of lcd89.tex

 \input lcd89.tex
 %% precisely the CD segment of LamsTeX 1989
 %% (not version 2.01 of 1991)

 %%% Patch for lcd89.tex 
 %%
  \def\@Cleanup#1>#2@{#2}
  \def\@Meaning#1{\expandafter\@Cleanup\meaning#1@}
  \def\@Sanitize#1{\def\@Sanholder{#1}%
      \edef\@Sanholder{\@Meaning\@Sanholder}
   }

 %% \cgaps{#1;...;#?} (apparent syntax)
  \let\@ldcgaps\cgaps
  \def\cgaps#1{\@Sanitize{#1}\expandafter
           \@ldcgaps\expandafter{\@Sanholder}}

 %% \rgaps{#1;...;#?} 
  \let\@ldrgaps\rgaps
  \def\rgaps#1{\@Sanitize{#1}\expandafter
           \@ldrgaps\expandafter{\@Sanholder}}

 %% \ds@(#1;#2) 
  \let\@ldds@\ds@
  \def\ds@(#1){\@Sanitize{#1}\expandafter
           \@ldds@\expandafter(\@Sanholder)}

 %% \dtX@(#1;#2) 
  \let\@lddtX@\dtX@
  \def\dtX@(#1){\@Sanitize{#1}\expandafter
           \@lddtX@\expandafter(\@Sanholder)}

 %% \dtX@(#1;#2) 
  \let\@lddtY@\dtY@
  \def\dtY@(#1){\@Sanitize{#1}\expandafter
           \@lddtY@\expandafter(\@Sanholder)}

 %%% A. Ranicki's erratum; second dollar restored
 \def\changewidth#1#2{\setbox\zer@\hbox{$\m@th#2$}% 
          \hbox to\wd\zer@{\hss$\m@th#1$\hss}}
 %% Who has other errata??

 \catcode`\;=\the\colonCt@
 \catcode`\@=13



\endinput