[Tex/LaTex] Circling/Framing part of one entry in xymatrix

xy-pic

I want to circle ONLY part of an entry in xymatrix, I have skimmed through several references for xypic but only able to find how I can frame the whole entry (e.g. the one in first and third row in the diagram below) and did not mention how I could do it locally. Say in the example below, I want to frame only the y in second arrow but keep x and z displayed. If I use the following code, the x and z in the second entry of the second row just disappeared. Any idea?

\documentclass{minimal}
\usepackage{amsmath,amssymb}
\usepackage[all]{xy}
\begin{document}
\[\xymatrix{
 x & *+[Fo]{z} \ar[l]\ar[d] & z\ar[l] & \cdots\ar[l]\\
 z & *+[Fo]{y},x,z \ar[l]\ar[d] & \cdots \ar[l]\\
   & *+[Fo]{y} & \cdots\ar[l]
}\]
\end{document}

Best Answer

You can put the framed y inside a \xybox and then compose it with the ,x,z into the complete object. Together with height adjustment this will look like

\documentclass{standalone}
\usepackage{amsmath,amssymb}
\usepackage[all]{xy}
\begin{document}
\[\xymatrix{
 x & *+[Fo]{z} \ar[l]\ar[d] & z\ar[l] & \cdots\ar[l]\\
 z & \xybox{(0,0.5)*+[Fo]{y}},x,z \ar[l]\ar[d] & \cdots \ar[l]\\
   & *+[Fo]{y} & \cdots\ar[l]
}\]
\end{document}

resulting diagram

Although if you would want the circled y aligned with the other circled characters, you should probably ask another question about that. (I don't know right now how to do it.)

Please note that you shouldn't use the minimal class. Better take standalone for MWEs. See for example Why should the minimal class be avoided? and What is the advantage of using minimal over article when creating a standalone graphic?.

Related Question