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.

I have tried to display Arabic numbers instead of Hindi numbers in my document. Below is my MWE.

\documentclass[a4paper,12pt]{article}

\usepackage{fontspec}
\usepackage{fancyhdr}
\usepackage[pdfauthor={Yousef Raffa},pdftitle={Translation of The ARRL LoTW Registration Instructions in Arabic}]{hyperref}
\hypersetup{
    colorlinks=true,
    citecolor=black,
    filecolor=black,
    linkcolor=YellowOrange,
    urlcolor=Maroon
}

\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{graphicx}
\graphicspath{ {./img/} }
\usepackage{makeidx}
\makeindex

\usepackage{polyglossia}

\setmainlanguage{arabic}
\setotherlanguage{english}

\setmainfont[Ligatures=TeX,Numbers=OldStyle,Mapping=arabicdigits]{Amiri}
\setsansfont[Script=Arabic,Scale=1.5,Mapping=arabicdigits,Numbers=OldStyle]{Amiri}
\setmonofont{Courier New}
\newfontfamily\arabicfont[Script=Arabic,Scale=1,Numbers=OldStyle]{Amiri}


\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.
\renewcommand{\sectionmark}[1]{%
    \markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
    \markright{\thesection\ #1}}
\fancyhf{}  % delete current header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % space for the rule
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers on plain pages
  \renewcommand{\headrulewidth}{0pt} % and the line
}
% Setting newcommands
% \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
% \renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}

% Title and Author data

\title{ترجمة لتعليمات التسجيل في دفتر سجلات العالم \textenglish{ARRL LoTW}}

\author{\emph{ترجمة\thanks{هذا المكان مخصص}: }يوسُف عَدنَان رَفـَّـه -    \textenglish{HZ1YR} \\ \\
\href{http://www.HZ1YR.com}{\textenglish{HZ1YR.com}}}
\date{10 فبراير 2013م}



% Beginning of document
\begin{document}
\maketitle
\thispagestyle{empty} % No page number on 1st page

% Table of Contents
\newpage
\tableofcontents
\newpage


\begin{center}
\includegraphics{LOTW_Banner.eps}
\end{center}

% Abstract/Summary
\begin{abstract}
هذه الوثيقة عبارة عن ترجمة للخطوات وطريقة التسجيل في دفتر سجلات العالم \textenglish{Logbook of The World (LoTW)}\footnote{دفتر سجلات العالم يقصد به \textenglish{Logbook of The World} أو ما يُعرف اختصارا بـ \textenglish{LoTW}.} الموجودة على \href{http://www.arrl.org/}{موقع \textenglish{\footnote{إتحاد نواب الراديو الأمريكي \textenglish{American Radio Relay League}}ARRL}} والذي يختص بتوثيق الإتصالات \textenglish{QSO\index{QSO}s} بين الهواة بطريقة آمنة و محمية ويستخدمها معظم الهواة المحترفين.\\
حاولت تبسيط الترجمة والخطوات لتكون سهلة وواضحة للجميع قدر الإمكان ولكن إن أخطأت فمن نفسي وأرجوا أن تستميحوا لي العذر وتراسلوني عبر الموقع الموجود في أول صفحة أسفل العنوان.
\\
\begin{flushleft}
\textenglish{\textbf{Disclaimer:} This document is a personal effort by   \emph{HZ1YR} in translating ARRL's article on how to register for LoTW. All images are \copyright copyrighted to ARRL.}
\end{flushleft}

\end{abstract}

\end{document}

I think this is why it is also breaking my index and stopping it from being printed in the document. Here is my LoTW.ilg content

This is makeindex, version 2.15 [TeX Live 2012] (kpathsea + Thai support).
Scanning input file LoTW.idx...
!! Input index error (file = LoTW.idx, line = 1):
   -- Illegal page number ٥.
!! Input index error (file = LoTW.idx, line = 2):
   -- Illegal page number ٥.
done (0 entries accepted, 2 rejected).
Nothing written in LoTW.ind.
Transcript written in LoTW.ilg.
share|improve this question

1 Answer 1

up vote 6 down vote accepted

I assume by “Hindi numbers” you mean eastern Arabic numerals, in this case you can use numerals=maghrib option as explained in §5.1 of pologlossia manual. You shouldn’t also be using Mapping=arabicdigits font option, as it has the exact same effect you don’t want (and Amiri does not have old style numbers yet, so that option has no effect).

\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}

\setmainfont[Ligatures=TeX]{Amiri}
\setsansfont[Ligatures=TeX,Script=Arabic,Scale=1.5]{Amiri}
\setmonofont{Courier New}
\newfontfamily\arabicfont[Script=Arabic,Ligatures=TeX]{Amiri}
share|improve this answer
    
Thank you so much for such great help Khaled. This is exactly what I was looking for and now my index is also working fine :) –  HZ1YR Feb 17 '13 at 17:54

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.