As in polyglossia, if you create abjad numbering say by:

\documentclass{article}
\usepackage{hyperref}
\usepackage{etoolbox}
\makeatletter
\providecommand*{\...@warning}[1]{%
   \PackageWarning{some dummy package}%
   {#1}}
\ifcsdef{abjad}{}{%
\def\abjad#1{%
\ifnum#1>1999 \...@warning{illegal value (#1) for abjad numeral} {#1}
\else
  \ifnum#1<\...@\space\xpg@warning{Illegal value (#1) for abjad numeral}%
  \else
    \ifnum#1<10\expandafter\...@num@i\number#1%
    \else
      \ifnum#1<100\expandafter\...@num@ii\number#1%
      \else
        \ifnum#1<\...@m\expandafter\abj@n...@iii\number#1%
        \else
          \ifnum#1<\...@m\expandafter\abj@n...@iv\number#1%since #1<2000, we
must have 1000
          \fi
        \fi
      \fi
    \fi
  \fi
\fi
}
\def\ab...@zero{}
\def\...@num@i#1{%
  \ifcase#1\or الف\or ب\or ج\or د%
           \or ه\char"200D\or و\or ز\or ح\or ط\fi
  \ifnum#1...@\abjad@zero\fi}
\def\...@num@ii#1{%
  \ifcase#1\or ی\or ک\or ل\or م\or ن%
           \or س\or ع\or ف\or ص\fi
  \ifnum#1...@\fi\abj@n...@i}
\def\...@num@iii#1{%
  \ifcase#1\or ق\or ر\or ش\or ت\or ث%
            \or خ\or ذ\or ض\or ظ\fi
  \ifnum#1...@\fi\abj@n...@ii}
\def\...@num@iv#1{%
  \ifcase#1\or غ\fi
  \ifnum#1...@\fi\abj@n...@iii}
}
   \l...@latinalph\@alph%
   \l...@latinalph\@Alph%
   \l...@alph\abjad%
   \l...@alph\abjad%

\makeatother
\begin{document}
\tableofcontents
\section{Test}
\newpage
\appendix
\section{Another Test}
\end{document}

Then the section entry in the toc, does not link to the section in the
appendix or if it links, it links to the first section. Could you please
explain why this happens and if there could be a clean solution to this
situation.

-- 
Best wishes,
Vafa Khalighi

--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to