1

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,

enter image description here

yields the correct diagram

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

This

enter image description here

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

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

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{equation}
\begin{CD}
A \\
@VVV \\
B
\end{CD}
\end{equation}

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

\end{document}

Strategy 2: es-noquoting

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

\begin{document}

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

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

\end{document}

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

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.