I try to use XeLaTeX to compile

      Hello World

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
 <inserted text> 
 l.1767       \int_case:nnn

Anything containing xepersian seems to generate the same error.

  • Have you compiled your code with XeLaTeX?
    – User
    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 Oct 30 '17 at 22:41

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.

\settextfont{XB Niloofar}
    \noindent\lr{Hello World}\\
    سلام دنیا\\
خداحافظ دنیا

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?
    – User
    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?
    – User
    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.