I am using the following code in my latex editor but is saying package ams error: old form '\matrix' should be \begin{matrix} \end{align}:

\mathscr{C} & \overset{F}{ \longrightarrow} & \mathscr{D} 
\cr  \downarrow  && \downarrow 
\cr \mathscr{C} \otimes A & \overset{{\color{red}{F \otimes 1}}}{\longrightarrow} & \mathscr{D} \otimes A}

enter image description here

But if remove \matrix{}, then it is perfectly running but in that case the figure is not perfect as above.

Any solution or package that solve the above problem ?

Please don'tsuggest Tikz-GD because it is not installed in MikTex in my folder

  • I got it. Using \begin{matrix}...\end{matrix}, the problem solved. But how to increase arrow sizes ? – Masmath Feb 2 at 13:10
  • 1
    Then why don't you just ask miktex to install tikz-cd for you? It is worth it. – daleif Feb 2 at 13:44
  • note it is tikz-cd and it is in miktex (and texlive) not Tikz-GD – David Carlisle Feb 2 at 14:36
  • Masmath Hi, no no, please. Can you regiven/switch the green check mark to @Mico? Thank you very much for this. – Sebastiano Mar 18 at 21:44
  • 1
    @Sebastiano, ok, if you insist I did it. Thanks – Masmath Mar 24 at 5:32

You could employ the amscd package, which is part of the amsmath bundle, to achieve your typesetting objective. See section 8, "Commutative diagrams", of the user guide of the amsmath package for a tutorial on this package.

enter image description here

\usepackage{amscd}    % for 'CD' ("commutative diagram") environment
\usepackage{mathrsfs} % for '\mathsrc' directive
\usepackage{xcolor}   % for '\textcolor' directive

\mathscr{C} @>F>> \mathscr{D} \\
@VVV @VVV \\
\mathscr{C}\otimes A @>\textcolor{red}{F\otimes1}>> \mathscr{D}\otimes A

  • 1
    Thank you very much for nice answer – Masmath Mar 23 at 16:04

Also with xy package you can obtained the same result of amscd package (they are similar).



\mathscr{C} \ar[d] \ar[r]^F & \mathscr{D} \ar[d] \\
\mathscr{C}\otimes A \ar[r]^{\color{red}{F\otimes 1}} & \mathscr{D}\otimes A }

enter image description here

  • 1
    Thank you very much – Masmath Mar 18 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.