I am getting the error message below, my compiler is LuaLaTeX:
My file has a large amount of text, figures and references (ref count more than 250). From the particular position in the file showing the error, the TeX capacity exceeded exactly from ref 44. When closing the \end{thebibliography}\end{document}
before the ref 44, the file is compiling and pdf is produced, when using tagpdf
, I am getting the error. The code below has been copied a little bit from my file for MWE purposes (it will compile, but when compile file it is not compiling):
MWE:
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{testphase=phase-II}
\documentclass{book}
\usepackage{xpatch}
\usepackage{tagpdf}
\tagpdfsetup{tabsorder=structure,%
uncompress,%
activate-all,%
%add-new-tag=Title/P,%
interwordspace=true,%
%add-new-tag = Table/TNote/P,
%add-new-tag = FNote,
%tagunmarked=false,
add-new-tag = Footnote/Note,
%%,paratagging,log=v,show-spaces
newattribute = {TH-col}{/O /Table /Scope /Column}%
}
\usepackage{enumitem,xpatch}
\renewenvironment{itemize}
{\if@keypoints\abovelistskipi0pt\belowlistskipi0pt\itemleftmargin0pt\hsize\abswidth\fi\begin{iitemize}}
{\end{iitemize}}
\renewenvironment{enumerate}{\begin{eenumerate}}{\end{eenumerate}}
\AddToHook{env/description/begin}{\par\tagstructbegin{tag=L}}
\AddToHook{env/description/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
\makeatletter
\ExplSyntaxOn
%We detect is this is the first or a follow up item where we have to end a structure first:
\newcommand\tag@enit@format@preset[1]{%
\str_if_eq:eeTF { \prop_item:cn { g__tag_struct_\g__tag_struct_stack_current_tl _prop }{S} }{/L}
{
%\typeout{BEGIN~OF~LIST}
}
{%\typeout{NEXT ITEM}
\tagstructend\tagstructend} % for the LBody/LI
\tagstructbegin{tag=LI}
\tagstructbegin{tag=Lbl}
\tagmcbegin{tag=Lbl}
#1
\tagmcend
\tagstructend
\tagstructbegin{tag=LBody}
}
\ExplSyntaxOff
\xpatchcmd\enit@preset{\@firstofone}{\tag@enit@format@preset}{}{\fail}
%close mc from paratagging and reopen ...
\xpatchcmd\@item{\box\@labels}{\tagmcend \box\@labels \tagmcbegin{tag=P}}{}{\fail}
\makeatother
\def\refauthor#1{#1}
\RequirePackage[%draft=false,
pdfpagelayout={OneColumn},pdffitwindow=true,pdfstartview={FitH 800},pdfdisplaydoctitle=true,pdfborderstyle={/S/U/W 0},breaklinks=true,bookmarks=true, bookmarksnumbered,bookmarksopen=true, colorlinks=true, hyperfootnotes=true,hyperindex=false,linkcolor=blue,citecolor=blue,urlcolor=blue,linktoc=all,hyperfootnotes=false,hyperindex=false,pdfview={XYZ null null 1.00}]{hyperref}
\begin{document}
\begin{thebibliography}{[100]}
\bibitem[{[43]}]{cit0043}{}\hypertarget{2220363:cit0043}{}\refauthor{Kirilyuk A}, \refauthor{Kimel AV}, \refauthor{Rasing T}. Laser-induced magnetization dynamics and reversal in ferrimagnetic alloys. Rep Prog Phys. \hyperlink{backref:cit0043}{2013};76:026501.
%
\bibitem[{[44]}]{cit0044}{}\hypertarget{2220363:cit0044}{}\emph{CAN the U.S. COMPETE in basic energy sciences?},
\href{https://science.osti.gov/-/media/bes/pdf/reports/2021/International_Benchmarking-Report.pdf%20}
{https://{\allowbreak}science.{\allowbreak}osti.{\allowbreak}gov/{\allowbreak}-{\allowbreak}/{\allowbreak}media/{\allowbreak}bes/{\allowbreak}pdf/{\allowbreak}reports/{\allowbreak}2021/{\allowbreak}International\_Benchmarking-{\allowbreak}Report.{\allowbreak}pdf\%20}(\hyperlink{backref:cit0044}{2021})
\end{thebibliography}
\end{document}