TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed TeXLive 2010 on Ubuntu 10.10, when I try to compile a LaTeX file such as:

‫این فقط یک آزمایش است‬.\index{آزمایش}

using xelatex --shell-escape filename.tex, the following error message appeared:

! Undefined control sequence.
<argument> \@nil 

l.39 \settextfont

what is the meaning of the error and what should I do to solve that?

In addition, the error does not appear, when I change the documentclass by article!

I should mention that the quickindex option working by the latest version of xepersian that can be obtained from ctan, also it depend on latest version of fontspec and so on. thus you should update your TeXLive, as I did!

share|improve this question
Please add a minimal example that shows your problem allowing the reader to reproduce and to fix it. – Stefan Kottwitz Feb 12 '11 at 18:40
@hassan: Please post a minimal example, starting \begin{document}. You can mark up code using the 101010 button in the editor. – Joseph Wright Feb 12 '11 at 18:40
For me it already complains about the quickindex option. – Caramdir Feb 12 '11 at 19:50
I did (today). The version in TL2010 is 1.1.0β1.2 form Dec 6. Do you get the same error when removing quickindex? – Caramdir Feb 12 '11 at 21:00
@hassan. As this only shows up with the latest xepersian release, I'd say it's probably a bug in the package. I'd report it via the BitBucket site listed in the documentation. – Joseph Wright Feb 12 '11 at 22:26
up vote 4 down vote accepted

This is not a bug. It is actually intended to behave this way. quickindex option does not support memoir class yet and the error that you get is on purpose. quickindex option is added in v1.1.0 of xepersian and it is available on CTAN now. (at least on dante). I just uploaded it yesterday to dante.

share|improve this answer
Perhaps \@ifclassloaded{memoir}{\PackageError{xepersian}{Memoir is not supported!}{}}{} would be a good idea, then. – Will Robertson Feb 13 '11 at 5:02
Ok, I got where I messed it up. I forgot about third argument of \PackageError. Many thanks for this. I will upload the corrected version tonight. – IRAN Feb 13 '11 at 6:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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