Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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