
\iupac
from コマンドを使用する場合、LaTeX が名前を分割できること、および where を認識できるように、chemmacros
次のような操作を実行できます。ただし、非常に長い式がある場合、コマンド (From the subpackage) にはマニュアルに記載されているそのようなオプションがありません (すでに | を試しました)。長い (45 文字) 化学式を分割する方法はありますか?\ch{1,2\-dimethyl|really|long|name}
\ch{UO2}
chemformula
MWE:
\documentclass[letterpaper]{article}
%\usepackage[left = 1.5 in, right = 1.5 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[language=british]{chemmacros}
\chemsetup[iupac]{coord-use-hyphen=true} %Puts hypens after bridging and hapto
%misc
%Load last stuff.
\begin{document}
This works See, it breaks at where I tell it to: \iupac{methyl|phenyl|piperidin|yl|acetate}
Here is a chemical formula: \ch{Cu(NCMe)2(pyz)[AuCl2(CN)2]2UO2(NO3)2}
Here is that same chemical formula with a bunch of filler text: \ch{Cu(NCMe)2(pyz)[AuCl2(CN)2]2UO2(NO3)2}
Here is that same chemical formula with a bunch of filler text: \ch{Cu(NCMe)2(pyz)|[AuCl2(CN)2]|2UO2(NO3)2}
Here is that same chemical formula with a bunch of filler text: \ch{Cu(NCMe)2(pyz) [AuCl2(CN)2] 2UO2(NO3)2}
Note a complete lack of this working despite spaces and such.
The one way I've seen it work is (filler text filler text) \ch{Cu(NCMe)2(pyz)[AuCl2(CN)2] * 2 MeCN}
\end{document}
答え1
これが正しい方法かどうかはわかりませんが、とにかく、うまくいきます!
改行を許可する新しいプロパティを追加します。改行のみを許可するプロパティとハイフンも追加するプロパティの 2 つを提案します。どちらかを選択してください。
\documentclass[letterpaper]{article}
%\usepackage[left = 1.5 in, right = 1.5 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[language=british]{chemmacros}
\chemsetup[iupac]{coord-use-hyphen=true} %Puts hypens after bridging and hapto
\NewChemCompoundProperty{|}{\linebreak[0]}
\NewChemCompoundProperty{?}{\-}
%misc
%Load last stuff.
\begin{document}
This works See, it breaks at where I tell it to: \iupac{methyl|phenyl|piperidin|yl|acetate}
Here is a chemical formula: \ch{Cu(NCMe)2(pyz)[AuCl2(CN)2]2UO2(NO3)2}
Here is that same chemical formula with a bunch of filler text:
\ch{Cu(NCMe)2 | (pyz) | [AuCl2(CN)2]2 | UO2(NO3)2}
Here is that same chemical formula with a bunch of filler text:
\ch{Cu(NCMe)2 ? (pyz) ? [AuCl2(CN)2]2 ? UO2(NO3)2}
\end{document}