[OS X TeX] Change in beamer ?

Josep Maria Font jmfont at ub.edu
Thu Jun 5 11:48:20 CEST 2014

On 5 Jun 2014, at 04:19, Herbert Schulz <herbs at wideopenwest.com> wrote:

> On Jun 4, 2014, at 5:57 PM, Ross Moore <ross.moore at mq.edu.au> wrote:
>> Hello Maria, and others,
>> On 05/06/2014, at 8:15 AM, Josep Maria Font wrote:
>>> As to Victor Ivrii's suggestion
>>>> \usepackage{etex}
>>> yes, this solves the problem, and further puzzles me, because, like Herb, I thought the present versions of TeX were actually etex... but now I recall a similar memory problem (not with beamer) a colleague had when editing a book, and which was solved also by loading etex...
>>> Any ideas on this last issue ?
>> Certainly we are using  etex  already, but the LaTeX macros
>> that allocate the extra \count  and \dimen  registers
>> need to be adapted to the increased number available,
>> and required to be used by Xy-pic.
>> Beamer also uses a lot, so you certainly need access to
>> the extra registers when both are loaded.
>> Here is what  etex.sty  actually does, redefining \alloc@ .
>> viz.
>>>>> %% We don't change the LaTeX definitions of \newcount, etc., but the
>>>>> %% \alloc@ macro doing the actual work is redefined.
>>>>> %% When the normal register pool for \count, \dimen, \skip, \muskip,
>>>>> %% \box, or \toks registers is exhausted, we switch to the extended pool.
>>>>> \def\alloc@#1#2#3#4#5%
>>>>> {\ifnum\count1#1<#4% make sure there's still room
>>>>>   \allocationnumber\count1#1
>>>>>   \global\advance\count1#1\@ne
>>>>>   \global#3#5\allocationnumber
>>>>>   \wlog{\string#5=\string#2\the\allocationnumber}%
>>>>> \else\ifnum#1<6
>>>>>   \begingroup \escapechar\m at ne
>>>>>   \expandafter\alloc@@\expandafter{\string#2}#5%
>>>>> \else\errmessage{No room for a new #2}\fi\fi
>>>>> }
>>>>> %% The \expandafter construction used here allows the generation of
>>>>> %% \newcount and \globcount from #1=count.
>>>>> \def\alloc@@#1#2%
>>>>> {\endgroup % restore \escapechar
>>>>> \wlog{Normal \csname#1\endcsname register pool exhausted,
>>>>>   switching to extended pool.}%
>>>>> \global\expandafter\let
>>>>>   \csname new#1\expandafter\endcsname
>>>>>   \csname glob#1\endcsname
>>>>> \csname new#1\endcsname#2%
>>>>> }
>> It is that fallback to  \alloc@@  that gives access
>> to more registers.
>> Here is the original \def\alloc@{...} in  latex.ltx :
>>>>> \def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
>>>>> \ch at ck#1#4#2% make sure there's still room
>>>>> \allocationnumber\count1#1%
>>>>> \global#3#5\allocationnumber
>>>>> \wlog{\string#5=\string#2\the\allocationnumber}}
>>>>> \gdef\ch at ck#1#2#3{%
>>>>> \ifnum\count1#1<#2\else
>>>>>  \errmessage{No room for a new #3}%
>>>>> \fi}
>>> Best,
>>> JMaF
>> Hope this helps,
>>      Ross
> Howdy,
> I just added the xy package to a beamer test file I use (for testing the TeXShop latexmk engines) and I still don't have to explicitly load the etex package to avoid \dimen allocation errors. I need an example where that needs to be done.

Here is one, using three of my most used packages
Hola, m\'on\,!

After experimenting, it is clear this is simply an issue of not enough room for \dimen s, because the problem disappears in the following cases:
- just deleting *any one* of the three packages;
- just deleting the [all] optional argument to xy; and
- just uncommenting the etex package.
Moreover, by changing the order in which the packages are loaded, the problem appears when loading the last of the three. Hence, this is not xy-specific either.

Since with beamer 3.32 this does not happen, I assume that a significant number of \dimen s were added in 3.33.

Finally, on the e-tex issue: Ross' explanation is clear, but still I don't understand that etex has to be added to modern TeX runs; I probably misunderstood what they say that etex is already incorporated. Actually, on the UK TeX FAQ <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=etex> it says:

> current TeX distributions are delivered with most formats built with an e-TeX-based system


> The extensions range from the seemingly simple (increasing the number of available registers from 256 to 32768) ...

but it seems this is not enough, and to access some of the e-TeX functionalities in LaTeX one has to use the e-tex *package* ?



Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.

More information about the macostex-archives mailing list