0

I do not find anywhere how to specify vertical alignment for a forest obtained with the forest package. Here is an example of a table I'd like to have in a document:

\documentclass[a4paper]{report}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{forest}
\usepackage{booktabs}

\begin{document}

\centering \begin{tabular}{c@{\hskip 20pt}|cc@{\hskip 20pt}cc@{\hskip 20pt}cc} \toprule Derivative & $\tau$ & $F(\tau)$ & $\tau$ & $F(\tau)$ & $\tau$ & $F(\tau)$\ \cmidrule{1-7} $y'$ & \begin{forest} for tree = {circle,draw,fill,inner sep=1pt} [] \end{forest} & $f$ & & & & \ \cmidrule{1-7} $y''$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[]] \end{forest} & $f'f$ & & & & \ \cmidrule{1-7} $y^{(3)}$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[][]] \end{forest} & $f''(f,f)$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[[]]] \end{forest} & $f''(f,f)$\ \cmidrule{1-7} $y^{(4)}$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[][][]] \end{forest} & $f^{(3)}(f,f,f)$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[[]][]] \end{forest} & $f''(f,f'f)$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[][[]]] \end{forest} & $f''(f'f,f)$ \[10pt] & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[[[]]]] \end{forest} & $f'f'f'f$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[[][]]] \end{forest} & $f'f''(f, f)$ & \begin{forest} for tree = {circle,draw,fill,grow=north,l=4pt,inner sep=1pt} [[][[]]] \end{forest} & $f''(f'f,f)$ \ \bottomrule \end{tabular}

\end{document}

Which results in

enter image description here

I would like to have, for example in the second line, that the $f'f$ is aligned with the center of its corresponding tree, and not with the root.

G. Gare
  • 707

0 Answers0