How do I insert a non-breaking hyphen into an \iupac name?

I just enclosed the - in an \mbox to prevent hyphenation.

\documentclass[letterpaper]{article}
\usepackage[left= 10 cm, right=5 cm]{geometry}

\usepackage{chemmacros}

\begin{document}
    Gold-catalyzed (4+3)-annulations of \iupac{2\mbox{-}alkenyl-1-alkynylbenzenes} with 
    anthranils with alkyne-dependent chemoselectivity: skeletal rearrangement versus 
    non-rearrangement
\end{document}

enter image description here


You can define a new shorthand.

\documentclass[letterpaper]{article}
\usepackage[left= 10 cm, right=5 cm]{geometry}
\usepackage{chemmacros}

\DeclareChemIUPACShorthand{!}{\nbhyphen}
\newcommand{\nbhyphen}{\mbox{-}}

\begin{document}

Gold-catalyzed (4+3)-annulations of
\iupac{2-alkenyl-1-alkynylbenzenes}
with anthranils with alkyne-dependent
chemoselectivity: skeletal rearrangement
versus non-rearrangement

Gold-catalyzed (4+3)-annulations of
\iupac{2!alkenyl-1-alkynylbenzenes}
with anthranils with alkyne-dependent
chemoselectivity: skeletal rearrangement
versus non-rearrangement

\end{document}

enter image description here

Tags:

Chemmacros