clv3 和 hyperref 衝突 TeX 容量超出,抱歉

clv3 和 hyperref 衝突 TeX 容量超出,抱歉

我在使用以下程式碼時遇到問題,出現錯誤

超出 TeX 容量,抱歉 [輸入堆疊大小=5000]。 \開始

我搜尋了一下,發現了另一個問題這裡。這是一個類似的問題,但沒有解決我的問題。

代碼:

\documentclass{clv3}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{mathtools}
\usepackage[dvipsnames, table]{xcolor}
\usepackage[hyphens]{url}
\usepackage{fontspec}
\usepackage{hyperref}
\hypersetup{colorlinks=true,citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
\usepackage[font=footnotesize]{caption}
\usepackage{tipa}
\input{preamble_tikz.tex}
\input{figures/pgfplot_configurations.tex}

\let\numdef\relax%@@@Fix conflict with @polyglossia
\usepackage{forest}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\setmainfont[Scale=0.925]{heuristica}
\usepackage{bidipoem}
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}
\begin{document}



\author{author1}\thanks{thank1}}
\affil{aff1}
%%%
\author{author2\thanks{thank2}%
\thanks{thank3}}
\affil{aff2}
%%%
\author{author3\thanks{thank3}%
\samethanks[3]}
\affil{aff3}
%%%
\author{author4\thanks{thank4}%
\samethanks[3]}
\affil{aff4}%%%%
%%%%%%%
\author{author5\thanks{thank5}%
\samethanks[5]}
\affil{aff5}

\title{XYX}
\maketitle
\end{document}

在以下情況下可以解決該問題

  1. 刪除\usepackage{hyperref}但連結將不起作用。
  2. 刪除\maketitle命令。

經過一番搜索,我發現這可能是衝突,因為hyperref重新定義\maketitlebidi執行相同的操作。但我不知道如何解決這個問題。

在此輸入影像描述

答案1

問題在於bidi它與 的非標準定義混淆了\maketitle

如果您不打算在標頭中使用阿拉伯語,則可以透過儲存並恢復 的含義\maketitle(實際上是由 維護的副本hyperref)來解決問題。

\documentclass{clv3}
%\documentclass{article}

\let\numdef\relax

\usepackage{polyglossia}
\usepackage{fontspec}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{mathtools}
\usepackage[dvipsnames, table]{xcolor}
\usepackage[hyphens]{url}
\usepackage[font=footnotesize]{caption}
\usepackage{tipa}
\usepackage{bidipoem}
\usepackage{forest}
\usepackage{hyperref}

\makeatletter
\let\clvHyOrg@maketitle\HyOrg@maketitle
\makeatother

\hypersetup{colorlinks=true,citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}

%\input{preamble_tikz.tex}
%\input{figures/pgfplot_configurations.tex}

\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\setmainfont[Scale=0.925]{heuristica}

\makeatletter
\AtBeginDocument{\let\HyOrg@maketitle\clvHyOrg@maketitle}
\makeatother


\begin{document}

\title{XYZ}

\maketitle

\end{document}

我還重新組織了序言,使其更加一致。

相關內容