1

Summary of problem: I get error

TeX capacity exceeded, sorry [number of destination names (dest_names_size)=1
31072]

But unable to find how to increase dest_names_size value to avoid this error.

Detailed problem

I am using TL 2021 on Linux ubuntu under windows 10 Linux subsystem. I've updated TL 2021 only just 3 days ago. The PC has 64 GB RAM.

I compile this large latex file few times per day. it takes about 25 minutes to compile to pdf. The pdf is about 23,000 pages.

Now, after adding few adding few more equations and couple of tables, suddenly lualatex is giving me an error I have never seen before.

Added \errorcontextlines=400 to preamble to be able to see more context of the error. This gives

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021)
 restricted system commands enabled.
(./index.tex
LaTeX2e <2021-11-15>

...... 10 minutes later....

(./OUTPUT/5360_Friday_November_19_2021_06_04_43_AM/index.tex

Package fancyhdr Warning: \headheight is too small (12.0pt):
(fancyhdr)                Make it at least 13.59999pt, for example:
(fancyhdr)                \setlength{\headheight}{13.59999pt}.
(fancyhdr)                You might also make \topmargin smaller to compensate:

(fancyhdr)                \addtolength{\topmargin}{-1.59999pt}.

[23189]) (./toLua.txt)

Package fancyhdr Warning: \headheight is too small (12.0pt):
(fancyhdr)                Make it at least 13.59999pt, for example:
(fancyhdr)                \setlength{\headheight}{13.59999pt}.
(fancyhdr)                You might also make \topmargin smaller to compensate:

(fancyhdr)                \addtolength{\topmargin}{-1.59999pt}.

[23190
! TeX capacity exceeded, sorry [number of destination names (dest_names_size)=1
31072].
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box
                                                  \__shipout_drop_firstpage_...

\use_ii:nn #1#2->#2

<argument> ...t@typeset@protect \hook_use:n {shipout/after}}}
                                                  \cs_set_eq:NN \protect \__...

\use_ii:nn #1#2->#2

<to be read again> \__shipout_execute_cont:
                         \endgroup \set@typeset@protect
\pbs_outputpage_orig: ...thefoot }\color@endbox }}
                                                  \global \let \if@newlist \...

\@opcol ...lumn \@outputdblcol \else \@outputpage
                                                  \fi \global \@mparbottom \...

<output> ... <-\@M \@specialoutput \else \@makecol \@opcol
                                                  \@startcolumn \@whilesw \i...

\newpage ...prevdepth \fi \fi \vfil \penalty -\@M

\clearpage ...opskip \hbox {}\fi \fi \fi \newpage
                                                  \write \m@ne {}\vbox {}\pe...

l.386315     \clearpage

 374627 words of node memory still in use:
   7001 hlist, 78 vlist, 3690 rule, 452 disc, 75 local_par, 1 dir, 82 math, 342
8 glue, 4183 kern, 213 penalty, 80 sub_mlist, 12 margin_kern, 1834 glyph, 49010
 attribute, 127 glue_spec, 49010 attribute_list, 1 temp, 2 if_stack, 2 write, 2
 pdf_annot, 26 pdf_dest, 4013 pdf_colorstack nodes
   avail lists: 1:10,2:61547,3:22514,4:30380,5:164656,6:6911,7:1158535,8:1240,9
:191326,10:89,11:10289
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on index.log.
>

googling around TeX capacity exceeded, sorry [number of destination names I found this from the year 2003 https://tug.org/pipermail/pdftex/2003-January/003464.html which says to set

   obj_tab_size = 300000

so I did. I made it 900000 so my now texmf.cnf looks like

>cat /usr/local/texlive/2021/texmf.cnf
buf_size=90000000
pool_size=9000000
main_memory=9000000
obj_tab_size=900000
>

But this did not help. I compiled the index.tex again and the error still shows on same line.

Line 386314 is just \clearpage. Nothing special.

....
\ifdefined\HCode
\noindent\rule{\textwidth}{0.4pt}
\fi
\clearpage                         <<<< line 386314
\subsection{problem 19}
\hypertarget{5361}{}

What could cause this error and any suggestion what else to try? the log file says

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

So I am asking a wizard in Latex here what I need to do.

If you need any more information, will be happy to provide. I put the index.log file in this folder https://12000.org/tmp/112021/ to download if needed. (safe folder, on my own page)

Update I found similar question miktex-configure-dest-names-size-for-pdflatex but when I did what was suggested there it did not help. It said to add dest_names_size=900000

but it did not work. Still get the same error. I wonder if texmf.cnf is being read as is, or do I need to refresh something?

>cat  /usr/local/texlive/2021/texmf.cnf
buf_size=90000000
pool_size=9000000
main_memory=9000000
obj_tab_size=900000
dest_names_size=900000

So I do not know now what else to try.

There is also a similar question How do I set the value for dest_names_size?, but no answer.

Another reference I found from 2002 says

% These are pdftex-specific.
obj_tab_size = 200000 % PDF objects
dest_names_size=300000 % destinations

And lualatex manual says

dest_names_size       pdf destination table size

Update

It is definitely a setting issue. I just removed the last 10 problems or so I added from the Latex file, and the error went away. So I just need to find how to increase this dest_names_size for lualatex. it could be that lualatex does not read value of dest_names_size from texmf.cnf file? and I need another way to update this value for lualatex?

5
  • 1
    Try \hypersetup{pageanchor=false}, I doubt that you need them. Nov 21 '21 at 8:02
  • @UlrikeFischer thanks, That fixed it. Looking at the generated pdf, it looks same as before. I do not understand what feature \hypersetup{pageanchor=false} has disabled or removed now, as I do not understand what pageanchor=false is, even though I googled it. I mean I do not know what it does in the PDF file itself as the PDF looks the same as before and all the bookmarks are there and I can click on them in the PDF file and they work.
    – Nasser
    Nov 21 '21 at 8:49
  • unrelated but why don't you fix the fancyheadr warning? Nov 21 '21 at 10:29
  • If you look in and not only at the pdf you would see that hyperref no longer creates a destination (named page.1, page.2 etc) for every page. By 23000 page this amounts to many named destinations ... Nov 21 '21 at 10:39
  • @DavidCarlisle when I have sometime, I was planning to look at these fancyheadr warnings.
    – Nasser
    Nov 21 '21 at 11:12
3

By default hyperref creates one destination per page, named page.1, page.2 etc.

These destinations are typically only needed if you produce an index or use backref where hyperref should be able to jump back from a page number.

As this is probably not the case here you can disable the generation with

  \hypersetup{pageanchor=false}

This will save you around 23000 named destination.

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.