I was using minipage inside fbox, and got an overfull hbox. I know that it is common practice to set the width of minipage inside fbox as \dimexpr\linewidth-2\fboxrule-2\fboxsep, but the hbox is still overfull. Here is a MWE below.





enter image description here

Now I don't really get the appropriate width; that is, the maximum width without making overfull hboxes; of minipage. Can someone help me out?

++ I also see that the left and top margins of hbox in the example are quite different, but I'm not sure if this is meant to be like this since I don't know much about rule.

  • The framed package might help. Further, it can break across pages.
    – Bernard
    Jan 29, 2022 at 14:31

1 Answer 1


Turns out that I should have put % after fbox{ and end{minipage}. That somehow counts as space. After that everything works fine.

  • ends of lines are always treated as spaces you can write one two with a space between or a newline between, and either way it typesets as one two with a space between the words. Jan 29, 2022 at 14:38

You must log in to answer this question.

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