6

I just installed the texlive-latex3 package and tried running pdflatex on the following (copied directly from another question posted here):

\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand {\dothings}
  { > { \SplitList { ~ } } m }
  { \tl_map_inline:nn {#1} { \fbox{##1} } }
\ExplSyntaxOff
\begin{document}
\dothings{Takes several words as argument}
\end{document}

But I'm getting an "Undefined control sequence" error. The same happens with any other code I copy that uses xparse. What am I doing wrong here? I've noticed that it says I'm using LaTeX2e. Could that be related to the issue?

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./test.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/xpackages/xbase/xparse.sty
(/usr/share/texmf-texlive/tex/latex/expl3/l3names.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/expl3.sty
(/usr/share/texmf-texlive/tex/latex/expl3/l3basics.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3expan.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3tl.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3num.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3intexpr.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3quark.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3seq.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3toks.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3int.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3prg.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3clist.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3token.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3io.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3prop.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3msg.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3skip.sty))
(/usr/share/texmf-texlive/tex/latex/expl3/l3box.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3keyval.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3keys.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3precom.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3calc.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3xref.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3file.sty)) (./test.aux)
! Undefined control sequence.
\xparse_processor_1:n #1->\SplitList 
                                     { }{#1}
l.9 \dothings{Takes several words as argument}

?
3
  • Can you post the output of \listfiles? Jan 16, 2012 at 3:57
  • As @BrunoLeFloch suggests, add \listfiles before \documentclass and add everything after *File List* in your .log to your post. This will give us an indication of the package versions you're using. And, since xparse forms part of the l3packages - which is under development - it may be that your version is out of date.
    – Werner
    Jan 16, 2012 at 6:02
  • 1
    you have the Debian 2009 TeXLive which is really old. Update the l3 packages
    – user2478
    Jan 16, 2012 at 8:35

1 Answer 1

6

While \lisfiles is often the best way to find out the exact version of a particular file or bundle of files that are being used, here it is clear that you are using a version of the LaTeX3 file bundle which is too old. The 'give-away' lines are

(/usr/share/texmf-texlive/tex/latex/expl3/l3num.sty)
(/usr/share/texmf-texlive/tex/latex/expl3/l3intexpr.sty)

as we no longer use l3num, and l3intexpr was integrated into l3int some time ago. More generally, the LaTeX3 code is being actively developed, and this means that new features are added as ideas appear. Answers using LaTeX3 ideas posted here will often need the latest release of the code to CTAN.

You will need to install updated versions of the two bundles l3kernel and l3packages in order to get the latest features. To do this, download the files l3kernel.tds.zip and l3packages.tds.zip files from CTAN. These should then be unzipped in your local TeX tree, usually ~/texmf. TeX should then find the updated files rather than the older ones in your managed TeX installation. (As you have TeX Live 2009, you should not need to run texhash to pick up these files, which was necessary with earlier versions of TeX Live.)

2
  • 2
    An alternative approach would be to install 'vanilla' TeX Live and use tlmgr to update your installed files. See the TUG site for 'vanilla' TeX Live.
    – Joseph Wright
    Jan 16, 2012 at 9:08
  • Extracted them to ~/texmf and everything works perfectly. Thanks.
    – howard
    Jan 16, 2012 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .