Graphics, Figures & Tablesproblem with diagrams

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dsmmbrd
Posts: 2
Joined: Sat Mar 27, 2010 9:42 pm

problem with diagrams

Post by dsmmbrd »

Hi! I am having problems with arrow labels on my diagrams.
They appear on the left of the diagram and not near arrows.
What am I doing wrong? Thanks.

Code: Select all

\documentclass[a4paper, 12pt]{article}
\usepackage{pb-diagram}
\begin{document}




\[ 
\begin{diagram}
	\node{A\otimes A\otimes A}	\arrow[2]{e, t}{m\otimes id} \arrow{s, l}{id \otimes m}
		\node[2]{A\otimes A} \arrow{s, r}{m} \\
	\node{A\otimes A} \arrow[2]{e, t}{m}
		\node[2]{A}
\end{diagram}
\]


\[ 
\begin{diagram}
	\node[2]{A\otimes A} \arrow[2]{s, r}{m} \\
	\node{k\otimes A} \arrow{ne, t}{u\otimes id} \arrow{se}
		\node[2]{A\otimes k} \arrow{nw, t}{id\otimes u} \arrow{sw} \\
	\node[2]{A}
\end{diagram}

\[ 
\begin{diagram}
	\node{C}	\arrow[2]{e, t}{\Delta} \arrow{s, l}{\Delta}
		\node[2]{C\otimes C} \arrow{s, r}{\Delta \otimes id} \\
	\node{C\otimes C} \arrow[2]{e, t}{id \otimes \Delta}
		\node[2]{C\otimes C\otimes C}
\end{diagram}
\]


 
\[ 
\begin{diagram}
	\node[2]{C} \arrow[2]{s, r}{\Delta} \arrow{se, t}{\otimes 1} \arrow{sw, t}{1\otimes} \\
	\node{k\otimes C}
		\node[2]{C\otimes k} \\
	\node[2]{C\otimes C} \arrow{nw, b}{\epsilon \otimes id} \arrow{ne, b}{id\otimes \epsilon}
\end{diagram}
\]


\end{document}
Last edited by dsmmbrd on Sat Mar 27, 2010 11:44 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

problem with diagrams

Post by torbjorn t. »

The spaces in the arrow specification, or what I should call it, seems to cause the problem. That is, in stead of

Code: Select all

\arrow[2]{e, t}
write

Code: Select all

\arrow[2]{e,t}
This compiles fine:

Code: Select all

\documentclass[a4paper, 12pt]{article}
\usepackage{pb-diagram}
\begin{document}


\[ 
\begin{diagram}
   \node{A\otimes A\otimes A}   \arrow[2]{e,t}{m\otimes id} \arrow{s,l}{id \otimes m}
      \node[2]{A\otimes A} \arrow{s,r}{m} \\
   \node{A\otimes A} \arrow[2]{e,t}{m}
      \node[2]{A}
\end{diagram}
\]


\[ 
\begin{diagram}
   \node[2]{A\otimes A} \arrow[2]{s,r}{m} \\
   \node{k\otimes A} \arrow{ne,t}{u\otimes id} \arrow{se}
      \node[2]{A\otimes k} \arrow{nw,t}{id\otimes u} \arrow{sw} \\
   \node[2]{A}
\end{diagram}
\]	
\[ 
\begin{diagram}
   \node{C}   \arrow[2]{e,t}{\Delta} \arrow{s,l}{\Delta}
      \node[2]{C\otimes C} \arrow{s,r}{\Delta \otimes id} \\
   \node{C\otimes C} \arrow[2]{e,t}{id \otimes \Delta}
      \node[2]{C\otimes C\otimes C}
\end{diagram}
\]



\[ 
\begin{diagram}
   \node[2]{C} \arrow[2]{s,r}{\Delta} \arrow{se,t}{\otimes 1} \arrow{sw,t}{1\otimes} \\
   \node{k\otimes C}
      \node[2]{C\otimes k} \\
   \node[2]{C\otimes C} \arrow{nw,b}{\epsilon \otimes id} \arrow{ne,b}{id\otimes \epsilon}
\end{diagram}
\]


\end{document}
dsmmbrd
Posts: 2
Joined: Sat Mar 27, 2010 9:42 pm

Re: problem with diagrams

Post by dsmmbrd »

Thaks a lot!
Post Reply