我bent arrows
在下图中画了四个。来自标记为a
、a+1
和的顶点的那些a+2
看起来都与它们的标签距离相同。我人为地a+3
在省略号下排版了一个节点。(在实际的图中,这个节点将被删除。)我希望最后一个弯曲箭头的南边距离与a+3
其他弯曲箭头在其标签下方的距离相同。我不知道我的代码没有这样做的原因。
\documentclass[10pt]{amsart}
\usepackage{amssymb}
\usepackage{mathtools,array}
\usepackage{tikz}
\usetikzlibrary{calc,intersections,arrows.meta,bending}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}
\begin{document}
\centerline{\Large{\textbf{\textit{a}-Labels and Mediants for a Simple Graph}}} \vskip0.3in
\noindent \hspace*{\fill}
\begin{tikzpicture}[nodes={inner sep=0, font=\scriptsize,
execute at begin node={\setlength\abovedisplayskip{0.75ex}%
\setlength\belowdisplayskip{0.5ex}%
\setlength\abovedisplayshortskip{0.75ex}%
\setlength\belowdisplayshortskip{0.5ex}}},
shorten/.style={shorten >=#1,shorten <=#1},
pics/fpic/.style={code={#1}}, x=1.5cm, y=1.5cm]
%A sequence of graphs is drawn, starting with the vertex with the b-label b.
\matrix[row sep=4.5em]{%<--- This defines the difference between pictures.
%Here is the blow-up of the vertex labeled b.
\pic{fpic={%
\draw[fill] (-4,0) circle (1.5pt);
\node[anchor=north] (label_for_Vertex_a) at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
}};\\
%
%
\pic{fpic={%
\draw (-4,0) -- (-2,0) coordinate(lcompare);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
%
\node[anchor=north] (bcompare) at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_a) at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] (label_for_Vertex_a+1) at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
}}; \\
%
%
\pic{fpic={%
%Here is the blow-up of the vertex labeled b-1.
\draw (-4,0) -- (-2,0) -- (0,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_a+1) at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] (label_for_Vertex_a+2) at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
}}; \\
%
%
\pic{fpic={
%Here is the blow-up of the vertex labeled b-n.
\draw (-4,0) -- (-2,0) -- (0,0) (2,0) -- (5,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
\node (first_ellipses) at (1,0){$\ldots$};
\coordinate (tail_for_bent_arrow_below_first_ellipses) at ($(first_ellipses) +(0,-0.25)$);
\draw[fill] (2,0) circle (1.5pt);
\draw[fill] (5,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=south] (label_for_phantom_Farey_Fraction_at_ellipses) at ($(1,0) +(0,0.25)$){\hphantom{$\dfrac{1}{1}$}};
\coordinate (point_just_above_node_containing_phantom_Farey_Fraction) at ($(label_for_phantom_Farey_Fraction_at_ellipses.north) +(0,0.1)$);
%
\node[anchor=north] at ($(2,0) +(0,-0.25)$){$a+n$};
\node[anchor=south] at ($(2,0) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,0) +(0,-0.25)$){$a+(n+1)$};
\node[anchor=south] at ($(5,0) +(0,0.25)$){$\dfrac{n+1}{1}$};
%
%
}}; \\
\pic{fpic={
%Here is the vertex placed at the broken edge.
\draw (-4,0) -- (-2,0) -- (0,0) (2,0) -- (5,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
\node (second_ellipses) at (1,0){$\ldots$};
\coordinate (head_for_bent_arrow_above_second_ellipses) at ($(second_ellipses) +(0,0.75)$);
\draw[fill] (2,0) circle (1.5pt);
\draw[fill] ({(2+5)/2},0) circle (1.5pt);
\draw[fill] (5,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=north] at ($(2,0) +(0,-0.25)$){\textit{$a+n$}};
\node[anchor=south] at ($(2,0) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,0) +(0,-0.25)$){$a+(n+1)$};
\node[anchor=south] at ($(5,0) +(0,0.25)$){$\dfrac{n+1}{1}$};
%
%A "pin" is drawn between the midpoint of the edge between the last two vertices and its label.
\draw[draw=gray, line width=0.8pt, shorten <=1mm, shorten >=1mm] ({(2+5)/2},0) -- ({(2+5)/2},-1);
\node[anchor=north] at ({(2+5)/2},-1){$2a+(2n+1)$};
\node[anchor=south] (f2n) at ($({(2+5)/2},0) +(0,0.25)$){$\dfrac{2n+1}{2}$};
}};\\
};
%
%
%
%
%Arrows are drawn between the diagrams.
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a) to[bend right=30] node[midway, right=1.5mm, align=center]
{Blow-up of\\vertex \textit{b}} (label_for_Farey_Fraction_at_Vertex_a);
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a+1) to[bend right=30] node[midway, right=1.5mm, align=center]
{Blow-up of\\vertex $b - 1$} (label_for_Farey_Fraction_at_Vertex_a+1);
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a+2) to[bend right=30] node[pos=1/3, right=1.5mm, align=center]
{Blow-up of more\\\hphantom{\ }vertices} (point_just_above_node_containing_phantom_Farey_Fraction);
%
\coordinate (label_for_ellipses) at ($(first_ellipses) +(0,-0.25)$);
\node[green, anchor=north] at (label_for_ellipses){$a + 3$};
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_ellipses) to[bend right=30]
(head_for_bent_arrow_above_second_ellipses);
%
%
\node[draw, text width=0.25\linewidth,inner sep=2mm,align=left, below left=5mm] at (current bounding box.north east)
{In each step of the expanding simple graphs,
the vertices are labeled with a fraction and
an \textit{a}-label. The fraction is a Farey
Fraction; it is typeset above each vertex.};
\end{tikzpicture}
\hspace{\fill}
\end{document}
答案1
距离不同,因为最后一支弯曲的箭头连接到协调而其他节点则通过非平凡的inner sep
(和outer sep
)连接到节点。纠正此问题最简单的方法可能是为节点也命名,并在弧路径中使用它(而不是坐标):
\coordinate (label_for_ellipses) at ($(first_ellipses) +(0,-0.25)$);
\node[green, anchor=north] (label_for_ellipses-node) at (label_for_ellipses){$a + 3$};
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_ellipses-node) to[bend right=30]
(head_for_bent_arrow_above_second_ellipses);
完整 MWE:
\documentclass[10pt]{amsart}
\usepackage{amssymb}
\usepackage{mathtools,array}
\usepackage{tikz}
\usetikzlibrary{calc,intersections,arrows.meta,bending}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}
\begin{document}
\centerline{\Large{\textbf{\textit{a}-Labels and Mediants for a Simple Graph}}} \vskip0.3in
\noindent \hspace*{\fill}
\begin{tikzpicture}[nodes={inner sep=0, font=\scriptsize,
execute at begin node={\setlength\abovedisplayskip{0.75ex}%
\setlength\belowdisplayskip{0.5ex}%
\setlength\abovedisplayshortskip{0.75ex}%
\setlength\belowdisplayshortskip{0.5ex}}},
shorten/.style={shorten >=#1,shorten <=#1},
pics/fpic/.style={code={#1}}, x=1.5cm, y=1.5cm]
%A sequence of graphs is drawn, starting with the vertex with the b-label b.
\matrix[row sep=4.5em]{%<--- This defines the difference between pictures.
%Here is the blow-up of the vertex labeled b.
\pic{fpic={%
\draw[fill] (-4,0) circle (1.5pt);
\node[anchor=north] (label_for_Vertex_a) at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
}};\\
%
%
\pic{fpic={%
\draw (-4,0) -- (-2,0) coordinate(lcompare);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
%
\node[anchor=north] (bcompare) at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_a) at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] (label_for_Vertex_a+1) at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
}}; \\
%
%
\pic{fpic={%
%Here is the blow-up of the vertex labeled b-1.
\draw (-4,0) -- (-2,0) -- (0,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_a+1) at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] (label_for_Vertex_a+2) at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
}}; \\
%
%
\pic{fpic={
%Here is the blow-up of the vertex labeled b-n.
\draw (-4,0) -- (-2,0) -- (0,0) (2,0) -- (5,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
\node (first_ellipses) at (1,0){$\ldots$};
\coordinate (tail_for_bent_arrow_below_first_ellipses) at ($(first_ellipses) +(0,-0.25)$);
\draw[fill] (2,0) circle (1.5pt);
\draw[fill] (5,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=south] (label_for_phantom_Farey_Fraction_at_ellipses) at ($(1,0) +(0,0.25)$){\hphantom{$\dfrac{1}{1}$}};
\coordinate (point_just_above_node_containing_phantom_Farey_Fraction) at ($(label_for_phantom_Farey_Fraction_at_ellipses.north) +(0,0.1)$);
%
\node[anchor=north] at ($(2,0) +(0,-0.25)$){$a+n$};
\node[anchor=south] at ($(2,0) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,0) +(0,-0.25)$){$a+(n+1)$};
\node[anchor=south] at ($(5,0) +(0,0.25)$){$\dfrac{n+1}{1}$};
%
%
}}; \\
\pic{fpic={
%Here is the vertex placed at the broken edge.
\draw (-4,0) -- (-2,0) -- (0,0) (2,0) -- (5,0);
\draw[fill] (-4,0) circle (1.5pt);
\draw[fill] (-2,0) circle (1.5pt);
\draw[fill] (0,0) circle (1.5pt);
\node (second_ellipses) at (1,0){$\ldots$};
\coordinate (head_for_bent_arrow_above_second_ellipses) at ($(second_ellipses) +(0,0.75)$);
\draw[fill] (2,0) circle (1.5pt);
\draw[fill] ({(2+5)/2},0) circle (1.5pt);
\draw[fill] (5,0) circle (1.5pt);
%
\node[anchor=north] at ($(-4,0) +(0,-0.25)$){\textit{a}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,0) +(0,-0.25)$){$a+1$};
\node[anchor=south] at ($(-2,0) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,0) +(0,-0.25)$){$a+2$};
\node[anchor=south] at ($(0,0) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=north] at ($(2,0) +(0,-0.25)$){\textit{$a+n$}};
\node[anchor=south] at ($(2,0) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,0) +(0,-0.25)$){$a+(n+1)$};
\node[anchor=south] at ($(5,0) +(0,0.25)$){$\dfrac{n+1}{1}$};
%
%A "pin" is drawn between the midpoint of the edge between the last two vertices and its label.
\draw[draw=gray, line width=0.8pt, shorten <=1mm, shorten >=1mm] ({(2+5)/2},0) -- ({(2+5)/2},-1);
\node[anchor=north] at ({(2+5)/2},-1){$2a+(2n+1)$};
\node[anchor=south] (f2n) at ($({(2+5)/2},0) +(0,0.25)$){$\dfrac{2n+1}{2}$};
}};\\
};
%
%
%
%
%Arrows are drawn between the diagrams.
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a) to[bend right=30] node[midway, right=1.5mm, align=center]
{Blow-up of\\vertex \textit{b}} (label_for_Farey_Fraction_at_Vertex_a);
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a+1) to[bend right=30] node[midway, right=1.5mm, align=center]
{Blow-up of\\vertex $b - 1$} (label_for_Farey_Fraction_at_Vertex_a+1);
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_a+2) to[bend right=30] node[pos=1/3, right=1.5mm, align=center]
{Blow-up of more\\\hphantom{\ }vertices} (point_just_above_node_containing_phantom_Farey_Fraction);
%
\coordinate (label_for_ellipses) at ($(first_ellipses) +(0,-0.25)$);
\node[green, anchor=north] (label_for_ellipses-node) at (label_for_ellipses){$a + 3$};
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_ellipses-node) to[bend right=30]
(head_for_bent_arrow_above_second_ellipses);
%
%
\node[draw, text width=0.25\linewidth,inner sep=2mm,align=left, below left=5mm] at (current bounding box.north east)
{In each step of the expanding simple graphs,
the vertices are labeled with a fraction and
an \textit{a}-label. The fraction is a Farey
Fraction; it is typeset above each vertex.};
\end{tikzpicture}
\hspace{\fill}
\end{document}