bidi-tex / xepersian

Persian for LaTeX, using XeTeX
Other
11 stars 1 forks source link

Compile Error: Missing number, treated as zero. \XePersian@y=\year \XePersian@m #6

Closed MahdiNazemi closed 4 years ago

MahdiNazemi commented 4 years ago

Hi All,

I am trying to use xeperian in a project that includes both English and Persian text. To test the package, I first created a new project and compile a sample poem I had found online. The project is compiled successfully and the document is generated as expected. However, when I try integrating the same source code in my original project, I get the following error:

Missing number, treated as zero. \XePersian@y=\year \XePersian@m

I suspect this is due to a conflict with another package, but I am not able to pinpoint the error. The list of packages that are included is as follows:

\usepackage[Bjornstrup]{fncychap}
\ChTitleVar{\raggedleft\Large\rm\bfseries}
\usepackage{cite}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage[symbol]{footmisc}
\usepackage{pdflscape, comment, indentfirst, times, graphicx, setspace}
\emergencystretch=1.5em
\usepackage{array}
\newcolumntype{x}[1]{>{\centering\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{amsmath, amssymb, amsthm} 
\usepackage{mathtools}
\usepackage{bm}
\newcommand{\matr}[1]{\bm{#1}}
\usepackage{booktabs,multirow,threeparttable}
\usepackage{threeparttable}
\usepackage{standalone}
\usepackage{booktabs, dcolumn}
\usepackage{hhline}
\usepackage{multienum}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}}
\usepackage[textfont=bf,labelfont=bf,labelsep=period]{caption}
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=opt,placement={!ht},name=Optimization]{optimization}
\captionsetup[optimization]{labelfont=bf}
\usepackage{float}
\renewcommand{\figurename}{Fig.}
\usepackage[chapter]{algorithm}
\captionsetup[algorithm]{labelsep=period}
\usepackage{algorithmic}
\renewcommand{\algorithmicrequire}{\textbf{Input: }}
\renewcommand{\algorithmicensure}{\textbf{Output: }}
\renewcommand{\algorithmiccomment}[1]{\hfill// #1}
\usepackage{enumitem}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\usepackage[caption=false,font=footnotesize,subrefformat=parens,labelformat=parens]{subfig}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[nottoc]{tocbibind}
\renewcommand\bibname{Bibliography}
\usepackage[hidelinks,bookmarks=true,bookmarksnumbered=true,pdfusetitle]{hyperref}
\numberwithin{equation}{chapter}
\urlstyle{rm}
\newcommand{\MasterDocuement}{MasterDocuement}
\usepackage{bookmark}
\allowdisplaybreaks

\usepackage{bidipoem}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\defpersianfont\nastaliq{IranNastaliq}

I use TeXstudio as my editor and the compilation step runs the following command: xelatex -synctex=1 -interaction=nonstopmode "main".tex

I would really appreciate it if you give me pointers on how to resolve the issue.

Thank you in advance!

MahdiNazemi commented 4 years ago

This seems to be due to a compatibility with the custom documentclass I am using.