0

When I try to compile the following diagram

\xymatrix
{
A\ar[r]^{g}{\ar[d]_j} & B\ar[d]^{e}\\
X\ar[r]_{f} \ar[ur]^{\tilde g}& Y
}

the subscripts of the arrow labels are treated as the subscripts of A and X, but if I take out the diagonal arrow it compiles normally

\xymatrix
{
A\ar[r]^{g}{\ar[d]_j} & B\ar[d]^{e}\\
X\ar[r]_{f} & Y
}

Is this just me or a bug? How do I fix it?

Edit: here are pics of the compiled diagrams

no diagonal

enter image description here

diagonal

enter image description here

Edit 2: I just tried compiling the same thing in my Texclipse setup but it actually comes out the same way. So it's not an Anki problem.

6
  • 1
    Are you loading \usepackage[all]{xy}? It works here using TeXlive 2014.
    – Sigur
    Feb 24, 2015 at 17:57
  • 1
    Welcome to TeX.SX! Could you please post an image of your output? Feb 24, 2015 at 17:58
  • @Sigur yes I'm calling \usepackage[all]{xy} in the preamble Feb 25, 2015 at 19:14
  • What's Anki that you mention in a comment?
    – egreg
    Feb 25, 2015 at 19:19
  • The website gives a pretty good intro to it. It's a software that helps increase retention rate for learning. It allows compilation of latex into jpeg (I believe) so that mathematical knowledge can be gained efficiently with this method as well. For most cases, the implemented latex conversion system works, but for diagrams, for example, I can't do tikz-cd. Feb 25, 2015 at 22:02

1 Answer 1

1

Please provide an MWE as your problem is not reproducible for us. Your snippet works just fine as I am showing below. However, I provide a transcript to which is much more modern and maybe interesting for you.

% arara: pdflatex

\documentclass{article} 
\usepackage[all,cmtip]{xy}
\usepackage{tikz-cd}

\begin{document} 
\[\xymatrix{%
    A\ar[r]^{g}\ar[d]_j & B\ar[d]^{e}\\
    X\ar[r]_{f} \ar[ur]^{\tilde g} & Y
}\]
\[\begin{tikzcd}
    A\ar{r}{g}\ar{d}[swap]{j} & B\ar{d}{e} \\
    X\ar{r}[swap]{f}\ar{ur}{\tilde{g}} & Y
\end{tikzcd}\]
\end{document}

enter image description here

2
  • what is an MWE? To put this in context, I'm writing this snippet in Anki, which doesn't support tikz for some reason I'm forgetting. Feb 25, 2015 at 19:18
  • We often use the abbreviation minimal working example (MWE) for a compilable but small version of your document. If you can't use TikZ, you will have to tell me, what is wrong with my XY approach-
    – LaRiFaRi
    May 19, 2015 at 8:11

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.