7

I have a very basic problem. I am trying to use the xstring package in a Latex document and I keep getting the following error message for an undefined control sequence:

(c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/generic/xstring/xstring.sty

(c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/generic/xstring/xstring.tex


****! Undefined control sequence.**

**\@xs@buildlines ...\expandafter {\number \numexpr 
                                                  #1+1-1}\edef \@xs@reserved...**

**l.427 \@xs@newmacro\StrRemoveBraces{}{1}{1}
                                           {%******

Typesetter process aborted

I downloaded and installed this package from CTAN; it is the 2013-07-29 version.

9

Package xstring requires the e-TeX extensions. Otherwise you get the error, that \numexpr from e-TeX is undefined as seen in the question.

It seems that PCTeX has some support for e-TeX, but it must be enabled. This is done during format generation, if the first characters is a star *.

"How do I fix a Package etex error?" from PCTeX's home page describes the procedure to enable extended mode.

  • +1 I just realised that I was thrown by the formatting (\numexpr wasn't at the end of the line, until we both edited the q at the same time:-) – David Carlisle Sep 23 '13 at 2:01

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.