Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

Screenshot showing the problem of separated characters Screenshot of what happens if I remove \setmainfont[Ligatures=TeX]{Amiri} Screenshot of output when \setmainfont is changed to Geeza Pro

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Use polyglossia instead of arabxetex 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 of textLR. Refer to pologlossia documentation for more details.

\documentclass[a4paper,12pt]{article}
\usepackage[pdfauthor={Yousef Raffa},pdftitle={Translation of The ARRL LoTW Registration Instructions in Arabic}]{hyperref}

\usepackage{polyglossia}
\setmainlanguage{arabic}
\setotherlanguage{english}

\setmainfont[Ligatures=TeX]{Amiri}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}

\pagestyle{headings}

\title{ترجمة لتعليمات التسجيل في \textenglish{ARRL LoTW}\\ \textenglish{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

\section{التعليمات}
اتبع الخطوات التالية لإتمام عملية إنشاء حسابك الخاص في دفتر سجلات العالم 
\textenglish{Logbook of the World}.

\subsection{الخطوة الأولى - تنزيل و تهيئة البرنامج}
دفتر سجلات العالم \textenglish{Logbook of the World} يستخدم برنامج اسمه \textenglish{TrustedQSL} وهو
\end{document}
share|improve this answer
    
Thank you @Khaled-Hosny for your suggestion and it did the job as expected. It is good to see you again :) –  HZ1YR Feb 12 '13 at 16:55
    
@HZ1YR, this is probably not the best place for such chatting, but I’m glad we have (virtually) met again :). –  Khaled Hosny Feb 12 '13 at 20:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.