2

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}:

\begin{align}
\matrix{
\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}
\end{align}

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

7
  • 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
4

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

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

\[
\begin{CD}
\mathscr{C} @>F>> \mathscr{D} \\
@VVV @VVV \\
\mathscr{C}\otimes A @>\textcolor{red}{F\otimes1}>> \mathscr{D}\otimes A
\end{CD}
\]

\end{document}
1
  • 1
    Thank you very much for nice answer – Masmath Mar 23 at 16:04
1

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

\documentclass[12pt]{article}

\usepackage[all,cmtip,color]{xy}
\usepackage{mathrsfs}
\usepackage{color}
\begin{document}

\xymatrix{
\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
  • 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.