1

Unfortunately, I have a problem when using babel with arabic. When deferring to the number of an equation, the digits are reversed. In the below document when using (\ref{eq:10}) it gives (01) instead of (10).

I have tried the following without success: \renewcommand\theequation{\revarabic{equation}} where revarabic is provided by the answer https://tex.stackexchange.com/a/214613/.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE,OT1]{fontenc}
\usepackage[farsi,english,arabic]{babel}

\begin{document}
\selectlanguage{farsi} 

\begin{equation}
  \label{eq:1}
  jhjh
\end{equation}

\begin{equation}
  \label{eq:2}
  hjh
\end{equation}

\begin{equation}
  \label{eq:3}
kjk  
\end{equation}

\begin{equation}
  \label{eq:4}
kjk  
\end{equation}

\begin{equation}
  \label{eq:5}
kjk  
\end{equation}

\begin{equation}
  \label{eq:6}
kjk  
\end{equation}

\begin{equation}
  \label{eq:7}
  jhjh
\end{equation}

\begin{equation}
  \label{eq:8}
  hjh
\end{equation}

\begin{equation}
  \label{eq:9}
kjk  
\end{equation}

\begin{equation}
  \label{eq:10}
kjk  
\end{equation}

\vspace{2cm}


{\selectlanguage{english} We now use the equation:}

(\ref{eq:10})

\end{document}
Name
  • 2,816
  • 1
    if you want indien-arabic digits use (\I{\ref{eq:label}}) if you want arabic ones (\textLR{\ref{eq:label}}) – touhami Jun 28 '15 at 00:08
  • 1
    You mean \I{}\ref{eq:label}? this does not solves the problem for me. You can do what you asking for by : \let\arref\ref \renewcommand{\ref}[1]{\I{\arref{#1}}} then \ref{eq:label} will works fine – touhami Jun 28 '15 at 16:15
  • @touhami yes of course I meant \I{ ...}. I confirm that your comment solve the problem. I you like, please convert your comment to an answer, in order that I can mark it as accepted. – Name Jun 30 '15 at 17:07

1 Answers1

3

In RL mode (arabic or farsi text) numbers should by coded using

  • \I{123} to be typested in arabo-indic digits or extended arabo-indic digits.
  • \textLR{123} to be typested in arabic digits.

Here we can use (\I{\ref{eq:label}}).

We can redefine \ref command like this

\let\arref\ref
\renewcommand{\ref}[1]{\I{\arref{#1}}}
touhami
  • 19,520