耦合常数 J 的下标

耦合常数 J 的下标

我正在使用chemmacros包排版 NMR 实验数据,其中耦合常数 J 带有下标以指定所涉及的两个原子。它工作正常,但当我想指定哪些原子参与耦合时(主要是两个氢及其位置,例如 H5、H6),我无法使用下标,因为原子出现在括号中,位置作为下标(就像分子式一样)。

这是一个 MWE:

\documentclass[a4paper]{book}
\usepackage[spanish.tabla.notilde]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[version=4]{mhchem}
\usepackage{chemnum,chemstyle}

\usepackage{chemmacros}[2014/01/29] 
\chemsetup[nmr]{
  delta = (ppm) ,
  pos-number = side ,
  use-equal,
  format = \bfseries,
  list=true ,
}
\usepackage{siunitx}
\sisetup{
  separate-uncertainty ,
  per-mode = symbol ,
  range-phrase = -- ,
  detect-mode = false ,
  detect-weight = true ,
  mode = text ,
}

\begin{document}

This is what I have:
\begin{experimental}
\NMR(300)[CDCl3] 6.26 (d, \J[Hz]{7.26}), 5.77 (\#{1}, dt, \J(;H4H5)[Hz]{15.3}, \J(;H5H6)[Hz]{6.6}), 2.23 (\#{2}, t, \J[Hz]{7.6}, \pos{2'}), 2.04 (\#{2}, m, \pos{6})
\end{experimental}

This is what I want:
\begin{experimental}
\NMR(300)[CDCl3] 6.26 (d, \J[Hz]{7.26}), 5.77 (\#{1}, dt, $J_{H4H5}=$  \SI{15.3}{\Hz}, $J_{H5H6}=$  \SI{6.6}{\Hz}), 2.23 (\#{2}, t, \J[Hz]{7.6}, \pos{2'}), 2.04 (\#{2}, m, \pos{6})
\end{experimental}
but subscripts H4H5 neither H5H6 shouldn't be in italics

 \end{document}

任何帮助将不胜感激。

答案1

正如我在评论中所说,您可以使用coupling-pos控制耦合核位置的键。您可以设置side(默认值)或sub。第二个值是您需要的。

 \documentclass[a4paper]{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{chemmacros}[2014/01/29] 
\chemsetup[nmr]{
  delta = (ppm) ,
  pos-number = side ,
  use-equal,
  format = \bfseries,
  list=true ,
}

\usepackage{siunitx}
\sisetup{
  separate-uncertainty ,
  per-mode = symbol ,
  range-phrase = -- ,
  detect-mode = false ,
  detect-weight = true ,
  mode = text ,
}

\begin{document}
% coupling-pos = side, default value
\begin{experimental}
\NMR(300)[CDCl3] 6.26 (d, \J[Hz]{7.26}), 5.77 (\#{1}, dt, \J(;H4H5)[Hz]{15.3}, \J(;H5H6)[Hz]{6.6}), 2.23 (\#{2}, t, \J[Hz]{7.6}, \pos{2'}), 2.04 (\#{2}, m, \pos{6})
\end{experimental}

% coumpling-pos = sub
\chemsetup[nmr]{ coupling-pos = sub }
\begin{experimental}
\NMR(300)[CDCl3] 6.26 (d, \J[Hz]{7.26}), 5.77 (\#{1}, dt, \J(;H4H5)[Hz]{15.3}, \J(;H5H6)[Hz]{6.6}), 2.23 (\#{2}, t, \J[Hz]{7.6}, \pos{2'}), 2.04 (\#{2}, m, \pos{6})
\end{experimental}

 \end{document}

相关内容