I am trying to make basic linguistic trees in Forest that do two things: 1) have the bottom leaves aligned on a single tier, and 2) have parent anchor=south. (Actually I have a third requirement as well: to be able to use line-breaks in leaves, but that's another issue.) Currently I can brute force these together by specifying the tier for each leaf as needed (fine for the occasional small tree, irritating for many or larger trees).
The Forest documentation ( http://mirrors.ibiblio.org/CTAN/graphics/pgf/contrib/forest/forest-doc.pdf ) does provide a technique for doing this alignment automatically (p. 7, ex. 12), but if I try this while also specifying parent anchor I get this error:
! Package pgfkeys Error: I do not know the key '/tikz/{parent anchor=south} whe re n children', to which you passed '0{tier=word}{}', and I am going to ignore it. Perhaps you misspelled it.
I am very new to Forest, so maybe I'm missing something obvious. Below is my MWE, first with the brute-forced version A that gives the correct output:
And this is followed by the automated version that produces the correct alignment, but without any parent anchoring specified (I've included the line the breaks it, but commented out):
I would like to be able to use an automated alignment, as in B, but with the anchoring of A. Thank you.
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage{forest}
\begin{document}
A) Correct tree, but brute-forced:
\begin{forest}{parent anchor=south}
[
[strong
[strong[Cant,tier=word]]
[weak[wara,tier=word]]
]
[weak
[byrig,tier=word]
]
]
\end{forest}
B) Automated tree, but with wrong parent anchor:
\begin{forest}%{parent anchor=south}
where n children=0{tier=word}{}
[
[strong
[strong[Cant]]
[weak[wara]]
]
[weak
[byrig]
]
]
\end{forest}
\end{document}