# Generate PDF using xelatex engine

I want to write UML code using msc package. So I write the code like below:

% arara: xelatex
% arara: clean1
% arara: clean: { files: [ Commands.aux , .main.ptd , TP.aux] }
\documentclass{article}
\usepackage{msc}

%\usepackage{xepersian}
%\settextfont{XB Niloofar}

\begin{document}
\begin{msc}{Example}
\declinst{usr}{User}{}
\declinst{m1}{Machine 1}{control}
\declinst{m2}{Machine 2}{drill}
\declinst{m3}{Machine 3}{test}
\mess{startm1}{usr}{m1}
\nextlevel
\mess{startm2}{m1}{m2}
\nextlevel
\mess{continue}{m2}{m3}
\mess{log}{m1}{envleft}
\nextlevel
\mess{output}{m3}{usr}[2]
\nextlevel
\mess{free}{m1}{usr}
\nextlevel
\end{msc}
\end{document}


It works fine and generate pdf by running with XeLatex engine. But when I active the package xepersian, then it does not work and no pdf. What can I do?

When I run with xepersian package I do not get error but I can not open pdf

http://www.filehosting.org/file/details/638354/aa.log

• Going against the guidelines of expl3 programming, the author of XePersian used a private fontspec function in the code for \settextfont. The private function is \__fontspec_pass_args:nnn which has been removed in the last version of fontspec: no other package should have relied on it. – egreg Feb 1 '17 at 8:52
• Unfortunately, fixing the code at the document level is not possible, because the faulty macros are used in the package itself. – egreg Feb 1 '17 at 9:01
• But all of my document works fine with xepersian. why? for example this code \documentclass{article} \usepackage{xepersian} \settextfont{XB Niloofar} \begin{document} سلام \end{document} – hossein behboodi Feb 1 '17 at 9:03
• Apparently you haven't updated your TeX system yet. Can you show the error message you get? – egreg Feb 1 '17 at 9:14
• I don't get any error. But pdf does not generate or it generates but I can not open it – hossein behboodi Feb 1 '17 at 9:23

Enclose the msc environment in a latin one:

\documentclass{article}
\usepackage{msc}

\usepackage{xepersian}
\settextfont{Al Bayan}

\begin{document}

\begin{latin}
\begin{msc}{Example}
\declinst{usr}{User}{}
\declinst{m1}{Machine 1}{control}
\declinst{m2}{Machine 2}{drill}
\declinst{m3}{Machine 3}{test}
\mess{startm1}{usr}{m1}
\nextlevel
\mess{startm2}{m1}{m2}
\nextlevel
\mess{continue}{m2}{m3}
\mess{log}{m1}{envleft}
\nextlevel
\mess{output}{m3}{usr}[2]
\nextlevel
\mess{free}{m1}{usr}
\nextlevel
\end{msc}
\end{latin}

سلام

\end{document}


Beware that with the most recent updates to fontspec the package xepersian doesn't work. The cause is its author going against expl3 programming guidelines and using a private fontspec function, now removed.

I'm referring to xepersian version 17.2 (2017/01/16) and fontspec version 2.5d (2017/01/24).

• Yes. It works fine. Thank you. But it takes too time to run. Why? – hossein behboodi Feb 1 '17 at 10:23