[Tex/LaTex] l3regex usage throws __scan_new:N error

expl3l3regex

Using TeXLive, with this MWE

\documentclass{article}
\usepackage{expl3}
\usepackage{l3regex}
\begin{document}
  a
\end{document}

I get an error for an undefined control sequence

(/usr/share/texlive/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
Package: l3tl-analysis 2011/12/08 v3039 L3 Experimental token lists analysis
(/usr/share/texlive/texmf-dist/tex/latex/l3experimental/l3str/l3str.sty
Package: l3str 2013/04/24 v4482 L3 Experimental strings
)
! Undefined control sequence.
<recently read> \__scan_new:N 

l.54 \__scan_new:N
                   \s__tl

I assume some incompatible (too old) L3 packages. However, the Debian packages word quite well in resolving dependencies in the past. Could you please assist me?

Best Answer

The file versions in the question:

Package: l3tl-analysis 2011/12/08 v3039 L3 Experimental token lists analysis
Package: l3str 2013/04/24 v4482 L3 Experimental strings

are both 'matching' (there should be no issues with this combination). Thus the problem must lie elsewhere. As \__scan_new:N is not defined I think you have an older version of l3kernel installed which pre-dates the introduction of the 'scan mark' approach. Thus the solution will be to check your .log file carefully for where expl3 and the various component packages are loaded. They should all come from the same tree.

Related Question