`TikZ` 図で `(ポイント A) から [右に曲げる = 30] (ポイント B)` までを描画する際の一貫性

`TikZ` 図で `(ポイント A) から [右に曲げる = 30] (ポイント B)` までを描画する際の一貫性

次のTikZ図では、拡大グラフ(単純なグラフのシーケンス)を描いています。

\draw[-latex] (Point A) to[bend right=30] (Point B)

特定のステップでの展開を示します。(Point A)が真上にある場合、これは見栄えがよく(Point B)、矢印の先は分数を含むノードの北西の角に向かっています。 これらの矢印の 3 番目で最後の 1 つは、(Point B)の南東にあるで終わります(Point A)。 ((Point B)この場合、 には1/1緑色でタイプセットされた分数が含まれています。これは、私の懸念を示すためにタイプセットされた一時的なノードです。) この場合、矢印の先はノードの西端に向かっているように見えます。 この最後の矢印を変更して、矢印の先がノードの北東の角に向かっているようにするにはどうすればよいでしょうか。

\documentclass{amsart}
\usepackage{amssymb}
\usepackage{mathtools,array}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}


\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}]

%A sequence of graphs is drawn, starting with the vertex with the b-label b.


%Here is the blow-up of the vertex labeled b.
\draw[fill] (-4,0) circle (1.5pt);
\node[anchor=north] (label_for_Vertex_b) at ($(-4,0) +(0,-0.25)$){\textit{b}};
\node[anchor=south] at ($(-4,0) +(0,0.25)$){$\dfrac{0}{1}$};
%
%
\draw (-4,-3) -- (-2,-3);
\draw[fill] (-4,-3) circle (1.5pt);
\draw[fill] (-2,-3) circle (1.5pt);
%
\node[anchor=north] at ($(-4,-3) +(0,-0.25)$){\textit{b}};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_b) at ($(-4,-3) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] (label_for_Vertex_b-1) at ($(-2,-3) +(0,-0.25)$){$b - 1$};
\node[anchor=south] at ($(-2,-3) +(0,0.25)$){$\dfrac{1}{1}$};
%
%
%An arrow is drawn to the next diagram.
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_b) to[bend right=30] node[midway, left=1.5mm, align=center]
{Blow-up of\\vertex \textit{b}} (label_for_Farey_Fraction_at_Vertex_b);


%Here is the blow-up of the vertex labeled b-1.
\draw (-4,-6) -- (-2,-6) -- (0,-6);
\draw[fill] (-4,-6) circle (1.5pt);
\draw[fill] (-2,-6) circle (1.5pt);
\draw[fill] (0,-6) circle (1.5pt);
%
\node[anchor=north] at ($(-4,-6) +(0,-0.25)$){\textit{b}};
\node[anchor=south] at ($(-4,-6) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,-6) +(0,-0.25)$){$b-1$};
\node[anchor=south] (label_for_Farey_Fraction_at_Vertex_b-1) at ($(-2,-6) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,-6) +(0,-0.25)$){$b-2$};
\node[anchor=south] at ($(0,-6) +(0,0.25)$){$\dfrac{2}{1}$};
%
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_b-1) to[bend right=30] node[midway, left=1.5mm, align=center]
{Blow-up of\\vertex $b - 1$} (label_for_Farey_Fraction_at_Vertex_b-1);


%Here is the blow-up of the vertex labeled b-n.
\draw (-4,-9) -- (-2,-9) -- (0,-9) (2,-9) -- (5,-9);
\draw[fill] (-4,-9) circle (1.5pt);
\draw[fill] (-2,-9) circle (1.5pt);
\draw[fill] (0,-9) circle (1.5pt);
\node at (1,-9){$\ldots$};
\draw[fill] (2,-9) circle (1.5pt);
\draw[fill] (5,-9) circle (1.5pt);
%
\node[anchor=north] at ($(-4,-9) +(0,-0.25)$){\textit{b}};
\node[anchor=south] at ($(-4,-9) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,-9) +(0,-0.25)$){$b-1$};
\node[anchor=south] at ($(-2,-9) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,-9) +(0,-0.25)$){$b-2$};
\node[anchor=south] at ($(0,-9) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=south, green] (label_for_phantom_Farey_Fraction_at_ellipses) at ($(1,-9) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(2,-9) +(0,-0.25)$){\textit{b-n}};
\node[anchor=south] at ($(2,-9) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,-9) +(0,-0.25)$){$b-(n+1)$};
\node[anchor=south] at ($(5,-9) +(0,0.25)$){$\dfrac{n+1}{1}$};
%
%
%
%
\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_b-2) to[bend right=30] node[midway, left=1.5mm, align=center]
{Blow-up of\\more vertices} (label_for_phantom_Farey_Fraction_at_ellipses);
%
%
%A "pin" is drawn between the midpoint of last two vertices and the label of the mediants of these vertices.
\draw[-latex, dashed, line width=0.8pt, shorten <=3mm, shorten >=1mm] ($(3.5,-9) +(60:2)$) -- (3.5,-9);
\path node[anchor=south, align=center, text width={width("future vertex")}]
at ($(3.5,-9) +(60:2)$){future mediant\\for vertex\[\dfrac{2n+1}{2}\]};
%
%A "pin" is drawn between the midpoint of the edge between the last two vertices and its label.
\coordinate (label_for_Edge) at ($(3.5,-9.5) +(0,-0.75)$);
\draw[draw=gray, line width=0.8pt, shorten <=1mm, shorten >=1mm] (3.5,-9) -- (label_for_Edge);
\node[anchor=north, align=center, inner sep=0, font=\scriptsize] at (label_for_Edge)
{$\begin{aligned} &\text{Present edge label of} \\[-1.5ex]
&\quad 2\bigl[(b-n)+(b-(n+1))\bigr] \\[-1.5ex]
&\qquad=2^{2}b-(2n+1)2
\end{aligned}$};



\draw[-latex, line width=0.8pt, shorten=7.5pt] (label_for_Vertex_b-1) to[bend right=30] node[midway, left=1.5mm, align=center]
{Blow-up of\\vertex $b - 1$} (label_for_Farey_Fraction_at_Vertex_b-1);


\draw[-latex, line width=0.8pt, shorten <=30pt, shorten >=7.5pt] (label_for_Edge.south) -- ($(label_for_Edge.south) +(0,-4)$);

%Here is the vertex placed at the broken edge.
\draw (-4,-15) -- (-2,-15) -- (0,-15) (2,-15) -- (5,-15);
\draw[fill] (-4,-15) circle (1.5pt);
\draw[fill] (-2,-15) circle (1.5pt);
\draw[fill] (0,-15) circle (1.5pt);
\node at (1,-15){$\ldots$};
\draw[fill] (2,-15) circle (1.5pt);
\draw[fill] ({(2+5)/2},-15) circle (1.5pt);
\draw[fill] (5,-15) circle (1.5pt);
%
\node[anchor=north] at ($(-4,-15) +(0,-0.25)$){\textit{b}};
\node[anchor=south] at ($(-4,-15) +(0,0.25)$){$\dfrac{0}{1}$};
%
\node[anchor=north] at ($(-2,-15) +(0,-0.25)$){$b-1$};
\node[anchor=south] at ($(-2,-15) +(0,0.25)$){$\dfrac{1}{1}$};
%
\node[anchor=north] at ($(0,-15) +(0,-0.25)$){$b-2$};
\node[anchor=south] at ($(0,-15) +(0,0.25)$){$\dfrac{2}{1}$};
%
\node[anchor=north] at ($(2,-15) +(0,-0.25)$){\textit{b-n}};
\node[anchor=south] at ($(2,-15) +(0,0.25)$){$\dfrac{n}{1}$};
%
\node[anchor=north] at ($(5,-15) +(0,-0.25)$){$b-(n+1)$};
\node[anchor=south] at ($(5,-15) +(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},-15) -- ({(2+5)/2},-16);
\node[anchor=north] at ({(2+5)/2},-16){$2^{2}b-(n+1)2$};
\node[anchor=south] at ($({(2+5)/2},-15) +(0,0.25)$){$\dfrac{2n+1}{2}$};

\end{tikzpicture}

\end{document}

答え1

このような?

ここに画像の説明を入力してください

編集: 以下のMWEは私の 答え前回の質問について。これは 5 つの行に分かれており、各行はビルディング ブロック (BBB)、つまりノードで構成されdot、次の構造になっています: 黒く塗りつぶされた円、その上に名前の付いたラベル (分数 0/1、1/1、2/1 など)、その下に名前の付いたラベル (インデックスbb-1など)。ラベルの名前により、隣接する行の BBB 間に矢印を描くことができます。

 dot/.style args = {#1/#2/#3/#4}{circle, draw, fill, minimum size=3pt,
                    inner sep=0pt, outer sep=0pt, anchor=center,
                    label={[name=#1]$#2$},
                    label={[name=#3]below:$#4$},
                    node contents={},
                    on chain}, 

定義された BBB は、ライブラリを使用して各画像行でチェーンに接続されますchains。それらの間の距離は によって決定されますnode distance=<vertical> and <horizontal>

BBB の横には、ピン ノード、ラベルのスタイル、エッジ クォート、ノード距離などの補助要素が定義されていますlbl。最後に、BBB 間の距離が定義されています。これにより、一貫した方法で BBB 間の距離を変更するのが簡単になります。

説明した構造の提案されたソリューションにより、(もちろん私の意見ですが)画像に対して一貫性があり、簡潔で短いコードが可能になり、必要に応じて新しい画像の要素で簡単に拡張できます。

完全な MWE は次のとおりです。

\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{chains,           % new
                positioning,      % new
                shapes.multipart, % new
                quotes}           % new  
\makeatletter
\tikzset{% for discontinuing of chain
  off chain/.code={\def\tikz@lib@on@chain{}}%
}
\makeatother

\begin{document}
    \begin{tikzpicture}[auto,
           node distance = 22mm and 21mm,    % new
             start chain = going right,     % new
every edge quotes/.style = {auto=right, font=\footnotesize,
                            align=center},  % new
every edge/.append style = {-latex, line width=0.8pt},
      every label/.style = {inner sep= 2pt,font=\footnotesize},
         dot/.style args = {#1/#2/#3/#4}{circle, draw, fill, minimum size=3pt,
                            inner sep=0pt, outer sep=0pt, anchor=center,
                            label={[name=#1]$#2$},
                            label={[name=#3]below:$#4$},
                            node contents={},
                            on chain}, % 
         lbl/.style args = {#1/#2}{rectangle split, rectangle split parts=2,
                            font=\footnotesize, inner sep=2pt,
                            node contents={#1\nodepart{two}#2},
                            }, % new
                    ]
%%%% 1. row (is on the top of image), node name is n11
\node (n11) [dot=n11a/\frac{0}{1}/n11b/b];
%%%% 2. row, nodes names are n21, n22
\node (n21) [dot=n21a/\frac{0}{1}/n21b/b,
            below=of n11];
\node (n22) [dot=n22a/\frac{1}{1}/n22b/b-];
\draw[-latex, line width=0.8pt]
        (n11b) edge["blow up\\ of vertex $b$", bend left] (n21a);
\draw   (n21) -- (n22);
%%%% 3. row, nodes names are n31, n32, ...
\node (n31) [dot=n31a/\frac{0}{1}/n31b/b,
            below=of n21];
\node (n32) [dot=n32a/\frac{1}{1}/n32b/b-1];
\node (n33) [dot=n33a/\frac{2}{1}/n33b/b-2];
\draw   (n22b) edge["blow up\\  of vertex $b$", bend left] (n32a);
\draw   (n31) -- (n33);
%%%% 4. row, nodes names are n41, n42, ...
\node (n41) [dot=n41a/\frac{0}{1}/n41b/b,
            below=of n31];
\node (n42) [dot=n42a/\frac{1}{1}/n42b/b-1];
\node (n43) [dot=n43a/\frac{2}{1}/n43b/b-2];
\node (n44) [dot=n45a/\frac{n}{1}/n45b/b-n];
\node (n45) [dot=n46a/\frac{n+1}{1}/n46b/b-(n+1)];
\path   (n43) -- node[inner sep=0pt,
                      label={[name=n46,text=green!40!black]$\frac{3}{1}$}] {$\dots$} (n44);
\draw   (n33b) edge["blow up\\  of vertex $b$",
                    bend left] (n43a);
\draw   (n33b) edge[bend left] (n46.north);
\draw[thick]    (n41) -- (n43)   (n44) -- node (aux) {} (n45);
% "pin" above
\draw[<-, semithick, dashed]   (aux) -- ++ (6mm,9mm) 
        node[above, lbl=Future vertex of/
                        $\dfrac{2n+1}{2}$];
% "pin" below
\draw[semithick]    (aux) -- ++ (0,-9mm) 
        node (aux2) [below, lbl=Present edge label of/
                                {$\begin{gathered}
                                2\bigl[(b-n)+(b-(n+1))\bigr]\\
                                = 2^{2}b-(2n+1)2
                                \end{gathered}$}];
%%%% 5. row, nodes names are n51, n52, ...
\node (n51) [dot=n51a/\frac{0}{1}/n41b/b,
            below=of n41 |- aux2];
\node (n52) [dot=n52a/\frac{1}{1}/n52b/b-1];
\node (n53) [dot=n53a/\frac{2}{1}/n53b/b-2];
\node (n54) [dot=n54a/\frac{n}{1}/n54b/b-n];
\node (n55) [dot=n55a/\frac{n+1}{1}/n55b/b-(n+1)];
%
\path   (n53) -- node [anchor=center] {$\dots$} (n54);
\draw[thick]    (n51) --  (n53) 
                (n54) --  (n55) node (n56) [pos=0.5, off chain, 
                                      dot=n56a/\frac{2n+1}{2}/n56b/ ];
\draw[semithick]
        (aux2) -- (n56a) (n56) -- ++ (0,-9mm) node[below, lbl={$2^{2}b-(2n+1)2$/ }];
    \end{tikzpicture}
\end{document}

注意: 私が提案するソリューションは、これまで使用してきたものとはかなり異なることは承知しています。いずれにしても、(私の意見では) それをテストして、より簡単な管理方法、より簡単な変更、または一貫性の維持を提供できる代替ソリューションを確認する価値はあります。

関連情報