1
\documentclass{article}
\usepackage[cmtip,all,barr]{xy}
\begin{document}

This is a simplified diagram of data flow for LISTSERV. Note that for 
IBM-MAIN the gateway to news is one way; replies to the group do not
propagate to LISTSERV.

\begin{figure}
\[
\bfig
\node browser(0,0)[    \textrm{User web browser}]
\node listserv(0,-500)[    \textrm{LISTSERV}]
\node usenet(1000,-500)[    \textrm{News server}]
\node news(2000,-500)[    \textrm{User news agent}]
\node smtp(0,-1000)[    \textrm{Mail gateway}]
\node imap(-1000,-1500)[    \textrm{IMAP4 server}]
\node user(0,-1500)[    \textrm{User mail agent}]
\node pop(1000,-1500)[    \textrm{POP3 server}]
\arrow |r|/{<-}>/[browser`listserv;HTTP]
%\arrow/{<->}/ |r|[browser`listserv;HTTP]
\arrow |r|[listserv`usenet;NNTP]
\arrow |r|[usenet`news;NNTP]
%\arrow/<->/ |r|[usenet`news;NNTP]
%\arrow/<->/ |r|[listserv`smtp;SMTP]
\arrow |r|[listserv`smtp;SMTP]
%\arrow |r|[smtp`imap]
%\arrow |r|[smtp`pop]
\arrow |a|[imap`user;IMAP4]
\arrow |r|[pop`user;POP3]
%\arrow |r|[user`SMTP]
\efig
\]
\end{figure}
\end{document}

I tried putting braces around the <-> but still got error messages, e.g.,

Runaway argument?
<->/ |r|[listserv`smtp;SMTP] \arrow |r|[listserv`smtp;SMTP] \arrow |a\ETC.
! File ended while scanning use of \arrowpp.
<inserted text> 
                \par 
<*> E:/temp/LaTeX/listserv.tex
1

This is not a direct answer, but I feel that you are not using the optimal tool for that. However, the syntax is very similar to the one of TikZ. So I just tried to translate your code to TikZ and also add a more TikZy version of the figure. And please forgive me if some arrows do not come with the heads you had in mind, but it will be straight forward to fix that. The first part of the code contains a dictionary between xy and TikZ, your original code is behind the %.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
%\usepackage[cmtip,all,barr]{xy}
\begin{document}

This is a simplified diagram of data flow for LISTSERV. Note that for 
IBM-MAIN the gateway to news is one way; replies to the group do not
propagate to LISTSERV.

\begin{figure}
\begin{center} %\[
\begin{tikzpicture}[scale=0.35,thick,>=latex] %\bfig
\node (browser) at (0,0) {User web browser};%\node browser(0,0)[    \textrm{User web browser}]
\node (listserv) at (0,-5) {LISTSERV}; %\node listserv(0,-500)[    \textrm{LISTSERV}]
\node (usenet) at (10,-5) {News server}; %\node usenet(1000,-500)[    \textrm{News server}]
\node (news) at (20,-5) {User news agent}; % \node news(2000,-500)[    \textrm{User news agent}]
\node (smtp) at (0,-10) {Mail gateway}; %\node smtp(0,-1000)[    \textrm{Mail gateway}]
\node (imap) at (-12,-15) {IMAP4 server}; % \node imap(-1000,-1500)[    \textrm{IMAP4 server}]
\node (user) at (0,-15) {User mail agent}; % \node user(0,-1500)[    \textrm{User mail agent}]
\node (pop) at (10,-15) {POP3 server}; % \node pop(1000,-1500)[    \textrm{POP3 server}]
\draw[<-] (browser) -- (listserv) node[midway,right]{HTTP}; %\arrow |r|/{<-}>/[browser`listserv;HTTP]
%\arrow/{<->}/ |r|[browser`listserv;HTTP]
\draw[->] (listserv) -- (usenet) node[midway,below]{NNTP}; % \arrow |r|[listserv`usenet;NNTP]
\draw[<->] (usenet) --(news) node[midway,below]{NNTP}; % \arrow |r|[usenet`news;NNTP]
%\arrow/<->/ |r|[usenet`news;NNTP]
%\arrow/<->/ |r|[listserv`smtp;SMTP]
\draw[<->] (listserv)--(smtp) node[midway,right] {SMTP}; % \arrow |r|[listserv`smtp;SMTP]
%\arrow |r|[smtp`imap]
%\arrow |r|[smtp`pop]
\draw[->] (imap) -- (user) node[midway,above]{IMAP4}; % \arrow |a|[imap`user;IMAP4]
\draw[->] (pop) -- (user) node[midway,above]{POP3}; % \arrow |r|[pop`user;POP3]
\draw[->] (user) -- (smtp);%\arrow |r|[user`SMTP]
\end{tikzpicture} %\efig
\end{center}%\]
\caption{A Ti\emph{k}Z version of your figure.}\label{fig:1}
\end{figure}

\begin{figure}
\begin{center} 
\begin{tikzpicture}[node distance=1.6cm,thick,>=latex] 
\node (browser) at (0,0) {User web browser};
\node[below=of browser] (listserv) {LISTSERV}; 
\node[right=of listserv] (usenet) {News server};
\node[right=of usenet] (news) {User news agent}; 
\node[below=of listserv] (smtp) {Mail gateway}; 
\node[below=of smtp] (user)  {User mail agent}; 
\node[left=of user] (imap) {IMAP4 server}; 
\node[right=of user] (pop) {POP3 server}; 
\draw[<-] (browser) -- (listserv) node[midway,right]{HTTP}; 
\draw[->] (listserv) -- (usenet) node[midway,below]{NNTP}; 
\draw[<->] (usenet) --(news) node[midway,below]{NNTP}; 
\draw[<->] (listserv)--(smtp) node[midway,right] {SMTP}; 
\draw[->] (imap) -- (user) node[midway,above]{IMAP4}; 
\draw[->] (pop) -- (user) node[midway,above]{POP3}; 
\draw[->] (user) -- (smtp);
\end{tikzpicture}
\end{center}
\caption{A more Ti\emph{k}Zy version of figure~\ref{fig:1}.}
\end{figure}
\end{document}

enter image description here

  • I'm sometimes required to use a specific package, so I'd really like to know what the problem is with my xy markup. If I did it in TikZ I'd probably use tikz-cd. – shmuel Mar 13 '18 at 18:44
0

The problem turns out to be a syntax error on the arrows; I had the label placement and the shape in the wrong order. This works:

\documentclass{article}
\usepackage[cmtip,all,barr]{xy}
\begin{document}

This is a simplified diagram of data flow for LISTSERV. Note that for
IBM-MAIN the gateway to news is one way; replies to the group do not
propagate to LISTSERV.

\begin{figure}
\[
\bfig
\node browser(0,0)[\textrm{User web browser}]
\node listserv(0,-500)[\textrm{LISTSERV}]
\node usenet(1000,-500)[\textrm{News server}]
\node news(2000,-500)[\textrm{User news agent}]
\node smtp(0,-1000)[\textrm{Mail gateway}]
\node imap(-1000,-1500)[\textrm{IMAP4 server}]
\node user(0,-1500)[\textrm{User mail agent}]
\node pop(1000,-1500)[\textrm{POP3 server}]
\arrow |r|/{<->}/[browser`listserv;HTTP]
\arrow |r|[listserv`usenet;NNTP]
\arrow |r|[usenet`news;NNTP]
\arrow |r|/<->/[usenet`news;NNTP]
\arrow |r|/<->/[listserv`smtp;SMTP]
\arrow |r|[smtp`imap;]
\arrow |r|[smtp`pop;]
\arrow |a|[imap`user;IMAP4]
\arrow |r|[pop`user;\textrm{POP3}]
\arrow |r|[user`smtp;\textrm{SMTP}]
\efig
\]
\end{figure}
\end{document}

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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