[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#458059:



Dear TeX(-k) people, dear pdfTeX team,

late last year Norbert Preining already asked on the TeXk list about a
problem encountered in Debian, namely a TeX capacity exceeded error on
grouping levels. Nobody could help back then, but now someone started to
analyse this further (many thanks, Stijn!).  So could you please (again)
have a look?

It seems the value is hardcoded in the sources,

"Stijn van Drongelen" <tinctorius@gmail.com> wrote:

> The issue seems to have its roots in build/source/texk/web2c/tex.web,
> line 5925-5930:
>
> if cur_level=max_quarterword then overflow("grouping levels",
> @:TeX capacity exceeded grouping levels}{\quad grouping levels@>
>   max_quarterword-min_quarterword);
>   {quit if |(cur_level+1)| is too big to be stored in |eqtb|}
> cur_boundary:=save_ptr; incr(cur_level); incr(save_ptr); cur_group:=c;
> end;
>
> So if 'cur_level' exceeds the maximum quarterword size, TeX dies.
> These constants are defined in 2411-2414:
>
> @d min_quarterword=0 {smallest allowable value in a |quarterword|}
> @d max_quarterword=255 {largest allowable value in a |quarterword|}
> @d min_halfword==0 {smallest allowable value in a |halfword|}
> @d max_halfword==65535 {largest allowable value in a |halfword|}
>
> And on line 2409, it says: "The values defined here are recommended
> for most 32-bit computers."
>
> I use amd64. I can deal with max_quarterword=65535 etc.
>
> Why aren't these quarterword/halfword bounds configurable?

There is a configuration variable nest_size level, but it doesn't seem
to help in this case: The attached file gives an error

! TeX capacity exceeded, sorry [grouping levels=255].

although my texmf.cnf has nest_size=500.

Should/can we change max_quarterword, or are there side effects?  Or
should the grouping levels instead use halfword? Or would you like to do
it in a completely different way?  This is a real life problem which
affects building the PostgreSQL documentatin.

Many thanks in advance, Frank


\documentclass{article}
\usepackage{bm}
\def\makebm#1${\bm{#1}$}
\renewcommand*\descriptionlabel[1]{%
  \hspace\labelsep
  {\everymath{\makebm}\normalfont\bfseries #1:}%
}
\begin{document}
\begin{description}
\item[$a^{b^c}$] $a^{b^c}$
\end{description}
\end{document}





-- 
Frank Küster
Debian Developer (teTeX/TeXLive)

Reply to: