4

I just made a new install of the latest MiKTeX distribution, then installed Texmaker, in this order.

Then I found that my tex file does not run, although it does so on Overleaf, and on another PC where I did exactly the same installation process.

I started to reduce the file to see what is working and what not. When I try to \usepackage{chemformula}, I get the error:

enter image description here

Minimum working example:

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage{graphicx}

\usepackage{subfig}

\usepackage{chemformula}

\begin{document}

(Type your content here.)

\end{document}

The other packages work. Why just this one is not?

1 Answers1

4

See this related post about \ProcessKeysPackageOptions: https://tex.stackexchange.com/a/696680/36296

As a temporary hack, you could make the code compile by loading \usepackage{l3keys2e} before chemformula:

\documentclass{article}

\usepackage{l3keys2e} \usepackage{chemformula}

\begin{document}

(Type your content here.)

\end{document}

  • Thanks, it worked like a charm, although I don't really get what the problem was! – felisnigripes Feb 28 '24 at 20:43
  • 1
    @felisnigripes The problem is that the macro \ProcessKeysPackageOptions is obsolete. The chemformula package should replace it with the new version from the latex kernel. The obsolete l3keys3e package still has the old version and thus avoids the error you showed. – samcarter_is_at_topanswers.xyz Feb 28 '24 at 20:47