# Chemmacros: Adjusting the properties of the coupling constant J

I am working with the package chemmacros and using its convenient experimental environment to typeset my data and it works perfectly fine. However I would like to adjust the way the coupling constants J are displayed. There are three things I would like to change:

1. The coupling nuclei are displayed in italics, I would like to have upright nuclei.
2. They are displayed in brackets, but I would like to have them as a subscript.
3. The number of the bonds between the coupling nuclei n is displayed as a superscript before the J. Unfortunately, the distance between the J and this number n is too large. Is there a way to make it smaller?

Here is my MWE:

    \documentclass[a4paper,10pt,bibliography=totoc,listof=totoc]{scrreprt}
\usepackage{chemmacros}
\usepackage{siunitx}
\chemsetup[nmr]{delta=(ppm),pos-number=side,use-equal,format = \bfseries,list=true}
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}

\begin{document}
\begin{experimental}

\NMR(400)[C6D6] \val{2.01} (d, \J(2;CH)[Hz]{25.0}, \#{24},  \pos{5})

\end{experimental}
\end{document}


• This is all not possible without redefining internal macros of chemmacros. Also, the fact that the nuclei are not upright is clearly a bug. Please consider filing a formal bug report/feature request here: bitbucket.org/cgnieder/chemmacros/issues – clemens Jan 19 '14 at 14:39

As I already said in the comments: this is only possible by redefing an internal macro at the moment:

\documentclass[a4paper,10pt,bibliography=totoc,listof=totoc]{scrreprt}
\usepackage{chemmacros}
\usepackage{siunitx}
\chemsetup[nmr]{delta=(ppm),pos-number=side,use-equal,format = \bfseries,list=true}
\sisetup{separate-uncertainty,per-mode=symbol,detect-all,range-phrase=--}

\ExplSyntaxOn
\cs_set_protected:Npn \__chemmacros_nmr_coupling:w (#1;#2)
{
\tl_set:Nn \l__chemmacros_nmr_coupling_bonds_tl { #1 \! }
\tl_set:Nn \l__chemmacros_nmr_coupling_nuclei_tl
{
\c_math_subscript_token
{ \chemmacros_chemformula:n { #2 } }
}
\__chemmacros_nmr_coupling_aux_i:w
}
\ExplSyntaxOff

\begin{document}
\begin{experimental}

\NMR(400)[C6D6] \val{2.01} (d, \J(2;CH)[Hz]{25.0}, \#{24},  \pos{5})

\end{experimental}
\end{document}