Titles and Sections are not displayed properly in Arabic. They are shown as separated characters while other parts of the document is displayed perfectly.
If I remove \setmainfont[Ligatures=TeX]{Amiri}
, nothing gets displayed when it is processed with XeLaTeX besides the text within \begin{arab}
, however, \section{التعليمات}
is still separated characters.
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\usepackage[pdfauthor={Yousef Raffa},pdftitle={Translation of The ARRL LoTW Registration Instructions in Arabic}]{hyperref}
\usepackage{arabxetex}
\setmainfont[Ligatures=TeX]{Amiri}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri}
\pagestyle{headings}
\title{ترجمة لتعليمات التسجيل في \textLR{ARRL LoTW}\\ \textLR{Translation of ARRL LoTW Registration
Instructions in Arabic}}
\author{يوسف عدنان رفـّـه\and Yousef A. Raffah}
\date{\today}
\begin{document}
\maketitle
\thispagestyle{empty} % No page number on 1st page
\begin{arab}
\section{التعليمات}
اتبع الخطوات التالية لإتمام عملية إنشاء حسابك الخاص في دفتر سجلات العالم
\textLR{Logbook of the World}.
\subsection{الخطوة الأولى - تنزيل و تهيئة البرنامج}
دفتر سجلات العالم \textLR{Logbook of the World} يستخدم برنامج اسمه \textLR{TrustedQSL} وهو
\end{arab}
\end{document}
Here is a link to the Amiri font I'm using
UPDATE:
If I \setmainfont[Ligatures=TeX]{Geeza Pro}
the output displays titles and sections properly but English characters are squares now and so are section numbers!
Best Answer
Use
polyglossia
instead ofarabxetex
and set the main document language to Arabic and the secondary language to English, for English text you will now have to use\textenglish
instead oftextLR
. Refer topolyglossia
package documentation for more details.