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.

I'm attempting to use the exam document class to write an exam for my class, and for some reason this particular exam is not leaving space for their answers when I use the [noanswers] argument to the document class. Here is the markup:

\documentclass[noanswers]{exam}

% Additional LaTeX Packages

\usepackage{graphicx}

% Font and Typography Settings

\usepackage{beton}
\renewcommand{\bfdefault}{sbc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{euler}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[babel=true]{microtype}

\pagestyle{headandfoot}
\headrule
\firstpageheader{CS 1411 -- Principles of Programming I}
    {Exam II}
    {Spring 2013}
\runningheader{CS 1411 -- Principles of Programming I}
    {Exam II, Page \thepage\ of \numpages}
    {Spring 2013}

\begin{document}

\begin{questions}

\question PROBLEM TEXT
\begin{parts}
\part function
\begin{solution}[\stretch{1}]
    PART A SOLUTION
\end{solution}

\part PART B
\begin{solution}[\stretch{1}]
    PART B SOLUTION
\end{solution}
\end{parts}

\question PROBLEM TEXT
\begin{parts}
\part PART A
\begin{solution}[\stretch{1}]
    PART A SOLUTION
    \begin{center}
        \includegraphics[scale=0.60]{Images/exam-2-problem-2.pdf}
    \end{center}
\end{solution}
\part PART B
\begin{solution}[\stretch{1}]
    PART B SOLUTION
\end{solution}
\end{parts}

\question PROBLEM TEXT
\begin{solution}[\stretch{1}]
\begin{verbatim}
PYTHON CODE IN VERBATIM MODE
\end{verbatim}
\end{solution}

\end{questions}

\end{document}

Via pdflatex the generated PDF contains the solutions as I would expect when using the [answers] argument to the document class. Switching to [noanswers] simply prints the questions leaving no space for the solutions. Any suggestions would be much appreciated.

share|improve this question

closed as too localized by Marco Daniel, Torbjørn T., lockstep, Xavier, Qrrbrbirlbel May 5 '13 at 0:50

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I get the expected result once a missing \begin{questions} is added just before the first \question command. Do you still get the problem mentioned after adding the missing command? –  Gonzalo Medina Feb 20 '13 at 16:39
    
Hi Gonzalo, yes I still have the problem after adding the \begin{questions}. This was a copy/paste error in my working example. I'll update the code sample in the original post. –  ggelfond Feb 20 '13 at 20:22
3  
Perhaps it is then a problem of outdated packages(s)? Which version of the exam class are you using? –  Gonzalo Medina Feb 20 '13 at 22:19
    
It works fine for me under pdflatex using exam.cls version 2011/05/22 Version 2.4 by Philip Hirschhorn. Try using solutionorbox -- you should see the space exam is making (or not making) for the solution. –  Sean Allred Mar 6 '13 at 18:09

Browse other questions tagged or ask your own question.