6

I am using

\begin{equation} a = b \end{equation}

to write the equations in my paper. However, the problem is that the number related to each equation is not shown in the correct format like the picture wrong numbering format

How can I fix this?

This is what I have at the first of my code:

\usepackage{graphicx}
\usepackage[justification=centering]{caption}
\usepackage{float}
\usepackage{url}% typeset urls
\usepackage{times}
\usepackage{url}
\usepackage{latexsym}
\usepackage{fontspec}
\usepackage{multirow}
\usepackage{listings}
\usepackage{setspace}
\usepackage{listings}
\usepackage{fontspec}
\usepackage{amsmath}
\usepackage{polyglossia}
\usepackage{color}
\usepackage{bidi}
\newfontfamily\faFont[Script=Arabic]{Yas} 
\newenvironment{Fa}{\begin{RTL}\faFont}{\end{RTL}}
\newcommand{\fa}[1]{{\faFont\RL{#1}}}
\newcommand\Mark[1]{\textsuperscript#1}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\definecolor{darkblue}{rgb}{0.95,0.95,0.92}
\setmainlanguage{english}
\setotherlanguage{farsi}
\newfontfamily\farsifont[Script=Arabic]{Yas}
  • 1
    This is unusual. Please show us the full code. – user11232 Jun 22 '14 at 1:17
  • 1
    I'm almost sure that we have here other topic with the same problem. – Sigur Jun 22 '14 at 1:19
  • 1
    Without a minimal example, it's hard to tell, but I suspect a duplicate of bidi cause reverse parentheses in equations numbers (Obviously you may need to choose the appropriate Script for your particular language.) – Alan Munn Jun 22 '14 at 1:20
  • @Sigur I searched for it. But I couldnt find the same problem. You may give the link if you think so. – Pedram Jun 22 '14 at 1:20
  • @HarishKumar I have added part of my code that I think is needed to the quation – Pedram Jun 22 '14 at 1:25
9

This problem is due to an incompatibility between bidi and polyglossia (as alluded to in V Karen-Pahlav's answer.) bidi expects the boolean \if@Latin to be set to true for RTL scripts, but polyglossia implements a different way to encode language direction on a language by language basis.

\documentclass{article}
\usepackage{amsmath}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{farsi}
\newfontfamily\farsifont[Script=Arabic]{Scheherazade}
\csname @Latintrue\endcsname

\begin{document}

\begin{equation}
a = b 
\end{equation}

\end{document}
0

This has been a polyglossia bug. bidi package provides the \if@Latin boolean. This boolean should be true for LTR-based script and false for RTL-based script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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