This is a mixture of very unsuitable input ;-) and a deficiency of multicol. Multicol was originally designed for text balancing and the algorithm makes some assumptions based on this. One of the assumption is that the galley material to cut the columns from has a suitable number of breakpoints to allow for this and inparticular to allow for balancing. Now your example has two properties:
- there are very few break points
- the material nevertheless would fit onto a single page (if it could be broken). The latter can be see when one replaces the second
\drawbox by 2 boxes with
15em each. Then suddenly everything balances nicely and still fits onto the page.
Now the balancing algorithm roughly works as follows:
- It measures the whole galley to balance and from that value it deduces a start value for cutting columns of. That start point can be influenced, but that would not help here.
- It then cuts off the columns and the last one receives all leftover material. It then checks if the height of the last column is higher than that of the first column and if so rejects the solution.
- It also rejects the current trial if any of the columns have a very high badness (customizable).
- It also rejects the trial if there have been columnbreaks that were not honored.
- If the trial was successful the value found will be used, not it will be increased by one point and the algorithm repeats.
If the final value is larger than the available space then multicol attempts to recover by squezing all columns into the available space. With normal text columns that is likely to succeed, as there is usually some shrinkability on the page and with enough breakpoints in the galley the ammount of excess is not likely to be high either.
Applied to this example
On this examble this approach of course fails as the algorithm loops until the column height is large enough to hold two boxes in the first column (smaller cutting values will always make the second column too large). And by the time this happens the column size is so far off from the available space that no squeezing (even if there would be anything to squeeze) would help.
A manual solution to resolve this problem would be to enter an explicit page breaks into the source, i.e.,
so that multicol would stop gathering data and this would be then produced as a normal page. Hower this is certainly labor intensive and would need changing whenever the document would change.
An alternative would be to use
multicols* but that again has the big drawback that then you don't have balancing at all and thus any text following the third
\drawbox would then be on the next page and not (as it could ) continue on the same.
Multicol deficiency (?)
Now one can argue that if multicol does its balancing and finds a solution like the one in the above example it should really reject that one too. But what should it then do?
One possibility would be to conclude that balancing wasn't the right approach after all and instead first cuts another "normal" page and then does its balancing on the remaining material. Again for this particular example this would work pretty well. However, if you look at the following example the result would be at least questionable:
With the current algorithm this will result in one (slightly overfull) page with six lines in each column, while with an algorithm that rejects such balancing it would result in 2 pages with a single line in every column on the second page.
So right now I'm not sure what the best approach is here. Perhaps this calls for another parameter such as
\balancingoverflow that holds the amount that the columns in balancing are allowed to get "overfull".
In any case, I do have a proto-type written last night that does this reject and if anybody wants to play around with it, drop me an email at my "latex-project.org" address.
I have decided to implement this new feature using the parameter
\maxbalancingoverflow with a default of 12pt. The new version also corrects the algorithm for right to left typesetting. It can be obtained from the LaTeX2e SVN sources: multicol.dtx for those who want to test it out right now. With the next release of LaTeX2e it will then show up on CTAN.