[Tex/LaTex] Text wrapping in a minibox

boxesline-breaking

For a class I'm given access to a LaTeX version of the homework so that it's easier to fill out. We're given boxes we're suppose to answer the questions in similar to:

\begin{picture}(420,570)(0,0)
\put(0,5){\framebox(420,550){\minibox{
I'm writing my answer here.
}}}
\end{picture}

The \begin, \put, and \framebox are there in the file the professor gives out. I added the \minibox so I could more easily do a few things that are difficult without it. My problem is that if I write a bunch of sentences in this answer, the answer does not automatically text wrap within the box. How can I wrap the text in this situation? Thank you for your time!

Best Answer

I do not know, what you want with \minibox (package minibox), because \framebox is already adding a frame and \minibox requires manually line breaks. But you could use environment minipage or \parbox:

\documentclass[a4paper]{article}
\usepackage[hmargin=15mm]{geometry}
\usepackage{lipsum}

\begin{document}
\begin{picture}(420,570)(0,0)
\put(0,5){\framebox(420,550){%
  % horizonal margin: 10\unitlength
  \parbox{400\unitlength}{%
    \setlength{\parindent}{20pt}% optionally
    \lipsum[1-5]
  }%
}}
\end{picture}
\end{document}

Result