1

I am trying to draw a simple tree in Beamer using tikz-qtree. To signal that the a branch of the tree I am drawing continues to infinity, I want one of the last node to be \ldots. However, because the other node at the same level is made of text, the edge draws has lines of different length, while I would like the lines to be of the same length. Would you know how to correct that? Many thanks for your help.

Here is a minimal working example:

\documentclass[10pt]{beamer}
\usepackage{tikz}
\usepackage{tikz-qtree} 
\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \centering \begin{tikzpicture} \Tree [.{} 1 [.2 1 [.2 1 {\ldots} ]]] \end{tikzpicture} \end{frame}

\end{document}

Guilhem
  • 11

1 Answers1

1

If this is just one example, {\vphantom{1}\ldots} would give you correct output for this particular case. If you have more than one similar example, it is better to add global settings regarding each node

enter image description here

\documentclass[10pt]{beamer}
\usepackage{tikz}
\usepackage{tikz-qtree}
\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \centering \begin{tikzpicture}[ text height=6pt, inner ysep=5pt, outer sep=0pt, ] \Tree [.{} 1 [.2 1 [.2 1 {\ldots} ]]] \end{tikzpicture} \end{frame}

\end{document}

Celdor
  • 9,058