[Tex/LaTex] Draw ellipsis (three dots) between nodes in tikz

tikz-arrowstikz-pgf

I am beginning to learn tikz to draw a simple graph. I would like to represent the idea that there are N nodes by drawing something like this:

enter image description here

How can I draw an ellipsis: ... between the two nodes?

Here is the code I used for the above:

\documentclass[12pt,a4paper]{report}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.5cm,
    main node/.style={thick,circle,draw,font=\sffamily\Large}]

    \node[main node] (1) {$X_1$};
    \node[main node] (2) [right of=1]{$X_N$};
    \node[main node] (5) [below of=1]{C};

    \path[every node/.style={font=\sffamily\small}]
        (1) edge (5);
\end{tikzpicture}
\end{document}

(Other comments on how to improve my tikz code are welcome.)

Best Answer

Another way would be to say \path (1) -- node[auto=false]{\ldots} (2);. You've turned on the auto setting in the tikzpicture options, auto=false turns it off.

Also, it is recommended to load the positioning library and use right=of instead of saying just right of=. See Difference between "right of=" and "right=of" in PGF/TikZ.

Finally, I don't really think the [every node... option to your last path does anything.

\documentclass[12pt,border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}

\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
    main node/.style={thick,circle,draw,font=\sffamily\Large}]

    \node[main node] (1) {$X_1$};
    \node[main node] (2) [right=of 1]{$X_N$};
    \node[main node] (5) [below=of 1]{C};

    \path (1) edge (5);

    \path (1) -- node[auto=false]{\ldots} (2);
\end{tikzpicture}
\end{document}