[XeTeX] Linked Table of Contents with Polyglossia and hyperref etc

Dr. Hisham Hamed hisham.hamed at wasiela.com
Sun Apr 13 17:06:10 CEST 2014


Greetings all,

I am trying to produce an Arabic document with a hyperlinked table of 
contents.

Without hyperref, Xelatex works fine. When I declare the hyperref 
package, start to get error messages.
I can't get cleveref to produce a hyperlinked table of contents either.

Here is the code:

\documentclass[a4paper,12pt, openany]{report}
\usepackage{polyglossia}
%\usepackage{cleveref}
%\usepackage{hyperref}

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{3}

\setmainlanguage{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Amiri} % or any other font

\begin{document}

\tableofcontents

\chapter{الرئيس}
\section{مساعده}
\subsection{مساعده}
\subsubsection{النص اﻷول}
قال حافظ إبراهيم\\

\begin{itemize}
\item النقطة الأولى
\item النقطة الثانية
\end{itemize}

\begin{enumerate}
\item الوجه الأول
\item الوجه الثاني
\end{enumerate}

\end{document}





More information about the XeTeX mailing list