I'm wanting to re-use notation used in a paper, but I'm having trouble formatting it in LaTeX. I'm trying to put a small (either a 2×2 or a 2×1 matrix) on top or to the right of an arrow.
I want something like this (but with matrices with parentheses instead of brackets):
I've tried typesetting the bottom row, and here is my attempt and the output:
\begin{displaymath}
\xymatrix{ G_{1} \oplus F_{2} \ar[r]^{\begin{psmallmatrix}- $\psi_{1}$ & 0 \\ g & \phi_2 \end{psmallmatrix}}
& F_{1} \oplus G_{2} \ar[r]^{\begin{psmallmatrix}- $\phi_{1}$ & 0 \\f & $\psi_2$ \end{psmallmatrix}} }
& $G_{1} \oplus F_{2}$ }
\end{displaymath}
I'm using the packages xy and mathtools.
Best Answer
You need to increase the row and column spacing. The first realization is more appealing to me, the second one is similar to the original picture.
The statement
@R+1pc
increases the row spacing by 1pc = 12pt; similarly@C+1pc
.With
tikz-cd
one needs to be careful when nesting arrays intikzcd
.The awkward (but safe) trick above can be avoided, still defining
\spmat
as in the Xy-pic case. The downside is that one needs to input thetikzcd
in a slightly different fashion (only when nested arrays are needed):