7

To draw a larger tree, I tried to use

\documentclass[11pt]{article}
\usepackage{tikz-qtree, tikz-qtree-compat}
\tikzset{every tree node/.style={align=center, anchor=north}}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}
\resizebox{\linewidth}{!}{%
\Tree [.CP  ] 
}
\end{tikzpicture}
\end{document}

This gives a division by 0 error. However, without the tikzpicture environment, it works just fine.

\documentclass[11pt]{article}
\usepackage{tikz-qtree, tikz-qtree-compat}
\tikzset{every tree node/.style={align=center, anchor=north}}
\usetikzlibrary{positioning}

\begin{document}
\resizebox{\linewidth}{!}{%
\Tree [.CP  ] 
}
\end{document}
0
9

The \resizebox needs to be outside the \begin{tikzpicture}...\end{tikzpicture} environment.

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.