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}
3
  • 1
    if you want indien-arabic digits use (\I{\ref{eq:label}}) if you want arabic ones (\textLR{\ref{eq:label}})
    – touhami
    Commented Jun 28, 2015 at 0: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
    Commented Jun 28, 2015 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
    Commented Jun 30, 2015 at 17:07

1 Answer 1

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}}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .