Como insiro uma quebra de linha opcional em uma fórmula química usando o pacote chemformula?

Como insiro uma quebra de linha opcional em uma fórmula química usando o pacote chemformula?

Ao usar o \iupaccomando from chemmacrosposso fazer algo assim \ch{1,2\-dimethyl|really|long|name}para que o LaTeX saiba que pode dividir o nome e onde. Porém, quando tenho uma fórmula muito longa, o \ch{UO2}comando (Do chemformulasubpacote) não possui essa opção listada no manual (e já tentei |). Existe uma maneira de quebrar minha fórmula química longa (45 caracteres)?

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}

Responder1

Não tenho certeza se esta é a maneira correta, mas, ei, funciona!

Adicione uma nova propriedade que permite quebra de linha. Proponho dois: um que permite apenas uma pausa e outro que também adiciona um hífen. Faça sua escolha.

\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}

insira a descrição da imagem aqui

informação relacionada