I'd like to insert an equation in my $LaTeX$ document that looks like the following equation but I fail to make it show the text inside the equation:
and the output I am getting:
I read questions\answers regarding the combination of Persian and English in xepersian and used \lr and latin but it doesn't work. What am I doing wrong?
Here is the MWE:
\documentclass[a4paper,12pt]{report}
\usepackage{titlesec}
\usepackage{xepersian}
\usepackage{./styles/tempfix}
\settextfont[Scale=1.1]{B Nazanin}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}
\deflatinfont\calibri{Calibri}
\begin{document}
\begin{equation}
P_J{:}\quad \min_{x} J(x) \quad \textrm{subject to} \quad y=Dx
%P_J{:}\quad \min_{x} J(x) \quad \lr\textrm{subject to} \quad y=Dx
\end{equation}
\end{document}
\text{}
and\mathrm{}
could be useful. See also this question. – Karlo Aug 16 '16 at 11:16You have not specified any font for the main Persian text.
– egreg Aug 16 '16 at 11:46