0

I would like to create a lozenge diagram with the package \xymatrix. Here is the code I wrote :

\[\xymatrix{
  & M\ar@{-}[ld]^{n}_{G} \ar@{-}[rd]^{m^2}& \\
  H\ar@{-}[rd]^{m^2} && Z(M)\ar@{-}[ld]^{n}_{G} \\
  & K& \\
  }\]

And here is the result.

result

I would like to know how to make it more beautiful : it looks like that the right part of the lozenge is longer than the left part. Thank you for your help !

Emilie
  • 19

1 Answers1

0

I suggest to use tikz-cd and to make the two objects in the middle row the same width.

\documentclass{article}
\usepackage{amsmath,mathtools}
\usepackage{tikz-cd}

\begin{document}

[ \begin{tikzcd}[arrows=dash] & M \arrow[ld,"G"',"n"] \arrow[rd,"m^2"] \ \mathmakebox[0.5em][r]{H} \arrow[rd,"m^2"] && \mathmakebox[0.5em][l]{Z(M)} \arrow[ld,"G"',"n"] \ & K \end{tikzcd} ]

\end{document}

enter image description here

A similar trick almost works with Xy-pic.

\[
\xymatrix{
  & M\ar@{-}[ld]^{n}_{G} \ar@{-}[rd]^{m^2}& \\
  \mathmakebox[0.5em][r]{H} \ar@{-}[rd]^{m^2} &&
  \mathmakebox[0.5em][l]{Z(M)} \ar@{-}[ld]^{n}_{G} \\
  & K& \\
}
\]

enter image description here

egreg
  • 1,121,712