I would like to horizontally offset a framed paragraph of text so that the sides of the frame coincide precisely with left and right margins of 2em on a page with a text-width of 6.5 inches.
Indenting a framed parbox
or minipage
is problematic because the required width is subject to a conflict of units between the margins, the text-width, and the inherent fboxsep
:
\hspace{2em}\fbox{\parbox{?}{Paragraph text}}
What would you suggest?
Best Answer
Here are two options that provide similar layout.
framedparA
uses acenter
environment to set the contents horizontally inside a\parbox
of required width.framedparB
usesmdframed
and allows to be broken across the page boundary.Of course, with
mdframed
there's far more fancy stuff that can be added...