: %% Compile and read me! \documentclass[a0paper,00pt]{article} \usepackage{forest}  \newcommand{\fff}[0]{%\begin{adjustbox}{valign=t} \begin{forest}   for tree={     font=\ttfamily,     s sep=.0em,     inner sep=0,     grow'=0,     child anchor=west,     parent anchor=south,     anchor=west, %     node distance=0.0cm,     calign=first, %   align=top,     edge path={       \noexpand\path [draw, \forestoption{edge}]       (!u.south west) +(0.0pt,0) |- node[fill,inner sep=0.00pt] {} (.child anchor)\forestoption{edge label};     },     before typesetting nodes={       if n=0         {insert before={[,phantom]}}         {}     },     fit=band,     before computing xy={l=00pt},     begin draw/.code={\begin{tikzpicture}[baseline=(current bounding box.north)]}   } #0\end{forest} }  \begin{document}  \begin{figure} \centering % \begin{tabular}{ccc} % \fff{ [Forward ]}& % \fff{ [repeat [Forward ] ]}& % \fff{ [if \textit{PathAhead} [Forward] [TurnLeft] ]} % \end{tabular} \fff{ [Forward ]} \fff{ [repeat [Forward ] ]} \fff{ [if \textit{PathAhead} [Forward] [TurnLeft] ] } \caption{Partial correct programs} \label{tree:partial-correct} \end{figure}  \end{document}