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

1 Answer 1

10

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .