I have a large project (a book) of c 450 pages in length. I am using TexShop on OSX with LaTeX to produce a PDF.
The project builds on the first pass, but on the second pass when it is filling in the contents and cross references it fails with:
(/Users/Sean/PIC/BookLibraries/LUT.X/LUT1.asm) (/Users/Sean/PIC/BookLibraries/LUT.X/LUT2.asm ) ./subroutines.tex:130: TeX capacity exceeded, sorry [main memory size=5000000]. <argument> ...p_box \vbox_unpack:N \l_shipout_box \kern \c_zero_dim l.130 } If you really absolutely need more capacity, you can ask a wizard to enlarge me. Here is how much of TeX's memory you used: 102928 strings out of 479917 2426234 string characters out of 5882726 4999999 words of memory out of 5000000 105338 multiletter control sequences out of 15000+600000 755283 words of font info for 339 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 146i,20n,184p,2382b,2938s stack positions out of 5000i,500n,10000p,200000b,80000s ./subroutines.tex:130: ==> Fatal error occurred, no output PDF file produced!
The location of failure is in a Listing but is not remotely unusual, there are many such in the book.
I have altered the .../texlive/2020/texmf.cnf by adding
main_memory = 600000 % words of inimemory available; also applies to inimf&mp main_memory.tex = 600000 main_memory.latex = 600000 main_memory.pdflatex = 600000
but as the error still reports a main memory size of [main memory size=5000000] at failure.
Are there are other parametrs I can vary?