2

I have a problem with numbers in equations! This is an example:

‎\documentclass[openany]{Thesis}‎
‎\usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}‎      
‎\usepackage{xepersian}‎
‎\usepackage{amssymb}‎
‎\settextfont[Scale=1.4]{XBNiloofar}‎
‎\setlatintextfont[Scale=1.2]{XB Zar}‎
‎\setdigitfont{PGaramond}‎
‎\usepackage{pifont}‎
‎\usepackage{bm}‎
‎\usepackage[font=small,labelfont=bf]{caption}‎
‎\usepackage[dvips]{graphicx}‎
‎\usepackage[export]{adjustbox}‎
‎\graphicspath{{./}{Figures/}}‎
‎\usepackage[noadjust]{cite}‎
‎
‎\begin{document}‎
\begin{equation} \label{eq:solve}
x^2 - 5 x + 6 = 0
\end{equation}

\begin{equation}
x_1 = \frac{5 + \sqrt{25 - 4 \times 6}}{2} = 3
\end{equation}

\begin{equation}
x_2 = \frac{5 - \sqrt{25 - 4 \times 6}}{2} = 2
\end{equation}
\end{document}

and this is my .cls file:

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{thesis}[2007/10/19 v1.0]
\LoadClass[12pt,a4paper,BCOR=.7cm,headsepline,bibliography=totoc]{scrbook}
\renewcommand\headfont{\small\textRL}
\renewcommand*\sectfont{\normalcolor\bfseries}
\DeclareOption{MsThesis}{\AtEndOfPackage{\def\@fordegree{\if@Latin Ms Thesis\else پایان‌نامه کارشناسی ارشد\fi}}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}}
\ProcessOptions
\RequirePackage{amsmath,amsthm}
\newlength\OddM@rg
\if@twoside\def\sw@pmargs{\oddsidemargin\evensidemargin}\else
\def\sw@pmargs{
\OddM@rg\paperwidth \addtolength\OddM@rg{-\textwidth}
\addtolength\OddM@rg{-\oddsidemargin} \addtolength\OddM@rg{-2\hoffset} \addtolength\OddM@rg{-2in} \oddsidemargin\OddM@rg}
\sw@pmargs \fi

\sloppy\parindent1.5em
\def\PrepareForBiblio{\cleardoubleemptypage\pagestyle{plain}\backmatter\baselineskip0.8\baselineskip}
\def\PrepareForLatinPages{\cleardoubleemptypage\pagestyle{empty}\sw@pmargs\latin}
\newenvironment{abstract}[1]
{\def\@pkeywds{#1}\cleardoubleemptypage\begin{center}\Large\bfseries\st@title\end{center}\subsection*{\if@Latin Abstract\else چکیده\fi}\begin{quote}}
{\end{quote}\paragraph*{\if@Latin Keywords\else کلمات کلیدی\fi:}{\@pkeywds.}\cleardoubleemptypage}
\newenvironment{قدردانی}{\cleardoubleemptypage\centerline{\Large\bfseries قدردانی}\begin{quote}}{\end{quote}\cleardoubleemptypage}
\newenvironment{تصویب}{\def\BSkp{\par\vskip3\bigskipamount} \def\SSkp{\par\vskip\bigskipamount}
\def\signat{امضاء: . . . . . . . . . . .\\[1cm]}
\def\داور%
##1##2{##1: & {\large##2} & \signat}
  \cleardoubleemptypage\begin{center}\large\bfseries به نام او\SSkp\st@university\end{center}
  \BSkp{\large\@fordegree}\SSkp
  \begin{tabular}{rr} عنوان: & {\large\st@title} \\[\medskipamount] \@by: & {\large\st@author} \end{tabular}
  \BSkp{\large کمیته داوران}\SSkp
  \begin{center}\begin{tabular*}{.9\textwidth}{r r @{\extracolsep{\fill}} l}
    \@undersup: & {\large\st@supervisor} & \signat
    \ifdefined\st@consult \@undercons: & {\large\st@consult} & \signat\fi
}{
&& تاریخ: . . . . . . . . .
\end{tabular*}\end{center}}
%مشخصات پایان‌نامه
\let\origin@lmaketitle\maketitle
\def\makethesistitle{
\def\@titlehead{\centering\st@logo\\\smallskip\large\st@university}
\def\@title{\st@title}
\def\@subject{\@fordegree\\\st@subject}
\def\@author{{\normalsize\@by}\\{\st@author} \\[1.5\bigskipamount]%
    {\normalsize\@undersup}\\{\itshape\st@supervisor}%
    \ifdefined\st@consult\\[1.5\bigskipamount]{\normalsize\@undercons}\\{\itshape\st@consult}\fi
    \\[1.5\bigskipamount]}
  \def\@date{\ifdefined\st@date\st@date\else\if@Latin\latintoday\else\today\fi\fi}
  \origin@lmaketitle
  \newcommand\date[1]{\def\st@date{##1}}
  \newcommand\title[1]{\def\st@title{##1}}
  \newcommand\author[1]{\def\st@author{##1}}
  \newcommand\subject[1]{\def\st@subject{##1}}}
\renewcommand\date[1]{\def\st@date{#1}}
\renewcommand\title[1]{\def\st@title{#1}}
\renewcommand\author[1]{\def\st@author{#1}}
\renewcommand\subject[1]{\def\st@subject{#1}}
\newcommand\logo[1]{\def\st@logo{#1}}
\newcommand\university[1]{\def\st@university{#1}}
\newcommand\supervisor[1]{\def\st@supervisor{#1}}
\newcommand\consult[1]{\def\st@consult{#1}}
\def\@undersup{\if@Latin Supervisor\else استاد راهنما\fi}
\def\@undercons{\if@Latin Under consult of\else استاد مشاور\fi}
\def\@by{\if@Latin By\else نگارش\fi}
\def\@fordegree{\if@Latin PhD Thesis\else پایان‌نامه دکتری\fi}

\newtheorem{theorem}{قضیه}[chapter]
\renewcommand\thetheorem{\thechapter\@SepMark\arabic{theorem}}
\newtheorem{definition}[theorem]{تعریف}
\newtheorem{notation}[theorem]{قرارداد}
\newtheorem{proposition}[theorem]{گزاره}
\newtheorem{lemma}[theorem]{لم}
\newtheorem{remark}[theorem]{تذکر}
\newtheorem{example}[theorem]{مثال}

\def\localisecommands{
\eqcommand{دانشگاه}{university}
\eqcommand{موضوع}{subject}
\eqcommand{استادراهنما}{supervisor}
\eqcommand{استادمشاور}{consult}
\eqcommand{آرم}{logo}
\eqcommand{تقدیم}{dedication}
\eqenvironment{اثبات}{proof}
\eqenvironment{لم}{lemma}
\eqenvironment{قضیه}{theorem}
\eqenvironment{تذکر}{remark}
\eqenvironment{گزاره}{proposition}
\eqenvironment{قرارداد}{notation}
\eqenvironment{تعریف}{definition}
\eqenvironment{مثال}{example}}

So when i type some numbers in my equations, it does not appear! see the example please:

\begin{equation} \label{eq:solve}
x^2 - 5 x + 6 = 0
\end{equation}

\begin{equation}
x_1 = \frac{5 + \sqrt{25 - 4 \times 6}}{2} = 3
\end{equation}

\begin{equation}
x_2 = \frac{5 - \sqrt{25 - 4 \times 6}}{2} = 2
\end{equation}

and results:

enter image description here so what can i do? help me please!

closed as unclear what you're asking by barbara beeton, TeXnician, Stefan Pinnow, CarLaTeX, Bobyandbob Nov 2 '17 at 7:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Welcome! Can you complete your code so we have something we can compile to reproduce the issue? Do you get errors when you compile? – cfr Sep 14 '15 at 21:20
  • I can't get this to compile. Do you use XeLaTeX? – Håkon Marthinsen Dec 20 '15 at 20:34
  • No! I use texlive. – Masoud Shokrnezhad Dec 22 '15 at 11:36

Browse other questions tagged or ask your own question.