5

Using pdflatex [Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)] to compile the following:

\documentclass{article}
\usepackage[version=4]{mhchem}
\begin{document}
Hello, world!
\end{document}

throws the following error:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "kernel/command-not-defined"
! 
! Control sequence \str_case:nnn undefined.
! 
! See the LaTeX3 documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.58 \cs_generate_variant:Nn \str_case:nnn { Vnn }

Note that I am using mhchem v4.01.

Any help in regards to fixing this issue is appreciated.

  • You need to update your TeX distribution – specifically files of the l3kernel. – Sean Allred Jul 23 '15 at 0:34
  • According to MikTeX' package manager, I am already running the latest version of l3kernel (SVN 5666). – Nessiesson Jul 23 '15 at 0:48
  • That should certainly be recent enough, but nevertheless, that function does exist. How strange. Have you tried just that code in a minimal document? \documentclass{article}\usepackage{expl3}\ExplSyntaxOn\cs_generate_variant:Nn\str_case:nnn{Vnn}\begin{document}hi\end{document}? – Sean Allred Jul 23 '15 at 0:58
  • Running your code returns two separate errors: kernel/command-not-defined; Control sequence \s undefined. and kernel/missing-colon; Function '\s' contains no ':'.. – Nessiesson Jul 23 '15 at 1:09
  • Welcome! Can you add \listfiles before \documentclass and post the output? – cfr Jul 23 '15 at 1:12
9

Joseph Wright wrote a message to 10 package authors last weekend (and I am sure he does not mind quoting it here).

Hello all,

I've done a recent expl3 update in which I've remove functions deprecated in 2013, following the pattern we've set up. A sweep of TeX Live shows there are a few stray uses of \int_case:nnn, \tl_case:Nnn, \str_case:nnn and \str_case_x:nnn, all of which should now end "F" (e.g. \str_case:nnF). These are easy to miss (I've got one myself to fix in siunitx), but updates of your code to match expl3 would be welcome.

Where I can I've made pull requests on GitHub/BitBucket with fixes. I've also asked that TL don't update the expl3 version until people have a chance to address this.

Regards,

Joseph

So, MikTeX updated too quickly. Less than a week seems not enough for 10 package authors to update their packages.

Update: I updated mhchem. The upload to CTAN was made 2015-07-23. It will take a day to get approved, a day to distribute to the mirrors and a few extra days until you will eventually see it as a MiKTeX update.

  • After the new update to 4.04, I get this new error @mhchem: - LaTeX error: "kernel/command-not-defined" - Control sequence \prop_get:Nn undefined. – TobiasDK Mar 5 '16 at 9:16
  • 1
    @TobiasDk You should have asked at a more obvious place. This error seems to come from chemgreek 1.0d. MikTeX seems to have not yet updated to 1.0e from February this year. – mhchem Jul 29 '16 at 16:19

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.