I'm having trouble getting phylogenetic trees to display correctly within the solution environment of the exam class. For some reason, they are positioned way far to the right (running off the page) in that environment. See MWE below.
% Compile with XeLaTeX to deal with EPS graphics in trees.
\documentclass[letterpaper,12pt,addpoints]{exam}
\usepackage{newicktree}
\printanswers
\begin{document}
\begin{questions}
\question[5] The tree is correctly positioned on the page if it comes after the solution environment.
\begin{solution}
\end{solution}
\begin{newicktree}
\righttree \contemporarytips\nobranchlengths \setunitlength{4in}
\drawtree{(((ferns \& allies, (angiosperms, gymnosperms)),bryophytes), blue-green algae);}
\end{newicktree}
\question[5] The tree is not correctly positioned within the solution environment.
\begin{solution}
\begin{newicktree}
\righttree \contemporarytips\nobranchlengths \setunitlength{4in}
\drawtree{(((ferns \& allies, (angiosperms, gymnosperms)),bryophytes), blue-green algae);}
\end{newicktree}
\end{solution}
\end{questions}
\end{document}
newicktree
\dimen20
(usually\jot
) and\dimen21
(usually\leftmargin
) in a context where something is typeset. Very bad LaTeX programming.