1

I can write something like this:

\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}
\begin{document}
\[
\xymatrix{
    2 \times 2 \ar@/_2pc/[ddd]_{\txt{generalize}} \\ \\ \\
    \txt{$\Lambda N.\, \lambda$ $(\text{MUL} : N \to N \to N)$ \\
        $(\text{O} : N)$ \\
        $(\text{S} : N \to N).\,$ \\
        MUL (S (S O)) (S (S O))} \ar@/_2pc/[uuu]_{\txt{specialize}}
}
\]
\end{document}

and it looks like this:

rendering of LaTeX

I would like to left-align the text; I want to end up with something like this:

desired end result

which I could do by using \phantom if I could get \txt to be left-aligned here. How do I get left-alignment inside \txt in \xymatrix?

1

I would use a tabular; the trick is to use an additional pair of braces.

Instead of adding rows, it's better to act on the row spacing, as shown below.

\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}
\begin{document}

\[
\xymatrix@R+6pc{
  2 \times 2 \ar@/_2pc/[d]_{\txt{generalize}} \\
  \txt{{%
    \begin{tabular}[t]{@{}l@{ }l@{}}
    $\Lambda N.\, \lambda$ & $(\text{MUL} : N \to N \to N)$ \\
                           & $(\text{O} : N)$ \\
                           & $(\text{S} : N \to N).\,$ \\
    \multicolumn{2}{@{}c@{}}{MUL (S (S O)) (S (S O))}
    \end{tabular}%
  }} \ar@/_2pc/[u]_{\txt{specialize}}
}
\]

\end{document}

enter image description here

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.