3

After updating to TeXLive 2016 (MacTeX 2016), I have trouble with TeX files previously correctly compiled under TeXLive 2015. Namely, using \usepackage[version=4, arrows=pgf]{mhchem} gives the error :

(/usr/local/texlive/2016/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
Runaway argument?
Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.meta.\ETC.
/usr/local/texlive/2016/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.m
eta.code.tex:11: Paragraph ended before \pgf@parseid was complete.
<to be read again> 
               \par 
l.11  
? 

I don't see what changes with pgf or mhchem, so I don't understand the source of the problem. Erasing the arrows=pgf option of mhchem allows to compile correctly. Does somebody have the same problem ? Here's a basic example :

\documentclass[11pt]{article}%
\usepackage[T1]{fontenc}    % Saisie en français
\usepackage{textcomp}
\usepackage[scr=boondoxo,frak=boondox,bb=boondox]{mathalfa}
\usepackage[french]{babel}  % Typographie   
\usepackage[utf8]{inputenc} % Encodage
\usepackage[top=2cm,bottom=1.5cm]{geometry} % Taille de la feuille
\usepackage[svgnames]{xcolor}       % Gestion des couleurs
\usepackage{pgf,tikz}   % Dessins avec PGF et Tikz
\usetikzlibrary{decorations,arrows,backgrounds,patterns}
\usetikzlibrary{decorations.pathreplacing,decorations.text,shapes,snakes}
\usepackage[version=4,arrows=pgf]{mhchem}%
%@@@@@@@@@@%
\begin{document}

\begin{center}
\ce{H2O ->[h\nu] H + OH}
\end{center}

\end{document}

Removing "arrows=pgf" allows the compilation to finish. With this option, compilation fails with the above message.

Thanks for help, Cyril

  • 1
    (1) Welcome, (2) please provide a a full but minimal example that people can copy and compile without adding or changing anything. Here you clearly have many more packages than are needed to showcase this problem, but no body . – daleif Jun 10 '16 at 12:38
  • I get the same error also with TL 2015 – egreg Jun 10 '16 at 22:47
4

For some reason, probably due to some change in mhchem, the macro \ProvidesFileRCS is unable to parse correctly its argument and there's something else related to the colon, which French makes active. The library is apparently being called at begin document and this breaks the parsing of important bits.

Workaround: load the arrows.meta library before mhchem.

Also do yourself a favor and reorder your preamble.

\documentclass[11pt]{article}

\usepackage[T1]{fontenc}    % Saisie en français
\usepackage[utf8]{inputenc} % Encodage
\usepackage[french]{babel}  % Typographie

\usepackage[top=2cm,bottom=1.5cm]{geometry} % Taille de la feuille

\usepackage{textcomp}
\usepackage[scr=boondoxo,frak=boondox,bb=boondox]{mathalfa}

\usepackage[svgnames]{xcolor}       % Gestion des couleurs
\usepackage{pgf,tikz}   % Dessins avec PGF et Tikz
\usetikzlibrary{decorations,arrows,backgrounds,patterns}
\usetikzlibrary{decorations.pathreplacing,decorations.text,shapes,snakes,arrows.meta}

\usepackage[version=4,arrows=pgf]{mhchem}%

\begin{document}

\begin{center}
\ce{H2O ->[h\nu] H + OH}
\end{center}

\end{document}
0

I'd say, it is an incompatibility of French babel and TikZ when used with AtBeginDocument (which is what mhchem does).

\documentclass[11pt]{article}%
\usepackage[french]{babel}  % Typographie   
\usepackage{pgf,tikz}   % Dessins avec PGF et Tikz
\AtBeginDocument {
  \usetikzlibrary{arrows.meta}
}
\begin{document}
abc
\end{document}
  • Hello. The changes proposed by egreg work well. Thanks for your help. – Cyril Langlois Jun 14 '16 at 18:47

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.