latex2e 札记 -- No room for a new ‘thing’

来源:互联网 发布:众途汽修软件 编辑:程序博客网 时间:2024/06/04 18:26

Latex2e 经常碰到一个 error: No room for a new ‘thing’,下述网址提供了一个解决方法。

latex2e– No room for a new ‘thing’

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 “registers” 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 testing TeX implementations).

If you fill up one of these register arrays, you get a TeX error message saying

! No room for a new .
The \things in question may be \count (the object underlying LaTeX’s \newcounter command), \skip (the object underlying LaTeX’s \newlength command), \box (the object underlying LaTeX’s \newsavebox command), or \dimen, \muskip, \toks, \read, \write or \language (all types of object whose use is “hidden” in LaTeX; the limit on the number of \read or \write objects is just 16).
There is nothing that can directly be done about this error, as you can’t extend the number of available registers without extending TeX itself. Of course, e-TeX, Omega and LuaTeX all do this, as does MicroPress Inc’s VTeX.

The commonest 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 epsf problems).

However, sometimes one just needs more than TeX can offer, and when this happens, you’ve just got to work out a different way of doing things. An example is the difficulty of loading PicTeX with LaTeX. The more modern drawing package, pgf with its higher-level interface TikZ is also a common source of such problems.

In such cases, it is usually possible to use the e-TeX extensions (all modern distributions provide them). The LaTeX package etex modifies the register allocation mechanism to make use of e-TeX’s extended register sets. Etex is a derivative of the Plain TeX macro file etex.src, 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.

It is possible that, even with etex loaded, you still find yourself running out of things. Problems can be caused by packages that use large numbers of “inserts” (inserts are combinations of counter, box, dimension and skip registers, used for storing floats and footnotes). Morefloats does this, of course (naturally enough, allocating new floats), and footnote packages such as manyfoot and bigfoot (which uses manyfoot) can also give problems. The etex extensions allow you to deal with these things: the command \reserveinserts{n} ensures there is room for ‹n› more inserts. Hint: by default morefloats adds 18 inserts (though it can be instructed to use more), and manyfoot seems to be happy with 10 reserved, but there are ‘hard’ limits that we cannot program around — the discussion of running out of floats has more about this. It is essential that you load etex before any other packages, and reserve any extra inserts immediately:

\documentclass[…]{…}
\usepackage{etex}
\reserveinserts{28}

The e-TeX extensions don’t help with \read or \write objects (and neither will the etex package), but the morewrites package can provide the illusion of large numbers of \write objects.

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 怀孕了肾结石痛怎么办 肾结石痛得厉害怎么办 怀孕了有结石怎么办 孕期尿结石疼痛怎么办 怀孕有结石痛怎么办 肾结石痛又怀孕怎么办 怀孕肾结石疼怎么办啊 孕晚期肾绞痛怎么办 肾绞疼引起的呕吐怎么办 肾绞痛肚子胀气怎么办 iga肾炎肉眼血尿怎么办 结石疼怎么办怎么缓解 肾有问题严重怎么办 肾结石突然很疼怎么办 输尿管结石肉眼血尿该怎么办 结石引起肾绞痛怎么办 尿结石支架后尿里老有血怎么办? 结石堵在输尿管怎么办 尿路结石痛怎么办 怀孕了有肾结石怎么办 怀孕有肾结石怎么办啊 肾结石无疼血尿怎么办 胆囊胆管都结石怎么办 肾里面有肿瘤怎么办 肾癌手术后发烧怎么办 尿结石堵住尿道怎么办 尿结石不能排尿怎么办 肾癌小便有血怎么办 膀胱癌膀胱全切怎么办 怀孕了有阑尾炎怎么办 食物堵塞在食管怎么办 食物卡在食管怎么办 小孩食道卡异物怎么办 八十岁老人得了膀胱癌怎么办 肾结石引起吐血尿血怎么办 肾结石引起的尿血怎么办 食道感觉有异物怎么办 膀胱出血有血块怎么办 肾小球滤过率20怎么办 膀胱癌术后有血尿怎么办 肾病贫血怎么办吃什么