Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Dimension too large error using multicols package

361 views
Skip to first unread message
Message has been deleted

Ulrike Fischer

unread,
Mar 17, 2015, 4:44:04 AM3/17/15
to
Am Tue, 17 Mar 2015 01:10:48 +0000 schrieb Rowland McDonnell:

> I've run into a problem when typsetting a multicolumn document using the
> multicol package. I've constructed something that won't typeset, but
> instead throws up the following error:

...

> I'd appreciate any suggestions on what I might be able to do about this.

Write Frank Mittelbach. The address is in multicol.sty.



--
Ulrike Fischer
http://www.troubleshooting-tex.de/

Axel Berger

unread,
Mar 17, 2015, 5:15:04 AM3/17/15
to
Rowland McDonnell wrote on Tue, 15-03-17 02:10:
>\begin{multicols}{2}

For two columns I've found twocolumn together with the extras from the
sttools to give better results than multicolumn. But none of these are
perfect and totally reliable.

Axel

GL

unread,
Mar 17, 2015, 11:14:33 AM3/17/15
to
Le 17/03/2015 02:10, Rowland McDonnell a écrit :
> Hello.
>
> I've run into a problem when typsetting a multicolumn document using the
> multicol package. I've constructed something that won't typeset, but
> instead throws up the following error:
>
> =====================================================================
>
> ! Dimension too large.
> \iterate ...nt@ \vsplit \mult@grightbox to\dimen@
> \global \setbox
> \count@ \v...
> l.19 \end{multicols}
>

multicolumn infinitely loops : strange that the author did not check,
with a counter, to avoid infinite loop...

Moreover, using {multicols*} instead of {multicols} (that is, the
unbalanced version of the environment), you get the third sentence
on the next page !

\documentclass[12pt,a4paper]{article}
\usepackage {etex}
\usepackage [debugshow]{multicol}

\begin{document}

\begin{multicols*}{2}
Ut wisi enim ad minim veniam\par
\columnbreak
Duis autem vel eum iriure dolor in hendrerit\par
\columnbreak
Nam liber tempor cum soluta nobis eleifend option
\end{multicols*}

\end{document}



> =====================================================================
>
> I'd appreciate any suggestions on what I might be able to do about this.
>
> Here's a short working example which shows the problem. In my original
> document, the \columnbreak commands actually make some sort of sense.
>
> =====================================================================
>
> \documentclass[12pt,a4paper]{article}
>
> \usepackage{multicol}
>
> \begin{document}
>
> \begin{multicols}{2}
>
> Ut wisi enim ad minim veniam
>
> \columnbreak
>
> Duis autem vel eum iriure dolor in hendrerit
>
> \columnbreak
>
> Nam liber tempor cum soluta nobis eleifend option
>
> \end{multicols}
>
> \end{document}
>
> =====================================================================
>
> In my original document, I've tried \raggedcolumns and I've tried
> putting a \vfill in front of each \columnbreak, none of which helps.
>
> Thanks in advance,
> Rowland.
>

jfbu

unread,
Mar 17, 2015, 12:30:22 PM3/17/15
to
Le 17/03/2015 16:14, GL a écrit :
> Moreover, using {multicols*} instead of {multicols} (that is, the
> unbalanced version of the environment), you get the third sentence
> on the next page !
>
> \documentclass[12pt,a4paper]{article}
> \usepackage {etex}
> \usepackage [debugshow]{multicol}
>
> \begin{document}
>
> \begin{multicols*}{2}
> Ut wisi enim ad minim veniam\par
> \columnbreak
> Duis autem vel eum iriure dolor in hendrerit\par
> \columnbreak
> Nam liber tempor cum soluta nobis eleifend option
> \end{multicols*}
>
> \end{document}


2 \columnbreak's with 2 columns perhaps is unexpected. Thus I tried with
3 columns and got a surprise

\documentclass[12pt,a4paper]{article}
%\usepackage {etex}
\usepackage [debugshow]{multicol}
\begin{document}

\begin{multicols*}{3}
Ut wisi enim ad minim veniam\par
\columnbreak
Duis autem vel eum iriure dolor in hendrerit\par
\columnbreak
Nam liber tempor cum soluta nobis eleifend option
\end{multicols*}

% This Hello appears on page 2 !
Hello

\end{document}

JF

jfbu

unread,
Mar 17, 2015, 12:37:15 PM3/17/15
to
Le 17/03/2015 02:10, Rowland McDonnell a écrit :
> Here's a short working example which shows the problem. In my original
> document, the \columnbreak commands actually make some sort of sense.
>
> =====================================================================
>
> \documentclass[12pt,a4paper]{article}
>
> \usepackage{multicol}
>
> \begin{document}
>
> \begin{multicols}{2}
>
> Ut wisi enim ad minim veniam
>
> \columnbreak
>
> Duis autem vel eum iriure dolor in hendrerit
>
> \columnbreak
>
> Nam liber tempor cum soluta nobis eleifend option
>
> \end{multicols}
>
> \end{document}
>
> =====================================================================
>
> In my original document, I've tried \raggedcolumns and I've tried
> putting a \vfill in front of each \columnbreak, none of which helps.
>
> Thanks in advance,
> Rowland.


You are using two \columnbreak's with only two columns, I am curious
what was the expected result ?

With \begin{multicols}{3} it works

However as I point out in another message multicols* has a strange problem
(also with 3 columns)

regards

Jean-François

GL

unread,
Mar 17, 2015, 12:59:24 PM3/17/15
to
Le 17/03/2015 17:37, jfbu a écrit :
> Le 17/03/2015 02:10, Rowland McDonnell a écrit :
>> Here's a short working example which shows the problem. In my original
>> document, the \columnbreak commands actually make some sort of sense.
>>
> You are using two \columnbreak's with only two columns, I am curious
> what was the expected result ?

\columnbreak is \penalty-\@Mv and \@Mv is 10005.
There are two possibilities :
- either \penalty-\@Mv remains in the main vertical list
after the multicol output routine, in this case, a page
break is forced at that point (behaviour of multicols*)
since -\@Mv <= -\@M [ TeX "magic" penalty ]
- either the third columnbreak should go back to the first
column, as if two multicols environments were set consecutively
(this has not been implemented... however)

> With \begin{multicols}{3} it works
>
> However as I point out in another message multicols* has a strange problem
> (also with 3 columns)

I didn't found where multicol put its final penalty that trigger this
unwanted page break...

>
> regards
>
> Jean-François

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

GL

unread,
Mar 17, 2015, 1:36:44 PM3/17/15
to
Le 17/03/2015 18:00, Rowland McDonnell a écrit :
> Axel Berger <Axel_...@b.maus.de> wrote:
> ======================================================
>
> \documentclass[12pt,a4paper]{article}
>
> \usepackage{cuted}
>
> \begin{document}\twocolumn
>
> \begin{strip}
> \begin{center}\Large\bfseries
> Ut wisi enim ad minim veniam
> \end{center}
> \end{strip}

{center} makes a \list, so \topsep is added
on top. You could set \topsep =.sp or use
\centering instead.

>
> Too much vertical space at the top
> \newpage
>
> et accumsan et iusto odio dignissim
> \newpage
>
> \begin{center}\Large\bfseries
> Ut wisi enim ad minim veniam
> \end{center}
>
> Without the extra vertical space.
> \newpage
>
> et accumsan et iusto odio dignissim
> \newpage
>
> \begin{strip}
> \vspace*{-15pt}
> \begin{center}\Large\bfseries
> Ut wisi enim ad minim veniam
> \vspace*{-15pt}
> \end{center}
> \end{strip}
>
> This doesn't fix it.
> \newpage
>
> et accumsan et iusto odio dignissim
>
> \end{document}
>
> ======================================================
>
> Cheers,
> Rowland.
>
>
>

jfbu

unread,
Mar 17, 2015, 4:08:33 PM3/17/15
to
Le 17/03/2015 18:06, Rowland McDonnell a écrit :
> jfbu <NONj...@SPfreeAM.fr> wrote:
>
> [snip]
>
>> You are using two \columnbreak's with only two columns, I am curious
>> what was the expected result ?
>
> A fresh column started after each \columbreak command - starting on a
> new page if that's how the formatting goes.
>
> In my real document, I've got some pages where I want to end both
> columns early.
>
> I can use \columbreak to finish the first column on *that* particular
> page, but if I try either \columnbreak OR \newpage to end the second
> column, I run into the dimension too large error.
>
> However, I can't devise a short working example document to show that.
>
> Thanks for your reply,
> Rowland.
>

It works with \pagebreak:

\documentclass[12pt,a4paper]{article}

\usepackage{multicol}

\begin{document}

\begin{multicols}{2}

Ut wisi enim ad minim veniam

\columnbreak

Duis autem vel eum iriure dolor in hendrerit

\pagebreak

Nam liber tempor cum soluta nobis eleifend option

\end{multicols}

Hello

\end{document}

is it what you expect ?

Regards

Jean-François
Message has been deleted
Message has been deleted

GL

unread,
Mar 17, 2015, 5:33:33 PM3/17/15
to
Le 17/03/2015 21:41, Rowland McDonnell a écrit :
> jfbu <NONj...@SPfreeAM.fr> wrote:
>
>>
>> is it what you expect ?
>
> Yes, but unfortunately in my real document, using a \pagebreak instead
> of a \columnbreak still gives the dimension too large error.
>
> \newpage is no better :-(
>
> (I've not yet figured out how to construct a SHORT working example to
> show this behaviour, although I could provide a long one if that'd be
> useful)

I would like to see an exemple, even if not really minimal, with
\pagebreak or \newpage, for your first problem with \columnbreak
is not necessarily a bug : you can turn on debug info with the
\usepackage [debugshow]{multicol} option (\c@tracingmulticol is set
to 5) :

infinite loop due to :
Rejected: unprocessed forced break(s) in last column!

actually : you have 3 \columnbreaks in a 2-columns environment !

Nevertheless, this is still a bug since the error should be given,
not an infinite loop leading to a out-of range dimen.

I've tried with \newpage and \pagebreak with success. There is no
great difference between \newpage (~=\vfil \break ) and
\pagebreak (~=\break ) and i'm interested in an example...

Best regards.

GL

unread,
Mar 17, 2015, 5:52:10 PM3/17/15
to
Le 17/03/2015 21:41, Rowland McDonnell a écrit :
> GL <goua...@gmail.com> wrote:
>

cuted might be fine, but does anormal things : first it
inserts a
\vrule height\topskip width.spdepth.sp

on front of the environment. This is non-standard since \topskip
is computed from the 'prevheight' of the page contents (like
\splittopskip)

If you set \topskip to .sp you will get less space, but using
\topskip here is a typographical nonsense.

Besides, you forgot \stripsep (by def: 15ptplus2ptminus2pt, large !)

This should fix your problem (using \centering and not {center},
since {center} is a list (vertical list) and is bothered by the
infamous \vrule height\topskip...)

% --------------------------------------------------
\documentclass[12pt,a4paper]{article}

\usepackage{etex,cuted}
\usepackage [showframe]{geometry}

\begin{document}\twocolumn

\begin{center}\Large\bfseries
Ut wisi enim ad minim veniam
\end{center}

Without the extra vertical space.
\clearpage

\stripsep.sp % <- don't forget to set \stripsep to 0pt !
\begin{strip}
\centering\Large\bfseries
Ut wisi enim ad minim veniam
\end{strip}

Too much vertical space at the top
centering in play

\end{document}
% ----------------------------------------

Peter Flynn

unread,
Mar 17, 2015, 6:09:33 PM3/17/15
to
On 03/17/2015 01:10 AM, Rowland McDonnell wrote:
> Hello.
>
> I've run into a problem when typsetting a multicolumn document using the
> multicol package. I've constructed something that won't typeset, but
> instead throws up the following error:
>
> =====================================================================
>
> ! Dimension too large.
> \iterate ...nt@ \vsplit \mult@grightbox to\dimen@
> \global \setbox
> \count@ \v...
> l.19 \end{multicols}
>
> =====================================================================
>
> I'd appreciate any suggestions on what I might be able to do about this.
>
> Here's a short working example which shows the problem. In my original
> document, the \columnbreak commands actually make some sort of sense.
>
> =====================================================================
>
> \documentclass[12pt,a4paper]{article}
> \usepackage{multicol}
> \begin{document}
> \begin{multicols}{2}
> Ut wisi enim ad minim veniam
> \columnbreak
> Duis autem vel eum iriure dolor in hendrerit
> \columnbreak
> Nam liber tempor cum soluta nobis eleifend option
> \end{multicols}
> \end{document}

That looks like three columns, not two.

///Peter

Message has been deleted
Message has been deleted
Message has been deleted

Peter Flynn

unread,
Mar 18, 2015, 6:34:56 PM3/18/15
to
On 03/17/2015 11:15 PM, Rowland McDonnell wrote:
> Peter Flynn <pe...@silmaril.ie> wrote:
>
>> Rowland McDonnell wrote:
> [snip]
>>> \documentclass[12pt,a4paper]{article}
>>> \usepackage{multicol}
>>> \begin{document}
>>> \begin{multicols}{2}
>>> Ut wisi enim ad minim veniam
>>> \columnbreak
>>> Duis autem vel eum iriure dolor in hendrerit
>>> \columnbreak
>>> Nam liber tempor cum soluta nobis eleifend option
>>> \end{multicols}
>>> \end{document}
>>
>> That looks like three columns, not two.
>
> Well, yes - the idea is that the second \columnbreak starts a new page.

Ah. Multicol doesn't do that: it only starts a new page when the height
of the quantity of material accumulated (set to the fractional width
implied by the number of columns) and divided by the number of columns
(so as to make it equivalent to full-out setting) exceeds the value set
for triggering the output routine. Exactly like TeX does for normal
pages. This lets the author wanting multiple columsn simply to write and
write and write, and it will fill up pages and break them in the normal way.

If you want to end the page prematurely, I think you need to
\end{multicols} and then \clearpage\begin{multicols}{2}

I guess it would be possible to fake this up by rewriting \columnbreak
to count the number of instances of itself that it has encountered so
far within the current multicols environment, and if that exceeds the
number of columns minus 1, to issue
\end{multicols}\clearpage\begin{multicols} all by its own self.

///Peter
Message has been deleted

jfbu

unread,
Mar 19, 2015, 3:37:05 AM3/19/15
to
Le 19/03/2015 02:02, Rowland McDonnell a écrit :
> The solution to my problem was provided by Frank Mittelbach, who fixed a
> bug inside multicol.sty on Wednesday and very kindly sent me the updated
> version to try out and it works perfectly.
>
> Now, the superfluity of \columbreak commands in my document do not cause
> LaTeX to roll over and die.
>
> The version of multicol.sty I've got is not for release: Frank
> Mittelbach's going to check the package over and maybe make some other
> changes before he does that. I have it from the horse's mouth that this
> won't be before the weekend.
>
> Thanks to all for their responses,
> Rowland.

and have you gotten any news from Frank Mittelbach about the issue with
multicols* ? that one appeared more clearly as a bug, not only on the user
side,

best,

Jean-Francois

jfbu

unread,
Mar 19, 2015, 5:11:47 AM3/19/15
to
I mean that if multicols had provided a \columnbreak [n] command then
it would have been clearer that more \columnbreak's than columns
was a possibility offered to the user of multicol package

It is not clear from your explanations in this thread what exactly
FM has fixed as a result of your report : only avoiding infinite loop
or provide true functionality allowing multiple \columnbreak's ?

best

J.-F. B.

Axel Berger

unread,
Mar 19, 2015, 12:15:04 PM3/19/15
to
Peter Flynn wrote on Wed, 15-03-18 23:34:
>Ah. Multicol doesn't do that:

You may be right, but it sounds illogical to me. What if the single
instance you invoke \columnbreak happens to fall into the rightmost
column on a page?

Peter Flynn

unread,
Mar 19, 2015, 4:52:19 PM3/19/15
to
On 03/19/2015 01:02 AM, Rowland McDonnell wrote:
> Peter Flynn <pe...@silmaril.ie> wrote:
>> Rowland McDonnell wrote:
[...]
>>> Well, yes - the idea is that the second \columnbreak starts a new page.
>>
>> Ah. Multicol doesn't do that: it only starts a new page when the height
>> of the quantity of material accumulated (set to the fractional width
>> implied by the number of columns) and divided by the number of columns
>> (so as to make it equivalent to full-out setting) exceeds the value set
>> for triggering the output routine. Exactly like TeX does for normal
>> pages.
>
> Well, yes; and like normal (La)TeX, the multicols package has provision
> for ending a page/column early. In conventional LaTeX, using a \newpage
> finishes the current page early - or the current column, after a
> \twocolumn declaration.

Right. But twocolumn works radically differently from the multicol
package. As you say, the multicol documentation states:

>> The \pagebreak command (which works with the two-column option of
>> LATEX) is of no use here since it would end the collection phase of
>> multicols and thus all columns on that page.
>
> Yes, but sometimes a document requires that a page (or column) be ended
> early. It just so happens that at the moment, I'm producing a document
> that's largely a list of enumerated items and what with one thing and
> another, it's best if no item extends past a column break.

OK, that's always a problem, from the days of metal type. Sometimes you
just have to go with ragged-bottom pages, with more white-space than a
subeditor would normally permit.

>> If you want to end the page prematurely, I think you need to
>> \end{multicols} and then \clearpage\begin{multicols}{2}
>
> Ah! I hadn't thought of trying that. I just have: even that idea
> doesn't fix the problem I met with the latest released version of
> multicol.sty.

You do need to remove the extra \columnbreak. Can you post an example file?

> Frank Mittelbach suggested that \newpage should work okay without
> displaying the bug I met: alas, it does not.

Hmm. My experience is that Frank is almost always right :-)

> The solution to my problem was provided by Frank Mittelbach, who fixed a
> bug inside multicol.sty on Wednesday and very kindly sent me the updated
> version to try out and it works perfectly.

Aha :-)

> Now, the superfluity of \columbreak commands in my document do not cause
> LaTeX to roll over and die.
>
> The version of multicol.sty I've got is not for release: Frank
> Mittelbach's going to check the package over and maybe make some other
> changes before he does that. I have it from the horse's mouth that this
> won't be before the weekend.

But good news. Thanks for finding the bug.

///Peter

Message has been deleted
Message has been deleted
0 new messages