0

I try to use XeLaTeX to compile

     \documentclass{article}
     \usepackage{xepersian}
     \begin{document}
      Hello World
     \end{document}

And I get the following error:

 Runaway argument?
 {\dim_set:Nn ##1{\fontdimen ##2##3}\dim_compare:nNnT ##1={0pt}{\settoheight\ETC.
 ! Forbidden control sequence found while scanning use of \__cs_generate_from_si
 gnature:nnNNNn.
 <inserted text> 
            \par 
 l.1767       \int_case:nnn
                       #2

Anything containing xepersian seems to generate the same error.

  • Have you compiled your code with XeLaTeX? – Roboticist Oct 30 '17 at 22:23
  • @Roboticist Yes compiled with XeLaTeX. If I comment out '\usepackage{xepersian}' it works with XeLaTeX, but including the package creates the error. – Maesumi Oct 30 '17 at 22:31
  • You do not give many clues but I think your expl3 is too old, update your miktex packages – David Carlisle Oct 30 '17 at 22:41
1

If you compile your code with XeLaTeX, you should end up with something like this:

enter image description here

which is pretty predictable because your left-to-right text is inverted by the right-to-left xepersian.

To fix the issue, you can use \lr{} to change the direction temporarily. Outside of \lr{} everything will be right-to-left again.

\documentclass{article}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\begin{document}
    \noindent\lr{Hello World}\\
    سلام دنیا\\
خداحافظ دنیا
\end{document}

enter image description here

  • I don't get any output. I just get the error message. – Maesumi Oct 30 '17 at 22:38
  • @Maesumi: Which distribution are you using? – Roboticist Oct 30 '17 at 22:39
  • I am using MIKTEX. – Maesumi Oct 30 '17 at 22:40
  • @Maesumi: Check your directory after compilation. Does LaTeX generate any pdf as the output, regardless of the error? – Roboticist Oct 30 '17 at 22:41
  • Yes it does! And I noticed my package manager does not show an installation date for xepersian. – Maesumi Oct 30 '17 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.