I am trying to use xepersian
in a thesis that has to be written in English. As soon as I include \usepackage{xepersian}
to the document, all numbers and dates are changed to Persian, the title page contents are mostly removed, the fncychap
headers are completely gone, etc.
I have never written any documents in two languages before and I am not sure whether any other packages need to be imported (and if English needs to be set as the default language).
Is it possible to import xepersian
with minimal changes to the rest of the document? Since I will be only writing a short piece of Persian text, I was thinking of modifying xepersian.sty
and commenting unnecessary sub-packages (I understand this is the worst way of achieving my goal).
I have seen solutions based on polyglossia
but I am not quite sure how to apply them to the problem in hand.
Here is an MWE that shows how the title page would change as soon as you include the xepersian
package (you can take USC-Thesis from the above link; you just need to replace all month
with gradmonth
and all year
with gradyear
to avoid conflicts with xepersian
. There may be other solutions to avoid such conflict that I am not aware of):
% !TeX program = xelatex
% Compile the thesis with xelatex to ensure unicode characters are printed correctly.
\documentclass{USC-Thesis}
%\usepackage{polyglossia}
%\setdefaultlanguage{english}
%\setotherlanguages{persian}
%\usepackage{bidipoem}
%\usepackage{xepersian}
%\settextfont{XB Niloofar}
\begin{document}
\title{Title}
\author{Author}
\major{Major}
\gradmonth{April}
\gradyear{2020}
\maketitle
\topmatter{Acknowledgments}
Thank you.
\tableofcontents % Table Of Contents
\listoftables % List of tables
\listoffigures % List of figures
\mainmatter
\chapter{Introduction}
This is the introduction
\end{document}
I would really appreciate it if you could share your potential solutions with me.
EDIT: As soon as I add the \usepackage{polyglossia}
, the title page, page numbers, and all formatting defined in the document class are somehow cleared.
EDIT 2: It looks like it is possible to store some definitions like maketitle
before importing polyglossia
and restore them afterwards.
xepersian
, as soon as I addpolyglossia
, the title page, page numbers, etc. seem to be overwritten and do not conform to the document class anymore.