The following code renders a graph of three vertices and three edges. (Nothing exciting.) Between the first vertex and the second vertex, I want to convey that there may be n - 1
more vertices. The second "displayed" vertex may actually be the nth vertex. I am getting error messages with my use of the \underbrace
command. I am using it within a node command. I think this is allowed within a node command. Can \mathrlap
be used within a node command? Should any of this be coded in math mode?
I may want to have a longer text under the brace - like "$n+1$ more vertices may be here but that is for me to know and you to find out." How would I typeset that on two or three lines?
In a graph, what is the convention regarding edges between consecutive "displayed" vertices when there may be more to the graph between them? Do I draw part of an edge off of each vertex? Do I typeset ellipses in the middle between the two "displayed" vertices? Do I typeset a pair of ellipses between the "displayed" vertices - one ellipses next to each vertex?
\documentclass{amsart}
\usepackage{amsmath}
\usepackage{mathtools} %Loads amsmath
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\begin{document}
\begin{tikzpicture}
\path (0,0) coordinate (vertex_1) (3,0) coordinate (vertex_n) (5,0) coordinate (vertex_n+1);
\draw[fill] (vertex_1) circle (1.5pt);
\draw[fill] (vertex_n) circle (1.5pt);
\draw[fill] (vertex_n+1) circle (1.5pt);
\draw (vertex_1) -- ($(vertex_1) +(0.75,0)$);
\draw (vertex_n) -- ($(vertex_n) +(-0.75,0)$) -- (vertex_n+1);
\coordinate (midpoint) at ($($(vertex_1) +(0.75,0)$)!0.5!($(vertex_n) +(-0.75,0)$)$);
\coordinate (brace) at ($(midpoint) +(0,-0.75)$);
%\node at (brace){\mathrlap{\underbrace{\phantom{n + 1\text{ more vertices}}}_{text}}};
\end{tikzpicture}
\end{document}
\node at (brace){$\mathrlap{\underbrace{\phantom{n + 1\text{ more vertices}}}_{n + 1\text{ more vertices}}}$};