6

I heard, that some resources (or maybe all) are limited. The number of lengths seems to be limited to 2^8 (1 byte). Are there any other limited resources and if yes, which are these or where can this be looked up?

  • 3
    if you are getting an error from \newlength after 256 lengths then you have an old version of latex and should update. – David Carlisle May 28 '16 at 22:20
  • @DavidCarlisle I dont get an error yet, but you have mentioned this and it might be important, because I might generate up to 3000 macros in my package respectively the users of it. This could be limited via edefs to 1/3. But I definitely have to know what the limitations are. Otherwise one day I finish tinkering and realize: Everything wrong. Memory size exceeded. -> Therefore I ask better before than after. – MaestroGlanz May 28 '16 at 23:04
  • 1
    the limits on number of macros are set in texmf.cnf and shown at the end of the log of every run eg 4647 multiletter control sequences out of 15000+600000 means on a recent answer I'd used less than 5000 out of 615000 available. – David Carlisle May 28 '16 at 23:08
  • many times, memory size and like errors are caused by other user problems (such as infinite recursion or weird macros) and not really LaTeX problems. the error messages can be misleading. and, as david noted, make sure to use a latex version that was released this decade. – ivo Welch May 29 '16 at 4:39
  • 1
    Nowadays (whith a modern engine like LuaTeX), in general you worry too much if you think about resource problems. – Reinstate Monica - M. Schröder May 29 '16 at 17:36
13

all registers have a fixed number, counts, lengths, (dimen and skips) boxes there are 2^8 in classic TeX but almost all formats use etex where this is raised to 2^15. xetex also allows 2^15 and luatex 2^16.

Other fixed allocations are math families (16 in classic tex and etex, 256 in luatex and xetex).

The TeXBook or TeX by topic have the details, along with the manuals for etex, xetex or luatex for the extended behaviour.

there are other fixed resourses (other than luatex which uses dynamic memory) total memory, total number of control sequences, etc but these days these limits rarely affect normal documents.

| improve this answer | |
  • 1
    The end of the logfile (Here is how much of TeX's memory you used) as mentioned in the comments is very helpful. I just mention it again for future googlers. – MaestroGlanz May 29 '16 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.