1

I have a memoir document full of minipages and breakable tcoloboxes and I don't understand the interaction between the two. Sometimes my minipage contents gets pushed far beyond the bottom of the actual page. I put together a MWE below, where the blue rectangle is not shown in full. As per comments below, the problem is more with tcolorbox than memoir, but still it remains mysterious to me.

What am I doing wrong ?

\documentclass[a4paper,12pt]{memoir}

\usepackage[margin=2cm,showframe]{geometry}

\usepackage[many]{tcolorbox}
\tcbuselibrary{breakable}

\usepackage{lipsum}

\begin{document}
\lipsum[1]

\lipsum[2]

\begin{minipage}{10cm}
  \color{blue}\rule{2cm}{16cm}

  O brother were art thou ?
\end{minipage}

\begin{tcolorbox}[breakable=true]
\lipsum[4]
\end{tcolorbox}

\lipsum[5]

\end{document}

edit: add a screenshot of the resulta screenshot of the result

6
  • 3
    it breaks in the book class too. It works in article as it uses \raggedbottom. The main problem is that your box has a large depth. You could use \begin{minipage}[b] Nov 16, 2022 at 15:16
  • actually in my real use-case I found other workarounds too. But still I remain curious: what am I doing wrong ?
    – Gyom
    Nov 16, 2022 at 15:23
  • 1
    I don't think that you are doing something wrong. The tcolorbox starts on page 1 and then does lots of magic to decide if it can split or not and this seems to confuse the page builder. Open an issue at tcolorbox github. Perhaps the maintainer can do something. Nov 16, 2022 at 15:33
  • 2
    Might want to change the title and remove the memoir tag as it is not memoir related
    – daleif
    Nov 16, 2022 at 15:48
  • Thanks for your comments. Here is the github issue: github.com/T-F-S/tcolorbox/issues/200 Let's wait and see
    – Gyom
    Nov 16, 2022 at 17:16

0

You must log in to answer this question.

Browse other questions tagged .