4

In the following example there is no space before "chloride" as intended. However, when i remove the oxidation number "(III)", the space is there as it should be. Why is that and how can i force a space inside the \iupac command? And btw, is it the correct way to just type "(III)" in that case?

enter image description here enter image description here

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm,includeheadfoot]{geometry}
\usepackage[ngerman,british]{babel}

%FONTS
\usepackage{mathptmx}   %Etwas Times New Roman Aehnliches
\usepackage{helvet}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

%DIVERSES
\usepackage{graphicx}   %[draft]: Platzhalter für Bilder
\usepackage{amsmath, amssymb, array, color, epstopdf, lipsum, pdfpages, textgreek, url}

%CHEMIE UND PHYSIK
\usepackage{siunitx}
\sisetup{separate-uncertainty = true, range-units = brackets, per-mode=symbol}
\usepackage{chemmacros}
\chemsetup{modules={all},greek=default}

\begin{document}
\section{Aim of the Experiment}
The aim of this experiment is the enantiospecific synthesis of the complex \iupac{(R,R)\-N,N'-bis(3,5-di-tert-Butyl|salicydene)-1,2-cyclo|hexane|diamino|manganese(III) chloride}, \ch{[Mn(salen)Cl]} or \emph{Jacobsens Catalyst}.
\end{document}
  • 1
    I guess some \@ifnextchar breaks in the way, so spaces get ignored; you might try \ (backslash space). – egreg Apr 16 '17 at 19:13
  • I don't understand why but it works, thank you :) – Wulfram Apr 16 '17 at 19:19
2

The reason is an erroneous definition of \chemmacros_allow_hyphens:. I'll fix it in the next version. Here is a temporary fix:

\documentclass{scrartcl}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{chemmacros}
\chemsetup{modules={all},greek=textgreek}

\ExplSyntaxOn
\ChemCompatibilityTo{5.7}
\cs_set_protected:Npn \chemmacros_allow_hyphens:
  {
    \chemmacros_nobreak:
    \skip_horizontal:N \c_zero_skip
  }
\EndChemCompatibility
\ExplSyntaxOff

\begin{document}

\iupac{\cip{R,R}-\N,\N'-bis(3,5-di-\tert-Butyl|salicydene)-1,2-cyclo|hexane|%
  diamino|manganese(III) chloride}, \ch{[Mn(salen)Cl]} or \emph{Jacobsens
  Catalyst}.

\end{document}

enter image description here

BTW: it should be \cip{R,R}-\N,\N'-bis(3,5-di-\tert-… to follow iupac guidelines. Also setting greek=default doesn't really make sense as that leads to italic lowercase Greek letters!

1

What probably happens is that (...) triggers some looking ahead, which ignores spaces when acting.

I don't know whether the syntax you're using is correct according to IUPAC norms; anyway, control space works:

\documentclass[a4paper,12pt]{article}

\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm,includeheadfoot]{geometry}
\usepackage{newtxtext,newtxmath}

\usepackage{chemmacros}
\chemsetup{modules={all},greek=default}

\begin{document}

\section{Aim of the Experiment}
The aim of this experiment is the enantiospecific synthesis of the complex
\iupac{(R,R)\-N,N'-bis(3,5-di-tert-Butyl|salicydene)-1,2-cyclo|hexane|% <-- line break
diamino|manganese(III)\ chloride}, \ch{[Mn(salen)Cl]} or \emph{Jacobsens Catalyst}.

\end{document}

enter image description here

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.