7

I have once again reached the "save space" limit of 80,000.

TeX capacity exceeded, sorry [save size=80000].

The last log file where I did not have this issue reports the following.

 182627 strings out of 492990
 5066323 string characters out of 39882636
 7912668 words of memory out of 12435455
 170281 multiletter control sequences out of 15000+600000
 722420 words of font info for 253 fonts, out of 8000000 for 9000
 1143 hyphenation exceptions out of 8191
 87i,19n,130p,10511b,4441s stack positions out of 5000i,500n,10000p,200000b,80000s

and

PDF statistics:
 390899 PDF objects out of 409690 (max. 8388607)
 382617 compressed objects within 3827 object streams
 5591 named destinations out of 6186 (max. 500000)
 68544 words of extra memory for PDF output out of 74296 (max. 10000000)

This is a 4,500 page index and now seems to craps out around page 530.

Questions:

  • How do I determine how much save space was used form the log file?

  • Am I correct in assuming that the cause of this is likely some change to a macro that is doing a large number of assignments in a group.

Once I can determine the actual save space I can start experimenting to try to reduce it.

10
  • How do I determine how much save space was used form the log file?

At the end of the log file:

87i,19n,130p,10511b,4441s stack positions out of 5000i,500n,10000p,200000b,80000s

it is the fifth entry. Here, the used stack size is 4441, maximum stack size is 80000.


  • Am I correct in assuming that the cause of this is likely some change to a macro that is doing a large number of assignments in a group.

Possible causes:

  • A common mistake is the mix of local and global assignments inside a group to the same macro or register.

  • Often, the first ten registers are scratch registers, e.g. \dimen0, \dimen1, ..., \dimen9. The convention of plain TeX is that register with even numbers (0, 2, 4, 6, 8) are used for local assignments and odd numbered scratch registers (1, 3, 5, 7, 9) are used for global assignments only. Scratch register numbers 255 (\count@) is used for local assignment.

7

The save stack usage is shown in the line

 87i,19n,130p,10511b,4441s stack positions out of 5000i,500n,10000p,200000b,80000s

so 4441 in this case.

the TeXBook says

You can figure out what TeX puts on the save stack by setting \tracingrestores=1; then your log file will record information about whatever is removed from the stack at the end of a group.

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.