LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Thu, 16 Sep 2010 15:44:40 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0 1.0
Content-Transfer-Encoding: 8bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Chris Rowley <[log in to unmask]>
Parts/Attachments: text/plain (69 lines)
Hi Heiko

> Thanks for this, Heiko.  Note there is no upper range check in the code
> for \reserveinserts.

>> AFAIK there is no need:

No, not _essential_ to do anything their but then:


at a seemingly random time later will give this error:

  ! No room for a new \dimen.

which does not immediately make one think about the most recent use of \reserveinserts (or show you where that is!).

Thus to help with 'debugging weird errors' it might be useful if \reserveinserts at least put a warning into the log file: especially for those who have forgotten that eTeX still limits the number of insert classes and gives an error about \dimen when you have too many \newinsert commands.

Thus, this I like:


\outer\def \reserveinserts#1{%
        Negative number (\the\@tempcnta) for %
        \@backslashchar reserveinserts,\MessageBreak
        assuming 0%
    \count@\count10 % count
    \ifnum\count11>\count@ \count@\count11 \fi % dimen
    \ifnum\count12>\count@ \count@\count12 \fi % skip
    \ifnum\count14>\count@ \count@\count14 \fi % box
      Maximum for \@backslashchar reserveinserts is \the\count@
        \the\@tempcnta\space insertion register%
        \ifnum\@tempcnta=\@ne \space is \else s are \fi
          but no more registers can be reserved%
          but only \the\count@\space register%
          \ifnum\count@=\@ne\else s\fi\space can be reserved%

Cheers, chris

The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302)