
libertine
私は、実験データをタイプセットするために、newtxmath とberamono
パッケージを併用してフォントを使用していますchammacros
。これは非常にうまく機能し、希望どおりの結果が得られます。このパッケージは、プレスクリプトが文字 J に非常に近くなるように結合定数をタイプセットします。of などのパッケージを使用しているにもかかわらず、同じ結果テキストを実現しようとすると失敗します。これらのパッケージの標準バージョンmathtools
でleftidx
は、私のニーズを満たしていません。
MWEはこちら
\documentclass[a4paper,10pt,bibliography=totoc,listof=totoc]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage[scaled=.83]{beramono}
\usepackage[libertine]{newtxmath}
\usepackage{chemmacros}
\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 ,
text-rm = \libertineLF % use libertine with lining figures
}
\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
}
\cs_set_protected:Npn \chemmacros_nmr_number:n #1
{
$ #1 $ \, % put the number in math-mode for lining figures
\chemmacros_atom:V \g__chemmacros_nmr_element_tl
}
\ExplSyntaxOff
\begin{document}
Good way:
\begin{experimental}
\NMR(400)[C6D6] \val{2.01} (d, \J(1;CH)[Hz]{25.0}, \#{24}, \pos{5})
\end{experimental}
Not so good way:
$\prescript{1}{}{J}$ coupling
\end{document}
ドキュメントから覚えている限りでは、内部的にchemmacros
使用していると思いますが、どうやら私よりも賢い方法で使用されているようです。mathtools
答え1
chemmacros は、これに通常の数式モードを使用します: $^{1}J$
。スペースを少し削減する修正バージョンもあります: $^{1\!}J$
。
chemmacros
以下では、さまざまな数字をどのようにタイプセットするかを決定する可能性も使用および追加されている v4.4 を使用します\!
(以下の例の拡張オプションを参照)。そのため、再定義は不要になります。
\documentclass[a4paper,10pt,bibliography=totoc,listof=totoc]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage[scaled=.83]{beramono}
\usepackage[libertine]{newtxmath}
\usepackage{chemmacros}[2014/01/29] % use version 4
\chemsetup[nmr]{
delta = (ppm) ,
pos-number = side ,
use-equal,
format = \bfseries,
list=true ,
coupling-pos-cs = \ensuremath , % <<< added
atom-number-cs = \ensuremath % <<< added
}
\usepackage{siunitx}
\sisetup{
separate-uncertainty ,
per-mode = symbol ,
range-phrase = -- ,
detect-mode = false ,
detect-weight = true ,
mode = text ,
text-rm = \libertineLF % use libertine with lining figures
}
\begin{document}
Good way:
\begin{experimental}
\NMR(400)[C6D6] \val{2.01} (d, \J(1;CH)[Hz]{25.0}, \#{24}, \pos{5})
\end{experimental}
Same way:
$^{1\!}J$ coupling
\end{document}