chemfig 分子转移 tikzpicture (在 beamer 中)

chemfig 分子转移 tikzpicture (在 beamer 中)

我有一张带标题的投影仪幻灯片。上面有一张 tikzpicture,其中包含一个用 chemfig 绘制的分子。如果没有分子,图片就很好: mwe1 然而,当我放入分子时,就会发生这种情况: 在此处输入图片描述 代码:

\documentclass[presentation,utf8,t]{beamer}
\usepackage{tikz}
\usepackage{chemfig}
\usetikzlibrary{positioning}

\begin{document}
\begin{frame}
\frametitle{A tikzpicture with some molecules}
\begin{tikzpicture}[scale=0.75]
\draw[gray] (0,0) grid (15,10);
\setcrambond{2pt};
\node[anchor=west] at (4,6) {%
\chemfig[][scale=0.5]{%
(?-[:130]O-[:190](-[:130,0.7]-[:50]OH)-[:-190](-[:190]O-[:-190,,,,dash pattern=on 2pt off 2pt])<[:-50](-[:-190]HO)-[:10,,,,line width=2pt]
?[,{<}](-[:-50,.7]NH-[:-130](=[:180,0.7]O)-[:-50]CH_3))
-[:10]O-[:-10]
?[b]-[:50](-[:190]HO)-[:-10](-[:50,.7]NH-[:130](=[:180,0.7]O)-[:50]CH_3)-[:10](-[:-10,,,,dash pattern=on 2pt off 2pt])<[:-130]O-[:-190,,,,line width=2pt]
?[b,{<}](-[:-130,.7]-[:-50]OH)
}
};
\end{tikzpicture}
\end{frame}
\end{document}

任何想法?

在 Windows 7 上通过 texworks 使用 Texlive

答案1

果然,罪魁祸首是\setcrambond

它需要另外两个选项,即使它们是空的。 \setcrambond{2pt}{}{}是正确的形式(添加;与否无所谓)。

相关内容