1

I want to put a long text in the box using LaTeX, thus, would someone tell me how to put the text in the box? Using \makebox? however, it doesn't work, I use \makebox[10cm]{text in the box}, there is no box in the file.

3
  • \fbox{\makebox[10cm]{text in the box}}
    – user2478
    Aug 17, 2012 at 11:07
  • 1
    @sweetyBaby As Herbert's comment indicates, perhaps you are confusing 'typesetting in a box' with 'surrounding by a frame'. \makebox certainly typesets material in a box: perhaps you might clarify.
    – Joseph Wright
    Aug 17, 2012 at 11:08
  • thanks, however, there is still some problem, please refer to tex.stackexchange.com/questions/67538/…
    – sweetyBaby
    Aug 17, 2012 at 11:13

1 Answer 1

5

You can use \framebox instead of \makebox (which is almost the same as the suggestion in the comments of using \fbox around \makebox). \fbox is a simplified version of\framebox in the same way that \mbox is a simplified version of \makebox for the common case in which you just want the natural size of the contents so do not need to specify any lengths.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .