[OS X TeX] Change in beamer ?

Herbert Schulz herbs at wideopenwest.com
Thu Jun 5 04:19:18 CEST 2014


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. This is both with TeX Live 2013 (fully updated before the freeze) and TeX Live 2014 pretest fully updated.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list