Currently, I use write things like

3 + 4 = \underline{\hspace{2cm}}

in the exam paper I am preparing. The \underline indicates where students should write their answer.

However, I want to change the underlines into empty boxes where students can fill in answers, such as a number. This allows me to control how large font they write.

  • Please elaborate about what output you exactly need. And not related but you should not use $$ ... $$ in LaTeX, but \[ ... \] instead or just $ ... $ if it's inline math. See this very extensive post about that.
    – SebGlav
    Mar 11 at 9:45

1 Answer 1


See this code:


        \item   3+4=\\ \hfill \framebox(\textwidth,10){}\\
        \item 7x5=\\ \hfill \framebox(\textwidth,10){}\\
        \item $\dfrac{x^2-1}{x-1}=$\\ \hfill \framebox(\textwidth,20){}\\
        \item $ \int x^2\,dx=$\\ \hfill \framebox(\textwidth,30){}\\
        \item Make the construction of an equilater triangle with a ruler and a compass.\\ \hfill \framebox(\textwidth,150){}\\

and his output:

enter image description here

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.