# chemmacros 4.6: \iupac word-wrap in titles broken?

chemmacros 4.6 started complaining about \iupac{ben\|zene} being deprecated for using \| instead of | as a breaking point. So the following input

\documentclass[fontsize=12pt,paper=a4]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{chemmacros}
\begin{document}

\section{\iupac{ben|zene}}
\iupac{ben|zene}

\section{\iupac{ben\|zene}}
\iupac{ben\|zene}

\end{document}


leaves me with the vertical bar left in the section title for the first example:

So the old style continues to work while the new method of declaring the breaking point works only outside of titles and captions (not shown in this example). Compiling with pdflatex using MiKTeX 2.9 including the latest available updates.

• Obviously the author hasn't thought about the case that \iupac is used in an argument. Write him a message. – Ulrike Fischer Nov 2 '14 at 16:34
• That's a bug in the new version. I'll fix it and will keep you posted. – cgnieder Nov 2 '14 at 23:21
• In the meanwhile, is there any workaround available? I'm approaching the end of my thesis and changing all the occurrences of | for \| will take some time. – Timo Stein Dec 18 '14 at 15:28

This is fixed in v4.7 2015/02/08. Now the MWE

\documentclass[fontsize=12pt,paper=a4]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{chemmacros}[2015/02/08]
\begin{document}

\section{\iupac{ben|zene}}
\iupac{ben|zene}

\section{\iupac{ben\|zene}}
\iupac{ben\|zene}

\end{document}


gives the expected output:

The new version will be available soon on CTAN and in TeX Live and MiKTeX a few days later.