21

I am making a sheet where people can fill in answers of various types. For this I would like to make some boxes of certain width and height. How can this best be done? I use \fbox when I want to box a box around some text, but now I need to make a box with given dimensions.

I did noticed the question What are the different kinds of boxes in (La)TeX? but don't quite see the answer there.

26

You can use \framebox(200,300){} where the size is given in multiples of \unitlength, defaulting to 1pt.

1

Surprised no one has mentioned this. Latex has feature specifically for questions and answers:

% allow for answer boxes:
\documentclass[12pt]{exam}
\printanswers

\usepackage{amsmath}

\begin{document}
\begin{enumerate}

    % questions can be list items
    \item (Problem 7 \S 2.1)\\
    Evaluate the following expression using Euclid's algorithm (2.1.3). (\textbf{Write each step down for credit})

    \[\gcd(98,\ 35)\]

    % make an answer box
    \begin{solutionorbox}[2in] \\
    $98\mod 35 = 28$ \\
    $35\mod 28 = 7$ \\
    $28\mod 7 = 0$ \\
    $\gcd(98,\ 35) = 7$
    \end{solutionorbox}

    \end{enumerate}
\end{document} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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