How can I align text around forest tree's bottom node?
Fox
\begin{forest}
[PAST [jumped]]
\end{forest}
over fence
Or are there more cleaner ways to insert text above words?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityWelcome to TeX-SE! You can definitely use forest here and set the baseline
wherever you like:
\documentclass{article}
\usepackage{forest}
\begin{document}
Fox
\begin{forest}
[PAST [jumped,baseline]]
\end{forest}
over fence
Fox \tikz[baseline=(j.base),outer xsep=0pt,inner xsep=0pt]{\draw (0,0) node[below] (j){jumped} -- ++ (0,0.5) node[above]{PAST};}
over fence
\end{document}
Depending on what you really want to achieve there are of course other options. But I do not know enough about your goals to make a choice. So I only add a tikz
alternative (forest
loads tikz
as it is based on it).
If you want to just set a word on top of another word there are zillions of options like
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Fox $\stackrel{\textstyle\text{PAST}}{\text{jumped}}$
over fence
\end{document}