xymatrix 中的箭头未终止且源自中心

xymatrix 中的箭头未终止且源自中心

我正在尝试借助 xymatrix 包制作 $D_{5}$ 的凯莱图。但是箭头没有与物体中心对齐。有办法吗?

$$
\xymatrixrowsep{0.01in}
\xymatrixcolsep{0.02in}
\xymatrix{
& & & & \reflectbox{\includegraphics[scale=0.1, angle=0, origin=c]{figures/poly5.jpg}} \ar[ddllll] \ar@{<->}[dd]   \\
\\
\reflectbox{\includegraphics[scale=0.1, angle=72, origin=c]{figures/poly5.jpg}} \ar[dddddrr] \ar@{<->}[drr]  &  & &         & \includegraphics[scale=0.1, angle=0, origin=c]{figures/poly5.jpg}   \ar[dll]   & & & & \reflectbox{\includegraphics[scale=0.1, angle=288, origin=c]{figures/poly5.jpg}}   \ar[lllluu]    \ar@{<->}[lld]      \\
& &    \includegraphics[scale=0.1, angle=72, origin=c]{figures/poly5.jpg}   \ar[ddr]   &&          &&
    \includegraphics[scale=0.1, angle=288, origin=c]{figures/poly5.jpg} \ar[ull]             \\ \\
 & & &  \includegraphics[scale=0.1, angle=144, origin=c]{figures/poly5.jpg} \ar[rr]                                    &&  \includegraphics[scale=0.1, angle=216, origin=c ]{figures/poly5.jpg} \ar[uur] \\ \\
 & & \reflectbox{\includegraphics[scale=0.1, angle=144, origin=c]{figures/poly5.jpg}} \ar[rrrr] \ar@{<->}[ruu]  & & & & \reflectbox{\includegraphics[scale=0.1, angle=216, origin=c ]{figures/poly5.jpg}} \ar[rruuuuu] \ar@{<->}[luu]
}
$$

$D_{5}$ 的凯莱图

答案1

欢迎使用 TeX.SE!您只需将图形包装到 中\vcenter{\hbox{...}}。我没有您的jpg文件,因此在我的计算机上编译时输出看起来有点不同。;-)

\documentclass{article}
\usepackage[all]{xy}
\begin{document}
\[
\xymatrixrowsep{0.01in}
\xymatrixcolsep{0.02in}
\xymatrix{
& & & & \vcenter{\hbox{\reflectbox{\includegraphics[scale=0.1, angle=0,
origin=c]{figures/poly5.jpg}}}} \ar[ddllll] \ar@{<->}[dd]   \\
\\
\vcenter{\hbox{\reflectbox{\includegraphics[scale=0.1, angle=72,
origin=c]{figures/poly5.jpg}}}} \ar[dddddrr] \ar@{<->}[drr]  &  & &         &
\vcenter{\hbox{\includegraphics[scale=0.1, angle=0,
origin=c]{figures/poly5.jpg}}}   \ar[dll]   & & & &
\vcenter{\hbox{\reflectbox{\includegraphics[scale=0.1, angle=288,
origin=c]{figures/poly5.jpg}}}}   \ar[lllluu]    \ar@{<->}[lld]      \\
& &    \vcenter{\hbox{\includegraphics[scale=0.1, angle=72, origin=c]{figures/poly5.jpg}}}   \ar[ddr]   &&          &&
    \vcenter{\hbox{\includegraphics[scale=0.1, angle=288, origin=c]{figures/poly5.jpg}}} \ar[ull]             \\ \\
 & & & \vcenter{\hbox{\includegraphics[scale=0.1, angle=144,
origin=c]{figures/poly5.jpg}}} \ar[rr]                                    && 
\vcenter{\hbox{\includegraphics[scale=0.1, angle=216, origin=c ]{figures/poly5.jpg}}} \ar[uur] \\
\\
 & & \vcenter{\hbox{\reflectbox{\includegraphics[scale=0.1, angle=144,
origin=c]{figures/poly5.jpg}}}} \ar[rrrr] \ar@{<->}[ruu]  & & & &
\vcenter{\hbox{\reflectbox{\includegraphics[scale=0.1, angle=216, origin=c
]{figures/poly5.jpg}}}} \ar[rruuuuu] \ar@{<->}[luu]
}
\]
\end{document}

在此处输入图片描述

但是,我不会用xy-matrix它。有了 TiZ 您可以将多边形排列成多边形形状。

\documentclass[border=3.14mm,tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\newsavebox\Poly
\sbox\Poly{\tikz{\node[draw,minimum size=3.14cm,regular polygon,regular polygon sides=5,fill=cyan!30]
(poly){};
\foreach \X [count=\Y] in {blue,red,yellow,black,green!60!black}
{\draw[fill=\X] (poly.corner \Y) circle(1mm);}}}
\begin{document}
\begin{tikzpicture}
\node[minimum size=10cm,regular polygon,regular polygon sides=5]
(outer poly){};
\node[minimum size=6cm,regular polygon,regular polygon sides=5]
(inner poly){};
\foreach \X in {1,...,5}
{\node[scale=0.3,rotate={72*(1-\X)},inner sep=0pt] (outer-\X) at (outer poly.corner \X) {\usebox\Poly};
\node[scale=0.3,rotate={72*(1-\X)},xscale=-1,inner sep=0pt] (inner-\X) at (inner poly.corner \X) {\usebox\Poly};
}
\foreach \X [evaluate=\X as \Y using {int(1+mod(\X+3,5))}]in {1,...,5}
{\draw[-latex] (outer-\Y) -- (outer-\X);
\draw[-latex] (inner-\X) -- (inner-\Y);
\draw[latex-latex] (inner-\X) -- (outer-\X); }
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容