7

I just added \usepackage{tikz}, and I got the "No room for new \dimen" error, which I was able to fix (I think) by just including the etex package as suggested at the link.

However, a different part of document is now giving errors. My document uses the program library, and I get this bad character error code in a style file that belongs to it. If I get rid of the tikz and etex libraries (and comment out my tikz figure code), the document compiles fine.

Is there something that can be done about this?

2 Answers 2

6

program uses \chardef to store the current "allocationnumber". This is not compatible with etex. It breaks as soon as more than 256 dimen are allocated:

\documentclass[]{article}

\usepackage{etex,ifthen}
\makeatletter
\@tempcnta=0
\whiledo{\@tempcnta<300}{%
\newdimen\mydimen
\advance\@tempcnta by 1}


\usepackage{program}
\begin{document}
abc
\end{document}

That's a bug, so make a bug report.

2
1

Since this is a bug (as Ulrike Fischer's answer says), there may be no way to fix this at the moment.

I managed to work around it by using the algorithmic package instead of the program package. This may be far from ideal if you prefer program's style though, but its good enough for me.

1
  • perhaps try to load program earlier: if it is loaded early enough the allocation number will still be small enough to fit in a \char. [For some reason I can't get \usepackage{program}\usepackage{tikz} to work in that order, but loading etex,tikz,program in that order seems to work. Jun 25, 2011 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .