6

Within the statement of a theorem, I have two commutative diagrams. I am trying to use pb-diagram to create them and I would like them to be side by side. Unfortunately the size of the commutative diagrams seem to depend on the size of the symbols at the nodes, and the two commutative diagrams come out to be different sizes. Is there any way to fix this?

Here is the code I have right now:

\documentclass[12pt]{amsart}
\usepackage[arrow,matrix,curve,cmtip,ps]{xy}
\usepackage{pb-diagram} 
\usepackage{pb-xy}
\usepackage{amsmath,amsthm,amssymb}
\begin{document}
\begin{equation}
\begin{diagram}
\node{\mathcal{C}_R}\arrow{e,t}{P}\arrow{s,l,J}{\Psi}\node {\mathcal{C}_R}\arrow{s,l,J}{\Psi}\\
\node{\widehat{\mathcal{C}}_R}\arrow{e,t}{E(P)}\node{\widehat{\mathcal{C}}_R}
\end{diagram}\hspace{40pt}
\begin{diagram}
\node{\mathcal{C}_{R,\,\operatorname{top}}}\arrow{e,t}{P}\arrow{s,l,J}{\Psi}\node {\mathcal{C}_{R,\,\operatorname{top}}}\arrow{s,l,J}{\Psi}\\
\node{\widehat{\mathcal{C}}_{R,\,\operatorname{top}}}\arrow{e,t}{E(P)}\node{\widehat{\mathcal{C}}_{R,\,\operatorname{top}}}
\end{diagram}
\end{equation}
\end{document}

and here is the result of compiling:

enter image description here

Moriambar
  • 11,466
Aru Ray
  • 173

2 Answers2

10

I don't know how to do with pb-diagram, which is a very old package. A more modern one, and more powerful too, is tikz-cd:

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{pb-diagram}
\newcommand{\C}{\mathcal{C}}
\newcommand{\Chat}{\hat{\C}}
\renewcommand{\top}{\mathrm{top}}
\begin{document}
\begin{equation}
\begin{tikzcd}
\C_R \arrow{r}{P} \arrow[hookrightarrow,swap]{d}{\Psi} &
\C_R \arrow[hookrightarrow,swap]{d}{\Psi}\\
\Chat_R \arrow{r}{E(P)} & \Chat_R
\end{tikzcd}\hspace{40pt}%
\begin{tikzcd}
\C_{R\smash{,\,\top}} \arrow{r}{P} \arrow[hookrightarrow,swap]{d}{\Psi} &
\C_{R\smash{,\,\top}} \arrow[hookrightarrow,swap]{d}{\Psi}\\
\Chat_{R\smash{,\,\top}} \arrow{r}{E(P)} & \Chat_{R\smash{,\,\top}}
\end{tikzcd}
\end{equation}
\end{document}

It's necessary to "smash" the comma and the word "top", because they have descenders that would make the second diagram a bit larger.

enter image description here

David Carlisle
  • 757,742
egreg
  • 1,121,712
3

As you are using xy-pic, it can alone draw commutative diagrams.

Code:

\documentclass[12pt]{amsart}
\usepackage[all]{xy}
\begin{document}
\[
\xymatrix{
& \mathcal{C}_R \ar@{^{(}->}[d]_{\Psi} \ar[r]^P & \mathcal{C}_R \ar@{^{(}->}[d]_{\Psi}\\ 
& \widehat{\mathcal{C}}_R \ar[r]^{E(P)} & \widehat{\mathcal{C}}_R }

\xymatrix{
& \mathcal{C}_{R,\,\mathrm{top}} \ar@{^{(}->}[d]_{\Psi} \ar[r]^P 
& \mathcal{C}_{R,\,\mathrm{top}} \ar@{^{(}->}[d]_{\Psi} \\ 
& \widehat{\mathcal{C}}_{R,\,\mathrm{top}} \ar[r]^{E(P)} 
& \widehat{\mathcal{C}}_{R,\,\mathrm{top}} }
\end{document}

Output:

enter image description here