在以下 MWE 中(唉,它并不小):
\documentclass{article}
\usepackage{tkz-berge}
\textwidth16cm
\begin{document}
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
\SetGraphUnit{4}
\newbox{\BA}
\savebox{\BA}{%
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
%\GraphInit[vstyle=Empty]
\SetVertexNoLabel
\begin{scope}[rotate=90,yscale=0.577]
\grCycle[prefix=v,RA=1]{4}
\grCycle[prefix=w,RA=0]{4}
%\EdgeDoubleMod{w}{4}{0}{1}%
%{v}{4}{0}{1}{4}
\Edges(v1,v3)
\end{scope}
%\draw (a2) node[below]{\textsf{a label}};
\draw (v0) node[above]{$g$};
\end{tikzpicture}}
\newbox{\BB}
\savebox{\BB}{%
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
%\GraphInit[vstyle=Empty]
\SetVertexNoLabel
\begin{scope}[rotate=90,yscale=0.577]
\grCycle[prefix=v,RA=1]{4}
\grCycle[prefix=w,RA=0]{4}
\EdgeDoubleMod{w}{4}{0}{1}%
{v}{4}{0}{1}{4}
\end{scope}
%\draw (a2) node[below]{\textsf{a label}};
\draw (v0) node[above]{$g$};
\draw (v1) node[left]{$y_{i+1}$};
\draw (v3) node[right]{$y_{1}$};
\draw (v2) node[below]{$v_{i}$};
\end{tikzpicture}}
\newbox{\BC}
\savebox{\BC}{%
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
\SetVertexNoLabel
%\grEmptyPath[Math,prefix=p,RA=2,RS=0]{5}
%\grEmptyPath[Math,prefix=q,RA=2,RS=3]{5}
\grPath[Math,prefix=p,RA=1,RS=0]{3}
\begin{scope}[xshift=0.5 cm]
\grPath[Math,prefix=q,RA=1,RS=1]{3}
\end{scope}
\begin{scope}
\SetGraphUnit{1}
\NO(q1){rd}
\SO(p1){dol}
\end{scope}
\Edges(p0,q0,p1,q1,p2,q2,rd,q0)
\Edges(p1,dol)
\Edges(q1,rd)
\Edges(p0,dol,p2)
\draw (rd) node[above]{$g$};
\draw (dol) node[below]{$v_i$};
\draw (p0) node[left]{$y_{i+1}$};
\draw (p2) node[right]{$y_{i}$};
\draw (q0) node[left]{$x_{i+1}$};
\draw (q2) node[right]{$x_{i}$};
\end{tikzpicture}%
}
%[\Delta_5^1,d,D_5^1]$
%
%
\newbox{\BD}
\savebox{\BD}{%
\begin{tikzpicture}
\tikzset{VertexStyle/.style = {
shape = circle,
fill = black,
inner sep = 0pt,
outer sep = 0pt,
%minimum size = 8pt,
minimum size = 0pt,
draw}}
\SetVertexNoLabel
%\grEmptyPath[Math,prefix=p,RA=2,RS=0]{5}
%\grEmptyPath[Math,prefix=q,RA=2,RS=3]{5}
\grPath[Math,prefix=p,RA=1,RS=0]{2}
\begin{scope}[xshift=0.5 cm]
\grPath[Math,prefix=q,RA=1,RS=1]{2}
\grPath[Math,prefix=n,RA=1,RS=-1]{1}
\end{scope}
\begin{scope}[xshift=1 cm]
\grPath[Math,prefix=r,RA=1,RS=2]{1}
\end{scope}
\Edges(q1,r0,p0,p1,q0,q1,p1)
\Edges(p0,n0,p1)
\draw (r0) node[above]{$g$};
\draw (p0) node[left]{$y_{i+1}$};
\draw (p1) node[right]{$y_{i}$};
\draw (q0) node[left]{$x_{i+1}$};
\draw (q1) node[right]{$x_{i}$};
\draw (n0) node[below]{$v_{i}$};
\end{tikzpicture}%
}
%$[\Delta_6^0,d,D_6^0]$
%
%
\GraphInit[vstyle=Empty]
\Vertex[NoLabel]{Asr}
\WE[L=\usebox{\BA}](Asr){AA}
\NO[L=\usebox{\BB}](Asr){AB}
\EA[L=\usebox{\BC}](Asr){AC}
\SO[L=\usebox{\BD}](Asr){AD}
\SetUpEdge[style={->},labelstyle={above,xshift=-3mm,yshift=1mm}]
\Edges[label=$C_i$](AA,AB)
\SetUpEdge[style={->},labelstyle={above,xshift=3mm,yshift=1mm}]
\Edges[label=$A$](AA,AD)
\SetUpEdge[style={<-},labelstyle={above,xshift=3mm,yshift=1mm}]
\Edges[label=$A$](AC,AB)
\SetUpEdge[style={<-},labelstyle={above,xshift=-3mm,yshift=1mm}]
\Edges[label=$\bar{C_i}$](AC,AD)
\end{tikzpicture}
%\end{comment}
Fig. 8 b.
\end{document}
我有连接子图的不等箭头。是否有可能获得连接不同维度的子图的等箭头?箭头的长度至少应等于其上方有 $A$ 的箭头的长度。
答案1
对于平行和等长箭头,我通常会选择tikz-cd
:
% arara: pdflatex
\documentclass{article}
\usepackage{tkz-berge}
\setlength{\textwidth}{16cm} % maybe use the package `geometry` for such things. 16 cm do not fit in article...
\usepackage{tikz-cd}
\tikzset{%
,VertexStyle/.style = {%
,shape = circle
,inner sep = 0pt
,fill=black
,draw
}
}
\usepackage{blindtext}
\begin{document}
\begin{figure}
\centering
\begin{tikzcd}[%
,column sep={3cm,between origins}
,row sep={3cm,between origins}
,every arrow/.append style={%
,thick
,shorten >= 1.5cm
,shorten <= 1.5cm
,start anchor=center
,end anchor=center
}
]
& \begin{tikzpicture}
\SetVertexNoLabel
\begin{scope}[rotate=90,yscale=0.577]
\grCycle[prefix=v,RA=1]{4}
\grCycle[prefix=w,RA=0]{4}
\EdgeDoubleMod{w}{4}{0}{1}%
{v}{4}{0}{1}{4}
\end{scope}
\draw (v0) node[above]{$g$};
\draw (v1) node[left]{$y_{i+1}$};
\draw (v3) node[right]{$y_{1}$};
\draw (v2) node[below]{$v_{i}$};
\end{tikzpicture} \arrow{dr}{A} & \\
\begin{tikzpicture}
\SetVertexNoLabel
\begin{scope}[rotate=90,yscale=0.577]
\grCycle[prefix=v,RA=1]{4}
\grCycle[prefix=w,RA=0]{4}
\Edges(v1,v3)
\end{scope}
\draw (v0) node[above]{$g$};
\end{tikzpicture} \arrow{dr}{A}\arrow{ur}{C_i}
& &
\begin{tikzpicture}
\SetVertexNoLabel
\grPath[Math,prefix=p,RA=1,RS=0]{3}
\begin{scope}[xshift=0.5 cm]
\grPath[Math,prefix=q,RA=1,RS=1]{3}
\end{scope}
\begin{scope}
\SetGraphUnit{1}
\NO(q1){rd}
\SO(p1){dol}
\end{scope}
\Edges(p0,q0,p1,q1,p2,q2,rd,q0)
\Edges(p1,dol)
\Edges(q1,rd)
\Edges(p0,dol,p2)
\draw (rd) node[above]{$g$};
\draw (dol) node[below]{$v_i$};
\draw (p0) node[left]{$y_{i+1}$};
\draw (p2) node[right]{$y_{i}$};
\draw (q0) node[left]{$x_{i+1}$};
\draw (q2) node[right]{$x_{i}$};
\end{tikzpicture} \\
&
\begin{tikzpicture}
\SetVertexNoLabel
\grPath[Math,prefix=p,RA=1,RS=0]{2}
\begin{scope}[xshift=0.5 cm]
\grPath[Math,prefix=q,RA=1,RS=1]{2}
\grPath[Math,prefix=n,RA=1,RS=-1]{1}
\end{scope}
\begin{scope}[xshift=1 cm]
\grPath[Math,prefix=r,RA=1,RS=2]{1}
\end{scope}
\Edges(q1,r0,p0,p1,q0,q1,p1)
\Edges(p0,n0,p1)
\draw (r0) node[above]{$g$};
\draw (p0) node[left]{$y_{i+1}$};
\draw (p1) node[right]{$y_{i}$};
\draw (q0) node[left]{$x_{i+1}$};
\draw (q1) node[right]{$x_{i}$};
\draw (n0) node[below]{$v_{i}$};
\end{tikzpicture} \arrow{ur}{\bar{C_i}} &
\end{tikzcd}
\end{figure}
\blindtext
\end{document}
很难找到好看的东西,因为图形大小相差太大。您可能希望手动将添加shorten
到每个箭头。