I'm a professor and I use the exam class very often in LaTeX.
\begin{solutionorlines}[4cm]creates 4cm of space for students to answer. When I type\printanswersit shows the answers but it doesn't keep the same space as when the answers are not printed. How can I keep the same space for the question and solution environment?I want the answers to be printed on the same solution lines. There is
\fillin[fill this in][12cm]but this doesn't linebreak. Tried also thecensorpackage (\xblackout) but this doesn't make the last linehfilland it's not really the same solutionlines that are provided for the students.- Can the characters of the solution be counted and leave proportional more space for handwriting (i.o.w. convert number of characters of the solution to number of lines for the students to answer)?
Here is an example.
\documentclass[11pt,a4paper,addpoints]{exam}
\unframedsolutions
%\printanswers
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{calc}
\newgeometry{left=2cm,top=2cm,right=2cm,bottom=2cm}
%----------blanks----------------------
\usepackage{censor}
\censorruledepth=-.2ex
\censorruleheight=.1ex
%\StopCensoring %text xblackout comes visible or not
%--------------------------------------
\begin{document}
\begin{questions}
\begin{figure*}[h]
\begin{tikzpicture}[rounded corners=5mm]
\path node[rectangle,draw=green,fill=green!8,inner sep=.70cm] {\parbox{\textwidth-1.4cm-\fboxrule}{
\question[2] What is the first question?
\begin{solutionorlines}[4cm]
This box is smaller than when the solutions are not printed. How do I make this the same dimension as when answers are not printed?
\end{solutionorlines}
}};
\end{tikzpicture}
\end{figure*}
\xblackout{This solutionline doesn't fill untill the right margin = bad}
\end{questions}
\end{document}

\xblackoutissue, if you define\censorruledepth=-.1exyou can then do the following:\xblackout{This solutionline doesn't fill untill the right margin = bad}\hrulefill– Steven B. Segletes Dec 22 '14 at 16:55