1

When hyperref is loaded I receive the following error:

TeX capacity exceeded, sorry [input stack size=5000].

However, when I remove hyperref package it compiles successfully. I traced it back and found that \maketitle causes the error but don't know how to fix it. Is there any way to use hyperref in my setup.

Code:

    %!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}
3
  • 1
    Hyperref does nothing for printed documents (except change colors). Why would you use it with IEEEtran? Commented Jan 7, 2018 at 18:06
  • To add links to the citations and referencing Commented Jan 7, 2018 at 18:10
  • Citations and references do not require hyperlinks. See the url package. Commented Jan 7, 2018 at 21:36

1 Answer 1

2

I found a similar issue with other document class that was answered by @egreg here

The issue was as I expected with \maketitle.

Working code:

 %!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}

Result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .