# Problem with amscd package

I'm trying to insert a commutative diagram into a report. I've loaded the amscd package, but I have a problem with its diagrams.

When I put up or down arrows, there are no problems. For example,

yields the correct diagram

But when I try to use left or right arrows it doesn't work.

This

only gives an isolated A in the left of the document. What am I doing wrong?

• Welcome to TeX.SX! I get the expected output. Please try adding a minimal example. Are you perhaps using babel? With which language? – egreg Apr 6 '16 at 21:06
• Welcome to TeX SX: amscd is outdated and gives a not so good spacing in commutative diagrams. You should use the more recent tikz-cd instead – Bernard Apr 6 '16 at 21:06
• I was using babel in Spanish btw – SupremoUGH Apr 6 '16 at 21:12

## 1 Answer

The CD environment can't work with babel-spanish without some countermeasures.

## Strategy 1: \shorthandoff

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amscd}

\begin{document}

$$\begin{CD} A \\ @VVV \\ B \end{CD}$$

$$\shorthandoff{<>} \begin{CD} A @>>> B \end{CD}$$

\end{document}


## Strategy 2: es-noquoting

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{amsmath,amscd}

\begin{document}

$$\begin{CD} A \\ @VVV \\ B \end{CD}$$

$$\begin{CD} A @>>> B \end{CD}$$

\end{document}


Consult the documentation of spanish-babel available with texdoc spanish or on line