How do I put a paragraph in a box that is some percentage of the width of the page I'm putting it in?

I have a document that should contain a bordered box with a paragraph of explanatory text. The box's width should be a percentage of that of the page's body.

I don't want to make the box a fixed width, because I will be making the document in two page sizes. I hope I'll only need to change the documentclass property, and to that end I hope it's possible to make the box width proportional to the page (or body) so that its width will make sense at both sizes.

I tried using \framebox but I don't seem to be understanding it properly -- I can't get the text in the framebox to wrap.

I suppose I could make a one-celled table, but it seems like I'm missing a more elegant solution.

-

You can use a minipage with the width as a proportion of textwidth.

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\fbox{\begin{minipage}{0.9\textwidth}
\lipsum[1]
\end{minipage}}
\end{document}


The \begin{minipage}...\end{minipage} puts a block of text in its own block. The 0.9\textwidth provides the sizing parameter.

To enclose everything in a frame you can use \fbox.

-
Thank you, this worked perfectly! I'm afraid, though, that I don't understand why it works... I thought fbox was only for shorter pieces of text, all on the same line? –  HedgeMage May 6 '11 at 3:14
@HedgeMage I added a bit more notes. \fbox can take more than a line of text. Try adding two minipages without a line between them and at 0.47/textwidth. TeX grows on you it will take a bit of time and then everything clicks together. –  Yiannis Lazarides May 6 '11 at 3:41
Thanks for the added explanation, it really helped. –  HedgeMage May 6 '11 at 4:18
Yes, fbox takes text all on a same line. By putting text in a minipage you've in effect turned that paragraph into one big character. (Internally, TeX thinks characters are boxes, so that makes sense.) –  Victor Eijkhout Aug 11 at 14:42