The boites package defines environments that allow page breaks inside framed boxes whose edges may be variously fancy. The bundle includes a few examples (shaded box, box with a wavy line on its side, etc).

boitecoloriee is one of those environments. It typesets its contents in a gray background color inside a framed box.

With smaller fonts the lines typeset with this environment are cut in its bottom, as can be seen with the following example:







which gives:

demonstration of the problem with the boitecoloriee environment

Notice how the second box has defective lines.

Does anybody have any idea on how to fix this?

  • 1
    Would you know from where one can obtain the package maboites.sty? A separate comment: the boites package seems to be well more than 10 years old, and figuring out some of its functionality may be difficult to achieve at this point. Have you considered trying out the mdframed package instead? From your description (and from what I can tell is provided by boites.sty) it would appear that the functionality provided by the mdframed package (or its precursor, the framed package) is perfectly suited to meeting your needs. – Mico Dec 22 '11 at 15:32
  • @Mico maboites.sty is an unpublished package I have written that implements a new and more flexible environment using boites. It is not needed in this example, so it can be removed, and I am just going to do that. – Romildo Dec 22 '11 at 16:57
  • @Mico In fact I have tried boites, framed and mdframed as options for framed boxes that can break across pages. I need such feature in a new package (pygmentex) I am writing to highlight source code using Pygments, similar to minted, but more flexible and efficient. When I tried them, boites was my choice because it had less restrictions (for instance, it can be used in the multicol environment). But mdframed is getting better and I am considering switching to it. – Romildo Dec 22 '11 at 17:08
  • Well, good luck with creating your package and with implementing some of the needed functionality via the mdframed package. – Mico Dec 23 '11 at 17:09

It seems to be a bug in boites.sty that makes wrong assumptions about how to paint the background line by line. Indeed, if you say



the lines are not cut. So it's just that when the following line is typeset, it's assumed to be too high and it covers part of the line above.

| improve this answer | |
  • I have contacted Vincent Zoonekynd, the author of boites, and he told me: I no longer maintain that package, but since it is free software, you can modify it. I think I have a fix for this issue (and others). What is the procedure in this case to update the package in CTAN? – Romildo Apr 20 '12 at 4:42

I think I have found a fix to this issue: add the following line


just before the line


in the definition of \endbreakbox in boites.sty

The \splittopskip parameter specifies the glue that TeX inserts at the top of a box resulting from a \vsplit. \splittopskip plays the same role that \topskip plays for a page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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