TeX 容量超出,抱歉

TeX 容量超出,抱歉

我收到以下错误消息,我的编译器是 LuaLaTeX:

在此处输入图片描述

我的文件包含大量文本、图表和参考文献(参考文献数量超过 250)。从显示错误的文件中的特定位置来看,TeX 容量恰好超出了参考文献 44。当在\end{thebibliography}\end{document}参考文献 44 之前关闭时,文件正在编译并生成 pdf,当使用时tagpdf,我收到错误。以下代码已从我的文件中复制了一点以用于 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}

答案1

tagpdf 的文档明确指出,这是实验和开发代码,并不适合生产,至少不适用于大型复杂的文档。

如果您仍然想使用它:LaTeX 中的标记目前正在不断发展。因此,请确保您拥有真正最新的 texlive,然后尝试使用lualatex-dev(!) 和以下序言进行编译(清理 hyperref 选项,那里有冲突的设置):

\DocumentMetadata{testphase=phase-III}

\documentclass{book}

\tagpdfsetup{tabsorder=structure,%
 newattribute = {TH-col}{/O /Table /Scope /Column}%
}

\def\refauthor#1{#1}

\RequirePackage[%draft=false,
pdfpagelayout={OneColumn},
pdffitwindow=true,
pdfstartview={FitH 800},
pdfdisplaydoctitle=true,
pdfborderstyle={/S/U/W 0},
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}

如果仍然出现错误,您将必须制作一个最小示例来演示该问题。

相关内容