summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-noroom.html
blob: df07fef5dac2c35430d81f99039f5bcd24b6c84d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<head>
<title>UK TeX FAQ -- question label noroom</title>
</head><body>
<h3>No room for a new &lsquo;<em>thing</em>&rsquo;</h3>
<p/>The technology available to Knuth at the time TeX was written is
said to have been particularly poor at managing dynamic storage; as a
result much of the storage used within TeX is allocated as fixed
arrays, in the reference implementations.  Many of these fixed arrays
are expandable in modern TeX implementations, but size of the
arrays of &ldquo;registers&rdquo; is written into the specification as being 256
(usually); this number may not be changed if you still wish to call
the result TeX

(see <a href="FAQ-triptrap.html">testing TeX implementations</a>).
<p/>If you fill up one of these register arrays, you get a TeX error
message saying
<blockquote>
<pre>
! No room for a new \&lt;thing&gt;.
</pre>
</blockquote><p>
The <code>\</code><code>thing</code>s in question may be <code>\</code><code>count</code> (the object underlying
LaTeX&rsquo;s <code>\</code><code>newcounter</code> command), <code>\</code><code>skip</code> (the object underlying
LaTeX&rsquo;s <code>\</code><code>newlength</code> command), <code>\</code><code>box</code> (the object underlying
LaTeX&rsquo;s <code>\</code><code>newsavebox</code> command), or <code>\</code><code>dimen</code>, <code>\</code><code>muskip</code>,
<code>\</code><code>toks</code>, <code>\</code><code>read</code>, <code>\</code><code>write</code> or <code>\</code><code>language</code> (all types of object
whose use is &ldquo;hidden&rdquo; in LaTeX; the limit on the number of
<code>\</code><code>read</code> or <code>\</code><code>write</code> objects is just 16).
<p/>There is nothing that can directly be done about this error, as you can&rsquo;t
extend the number of available registers without extending TeX
itself.
  Of course, <a href="FAQ-etex.html">e-TeX</a>, <a href="FAQ-omegaleph.html">Omega</a> and
  <a href="FAQ-luatex.html">LuaTeX</a>

all do this, as does <a href="FAQ-commercial.html">MicroPress Inc&rsquo;s VTeX</a>.
<p/>One common way to encounter one of these error messages is to have
broken macros of some sort, or incorrect usage of macros (an example
is discussed in <a href="FAQ-epsf.html">epsf problems</a>).
<p/>However, sometimes one just <em>needs</em> more than TeX can offer,
and when this happens, you&rsquo;ve just got to work out a different way of
doing things.  An example is the 
<a href="FAQ-usepictex.html">difficulty of loading PicTeX with LaTeX</a>.
The more modern drawing package, <i>pgf</i> with its higher-level
interface <i>TikZ</i> is a common problem.
<p/>In such cases, it is usually possible to use the
<a href="FAQ-etex.html">e-TeX</a> extensions (all modern distributions provide
them).  The LaTeX package <i>etex</i> modifies the register allocation
mechanism to make use of e-TeX&rsquo;s extended register sets.
<i>Etex</i> is a
derivative of the Plain TeX macro file <i>etex.src</i>, which is
used in building the e-TeX Plain format; both files are part of the
e-TeX distribution and are available in current distributions.
<p/>It is possible that, even with <i>etex</i> loaded, you still find
yourself running out of things.  Problems could be caused by packages
that use large numbers of &ldquo;inserts&rdquo; (combinations of counter, box,
dimension and skip registers, used for storing floats and footnotes).
<i>Morefloats</i> does this, of course (naturally enough,
allocating new floats), and footnote packages such as
<i>manyfoot</i> and <i>bigfoot</i> (which uses <i>manyfoot</i>
can also give problems.  The <i>etex</i> allows you to deal with
these things: the command <code>\</code><code>reserveinserts{</code><em>n</em><code>}</code> ensures there
is room for &lt;<i>n</i>&gt; more inserts.  (Hint: <i>morefloats</i> needs
18 inserts, and <i>manyfoot</i> seems to be happy with 10
reserved.)  Load <i>etex</i> before any others, and reserve the
inserts immediately:
<blockquote>
<pre>
\documentclass[...]{...}
\usepackage{etex}
\reserveinserts{28}
</pre>
</blockquote><p>
<p/>Unfortunately, e-TeX doesn&rsquo;t help with <code>\</code><code>read</code> or <code>\</code><code>write</code>
objects (and neither will the <i>etex</i> package).
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=noroom">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=noroom</a>
</body>