# ! LaTeX error: “kernel/command-not-defined” ! ! Control sequence \str_case:nnn undefined

I am starting to write a report and I have used what I have previously done some months ago and it gives me this error:

! LaTeX error: "kernel/command-not-defined"

!
! Control sequence \str_case:nnn undefined.

! See the LaTeX3 documentation for further information.


even if I only have the first page and eliminate the rest it still gives me the same error.

On the contrary, on other complete reports it compiles without errors.

Without the packages the main document is this:

\begin{document}
\begin{titlepage}
\begin{center}
\pagestyle{empty}
PHYSICS DEPARTMENT\\
\end{center}
\end{titlepage}
\end{document}


The preamble is:

\documentclass[a4paper,11pt,titlepage,oneside]{report}
\usepackage{graphicx}
\usepackage[portuguese, english]{babel}
\usepackage{fancyhdr}
\usepackage[center,small,bf]{caption}
\usepackage{amsthm}
\usepackage{amsmath, amssymb}
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{appendix}
\usepackage{listings}
\usepackage{color}
\usepackage{fancyvrb}
\usepackage{url}
\usepackage[T1]{fontenc} % fontes para caracteres nao ingleses
\usepackage{ae, aecompl}
\usepackage[table]{xcolor}
\usepackage[pdfencoding=auto,psdextra]{hyperref}
\usepackage{graphicx}
\usepackage[top=3.17cm, bottom=3.17cm, left=2.54cm, right=2.54cm]{geometry}
\usepackage{setspace}
\usepackage{indentfirst}
\usepackage{gensymb}
\usepackage{lscape}
\usepackage{longtable}
\usepackage[acronym, nomain, nonumberlist, toc]{glossaries}
\usepackage{bookmark}
\usepackage[numbers, sort&compress]{natbib}
\usepackage{notoccite}
\usepackage{tocloft}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{array}
\usepackage[version=3]{mhchem}


I updated all the packages of miktex.

I am using windows 8.1, texmaker 4.4.1 and miktex 2.9.

Thank you in advance.

• We will need to see your preamble. This is likely due to a passing issue with fontspec but I can't be sure. – Joseph Wright Jul 23 '15 at 15:11
• the preamble is \documentclass[a4paper,11pt,titlepage,oneside]{report} \usepackage{graphicx} and so on? – André Monteiro Jul 23 '15 at 15:13
• Yes, that's what we need to see – Joseph Wright Jul 23 '15 at 15:14
• Ok I detected that the problem was with this line: \usepackage[version=3]{mhchem} The preamble is now on the question – André Monteiro Jul 23 '15 at 15:23
• See tex.stackexchange.com/questions/256656/…: fix is the same. I'll try to get mhchem sorted (I was actually in the same place as Will so fontspec was easy). – Joseph Wright Jul 23 '15 at 15:25