Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
\fbox{\makebox[10cm]{text in the box}} –  Herbert Aug 17 '12 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 '12 at 11:08
    
thanks, however, there is still some problem, please refer to tex.stackexchange.com/questions/67538/… –  sweetyBaby Aug 17 '12 at 11:13

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.