I'm new to LaTeX, so please excuse me if this is something basic, but I've been reading the "Not So Short Introduction to LaTeX", and Googling this with no success.

I have larger chunks of text I want to draw a ruled box around. It could be anything from 1 sentence to a few paragraphs.

\framebox seems like it should do what I want, but everything ends up on one line, and I don't understand how to apply \raisebox to this problem, if in fact this is the correct solution.

(I'm using TeXShop 4.42 )

Any help appreciated.

  • There are many packages such as tcolorbox, mdframed and so on. True, they may be somewhat an overkill for just drawing a box, but they show what is possible.
    – user194703
    Commented Oct 11, 2019 at 3:45
  • Thank you @Schrödinger'scat Just started playing with tcolorbox and it's perfect. Does exactly what I want with minimum fuss. If you post as an answer, I can accept it as official.
    – nedlud
    Commented Oct 11, 2019 at 4:23
  • @nedlud When you accept a response, it does not make it an official response. It simply says that you think this answer is the best answer to your problem. tex.stackexchange.com/help/someone-answers
    – AndréC
    Commented Oct 11, 2019 at 5:46
  • \noindent\fbox{\parbox{\dimexpr \linewidth-2\fboxsep-2\fboxrule}{...}} will also work. Commented Oct 11, 2019 at 14:26
  • Many of the boxes of this answer works enclosing a \parbox, as suggested, or a minipage, although for something more complex, just read the tcolorbox manual.
    – Fran
    Commented Oct 13, 2019 at 20:34

2 Answers 2


tcolorbox is a neat package for that.

showframe,%shows the page's frame
a6paper%suit to your needs
\usepackage{lipsum}%arbitrary text

\tcbset{%any default parameters


\vspace*{\fill} % for vertical centering 1/3

  \lipsum[1][1-2]%arbitrary paragrah

\vspace*{\fill}% for vertical centering 2/3
% https://tex.stackexchange.com/a/511504/112708 % Why? Still unresolved
\vspace{\baselineskip}% for vertical centering 3/3

  \lipsum[1] % text span multiple pages thanks to breakable




For simple types of boxes, please try with framed.sty or mdframed.sty packages, these are having many types of boxes, and the MWE is





If you need boxes with complex design, then go with tcolorbox and tikz...

You must log in to answer this question.

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