什么时候超链接加载时出现以下错误:
TeX 容量超出,抱歉 [输入堆栈大小=5000]。
然而,当我删除超链接软件包编译成功。我追溯了一下,发现\maketitle导致错误,但不知道如何修复。有没有办法使用超链接在我的设置中。
代码:
%!TEX TS-program = xelatex
\documentclass[journal,transmag,]{IEEEtran}
\usepackage[hyphens]{url}
\usepackage{hyperref}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script = Arabic]{Amiri} % Replace 'Simplified Arabic' with a font from your system
\begin{document}
\title{A Very Nice Title}
\author{\IEEEauthorblockN{
John Doe\IEEEauthorrefmark{1}}%,~\IEEEmembership{Member,~IEEE}
\IEEEauthorblockA{\IEEEauthorrefmark{1}My address}
% <-this % stops an unwanted space
\thanks{Manuscript received mm dd, 20xx; revised mm dd, 20xx.
}
}
% The paper headers
\markboth{headers...}%
{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Transactions on Magnetics Journals}
\IEEEtitleabstractindextext{%
\begin{abstract}My Abstract.\end{abstract}
% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Key 1, Key 2
\end{IEEEkeywords}}
\maketitle
\IEEEdisplaynontitleabstractindextext
% \IEEEdisplaynontitleabstractindextext has no effect when using
\IEEEpeerreviewmaketitle
\section{Introduction}
English Text
\begin{Arabic}
السَلَامُ عَلَيكُمْ
\end{Arabic}
\end{document}
答案1
我发现其他文档类也存在类似的问题,@egreg 对此进行了回答 这里
该问题正如我预期的那样,与 \maketitle 有关。
工作代码:
%!TEX TS-program = xelatex
\documentclass[journal,transmag,]{IEEEtran}
\usepackage[hyphens]{url}
\let\keptmaketitle\maketitle %<------------ADDED THIS LINE
\usepackage{hyperref}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script = Arabic]{Amiri} % Replace 'Simplified Arabic' with a font from your system
\let\maketitle\keptmaketitle %<------------ADDED THIS LINE
\begin{document}
\title{A Very Nice Title}
\author{\IEEEauthorblockN{
John Doe\IEEEauthorrefmark{1}}%,~\IEEEmembership{Member,~IEEE}
\IEEEauthorblockA{\IEEEauthorrefmark{1}My address}
% <-this % stops an unwanted space
\thanks{Manuscript received mm dd, 20xx; revised mm dd, 20xx.
}
}
% The paper headers
\markboth{headers...}%
{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Transactions on Magnetics Journals}
\IEEEtitleabstractindextext{%
\begin{abstract}My Abstract.\end{abstract}
% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Key 1, Key 2
\end{IEEEkeywords}}
\maketitle
\IEEEdisplaynontitleabstractindextext
% \IEEEdisplaynontitleabstractindextext has no effect when using
\IEEEpeerreviewmaketitle
\section{Introduction}
English Text \textarabic{مَرحَبَاً}
\begin{Arabic}
السَلَامُ عَلَيكُمْ
\end{Arabic}
\end{document}
结果: