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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 9 down vote accepted

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

share|improve this answer

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.