[comp.text.tex] \framebox or \fbox around text

kochhar@calliope.harvard.EDU (Sandeep Kochhar) (06/01/90)

How do I create a box that exactly fits a given piece of text that
contains line breaks?
For example, I want a box around the text
	hello\\
	world

Unfortunately, if I try \fbox{hello\\world}, I get a box around
"hello world", but without the line break.  Shouldn't  it be easy
enough for latex to figure out the width of hello\\world as easily
as it does for hello world?

Right now, I do something like
	\fbox{\parbox{1in}{hello\\world}}
which sort of works, except I have to guess at the width of the parbox.

Any suggestions?
Thanks.

Sandeep Kochhar
(617) 495-3988              mail: kochhar@harvard.harvard.edu
Harvard University                kochhar@harvard.csnet
33 Oxford st,                     kochhar@harvard.uucp
Cambridge, MA 02138               kochhar@harvard.bitnet