如何绘制双线一虚线?

如何绘制双线一虚线?
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{Co(-[0,,1,,very thick,dotted]Cl)(-[1]NH_3)(-[2]Cl)(-[2,,1,,very thick,dotted])(-[3]H_3N)(-[4,,1,,very thick,dotted]Cl)(-[5]H_3N)(-[6]NH_3)(-[7]NH_3)}
\end{document}

在此处输入图片描述

答案1

手册第 28 页“5 离域双键”

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usepackage{chemfig}
\catcode`\_=11
\tikzset{
    ddbond/.style args={#1}{
        draw=none,
        decoration={%
            markings,
            mark=at position 0 with {
                \coordinate (CF@startdeloc) at (0,\dimexpr#1\CF_doublesep/2)
                coordinate (CF@startaxis) at (0,\dimexpr-#1\CF_doublesep/2);
            },
            mark=at position 1 with {
                \coordinate (CF@enddeloc) at (0,\dimexpr#1\CF_doublesep/2)
                coordinate (CF@endaxis) at (0,\dimexpr-#1\CF_doublesep/2);
                \draw[very thick,dash pattern=on 1.2pt off 2.3pt] (CF@startdeloc)--(CF@enddeloc);
                \draw (CF@startaxis)--(CF@endaxis);
            }
        },
        postaction={decorate}
    }
}
\catcode`\_=8
\begin{document}
    \chemfig{Co(-[0,,1,,very thick,dotted]Cl)(-[1]NH_3)(-[2,,,,ddbond={+}]Cl)(-[3]H_3N)(-[4,,1,,very thick,dotted]Cl)(-[5]H_3N)(-[6]NH_3)(-[7]NH_3)}
\end{document}

在此处输入图片描述

相关内容