# General items in Non-Persian font using the XePersian package?

Working on a book I first run into the page numbering problem that is discussed elsewhere, but I guess the problem is more general. When I try the following code, I get a Persian date in the footer and I get Persian page numbers. I really tried a lot, including the redefinition of \pagemark from the scrpage2 package. But I think this should not be necessary for users of this package. When I use \begin{latin} I expect everything inside there to behave latin. This includes date expressions, page numbers, question marks for missing citations, and so on.

The package is great and I would like to use it. Maybe there is a way to use parts of it to get the type setting of single sentences done (that's what I need, I am a linguist) and leave out the things that effect the whole document.

\documentclass{scrbook}

\usepackage{hyperref}

\usepackage{xepersian}\renewcommand{\thepage}{\texorpdfstring{\lr{\arabic{page}}}{\arabic{page}}}\let\cite=\latincite

\settextfont{XB Niloofar}

%\def\pagemark{{\lr{\pnumfont\thepage}}}

\begin{document}
\begin{latin}

\frontmatter

\chapter*{Preface}

We thank for discussion.

\newpage

We thank the \LaTeX{} developers for support.

\mainmatter

\chapter{Chapter Title}

Some text.

\newpage

Even more text.

\appendix

\end{latin}
\end{document}

-
OK, found the way to get Persian sentences without buying the whole package: \documentclass{article} \usepackage{fontspec} %\newfontfamily\Parsifont[Script=Arabic]{Yas} \setromanfont[Mapping=tex-text]{XB Niloofar} \usepackage{bidi} \begin{document} This is typeset by \textsf{bidi} package, \bidiversion, \bididate. \RL{او مرد را دوست داشت.} \end{document} – Stefan Müller Sep 11 '12 at 10:43
Make a bug report in github.com/vafa/xepersian/issues but I do not promise updating xepersian package unless there is some donations to the project – Vafa Nov 4 '12 at 11:34
@StefanMüller Can you add a self-answer? – egreg Mar 2 '13 at 21:53

OK, found the way to get Persian sentences without buying the whole package. Use xelatex with the following:

\documentclass{article}
\usepackage{fontspec}
\setromanfont[Mapping=tex-text]{XB Niloofar}
\usepackage{bidi}

\begin{document}
This is typeset by \textsf{bidi} package, \bidiversion, \bididate.

\RL{او مرد را دوست داشت.}
\end{document}

-