# Override "for tree" for individual trees

With the forest package, it is possible to do the following, taken from this answer.

\documentclass[12pt]{article}
\usepackage{forest}
\forestset{qtree/.style={for tree={parent anchor=south,
child anchor=north,align=center,inner sep=0pt}}}
\usepackage{flexisym}

\begin{document}

\begin{forest}, baseline, qtree
[IP
[Spec]
[I\textprime,
[I\\are]
[VP]
]]
\end{forest}

\end{document}


This works well. But let's say that I want to change the font size or seperator size of individual trees, then I get an error.

Changing the opening of the environment with like so

\begin{forest}, baseline, qtree
for tree={font=\footnotesize}


Error: Package pgfkeys Error: I do not know the key '/tikz/qtree for tree', to which you passed 'font', and I am going to ignore it. Perhaps you misspelled it.

How can I "mix and match" my own rules with a base style?

• have a look athe answer below -- Feb 25 at 10:41

\documentclass[12pt]{article}
\usepackage{forest}
\forestset{qtree/.style={for tree={parent anchor=south,
child anchor=north,align=center,inner sep=0pt}}}
\usepackage{flexisym}

\begin{document}

\begin{forest}, baseline, qtree,
/tikz/every node/.append style={font=\huge},
[IP
[Spec]
[I\textprime,
[I\\are]
[VP]
]]
\end{forest}

\end{document}

\documentclass[12pt]{article}
\usepackage{forest}
\forestset{qtree/.style={for tree={parent anchor=south,
child anchor=north,align=center,inner sep=0pt}}}
\usepackage{flexisym}

\begin{document}

\begin{forest}, baseline, qtree,
/tikz/every node/.append style={font=\tiny},
[IP
[Spec]
[I\textprime,
[I\\are]
[VP]
]]
\end{forest}

\end{document}