1

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?

1
  • have a look athe answer below -- – js bibra Feb 25 at 10:41
1

enter image description here

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.