0

I need to put up a commutative diagram in my latex document but unfortunately I could not find any package which could do that.

I am putting up the diagram in an image below, please take a look.

enter image description here

Thank you for your help :)

6

1 Answer 1

1

Here is a solution with the psmatrix environment from pst-node (pstricks family)

\documentclass{article}
\usepackage{mathtools, amsfonts, amssymb}

\usepackage{pstricks-add}
\usepackage{pst-pdf}

\begin{document}

\[ \begin{postscript}
  \psset{arrows=->, arrowinset=0.15, linewidth=0.6pt, dash=4pt 3pt, nodesep=2pt, labelsep=2pt, colsep=1cm, rowsep=1cm, emnode=R, npos=0.5}
  \begin{psmatrix}
    [name=DF] $ \mathcal{DF}_{\!H_a} $ & &[name=M]$ (\mathcal{M},\bar{\partial}) $\\[-1.5ex]
      & [name=PF] $ \mathcal{PF}_{\!\widetilde{H}_{a}} $ \\
      & $ \mathcal F $
      \everymath{\scriptstyle}
      \ncline[linestyle=dashed, nodesep=4pt]{DF}{M}\naput{$ \varphi $}
      \ncline[arrows=H->, nodesep=1pt,]{2,2}{1,1}\naput[ labelsep= -1pt]{$ i_\mathcal{D} $}%
      \ncline[arrows=H->, hookwidth=-2mm, nodesepA=-1pt]{2,2}{1,3}\nbput[labelsep= 0pt]{$ i_{\mkern-2mu\mathcal{M}} $}%
      \ncline{3,2}{1,1}\naput[labelsep=-2pt]{$ u_{\mathcal{D}} $ }
      \ncline{3,2}{1,3}\nbput{$ u_{\mkern-2mu\mathcal{M}} $}
      \nput[labelsep=18pt]{90}{PF}{\psarcn(0,0){0.25}{-40}{40}}
    \end{psmatrix}
      \everymath{\scriptstyle}
      \ncline[linestyle=dashed, nodesep=4pt]{DF}{M}^{$ \varphi $}
      \ncline[arrows=H->, hookwidth=1.5mm, nodesep=1pt,]{2,2}{1,1}\naput[ labelsep= -1pt]{$ i_\mathcal{D} $}%
      \ncline[arrows=H->, hookwidth=-1.5mm, nodesepA=-1pt, ]{2,2}{1,3}\nbput[labelsep= 0pt]{$ i_{\mkern-2mu\mathcal{M}} $}%
      \ncline{3,2}{1,1}\naput[labelsep=-2pt]{$ u_{\mathcal{D}} $ }
      \ncline{3,2}{1,3}\nbput{$ u_{\mkern-2mu\mathcal{M}} $}
      \nput[labelsep=18pt]{90}{PF}{\psarcn(0,0){0.25}{-40}{40}}
    \end{postscript} \]

\end{document} 

enter image description here

23
  • If you compile this with pdflatex (as should be) don't forget to add the --enable-write18 switch when launching the compiler, if you're under MiKTeX, or -shell-escape (TeX Live, MacTeX).
    – Bernard
    Mar 11, 2016 at 12:35
  • Thanks again, I'll let you know if any other problem arises once I try this.
    – schzan
    Mar 11, 2016 at 12:40
  • Hi @Bernard, I tried to add the switch using this link <tex.stackexchange.com/questions/37489/…> but unfortunately, it doesn's recognise "intitexmf" command. Could you please tell me how to add this switch. I am using Texmaker 4.0.1 on windows 7 enterprise.
    – schzan
    Mar 14, 2016 at 16:22
  • Which system and distribution do you have?
    – Bernard
    Mar 14, 2016 at 21:00
  • I am using Texmaker 4.0.1(compiled with Qt 5.0.1) on windows 7 enterprise (2009).
    – schzan
    Mar 16, 2016 at 16:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.