右侧,从乙烯到的垂直箭头M
是配位键。是否可以将两个分子(乙烯和固体催化剂表面)居中对齐,使它们的中心与配位键箭头对齐?
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{chemfig}
\usetikzlibrary{shapes,positioning,intersections,quotes}
\setchemfig{%
arrow offset=9pt,
arrow coeff=0.7,
+ sep left=0.3em,
+ sep right=0.3em,
atom sep=1.5em,
fixed length=true
}
\begin{document}
\schemestart
\chemfig{C(-[3]H)(-[5]H)=C(-[1]H)-[7]H}
\arrow{0}[,0] \+
\chemfig{ M (-[0]M{\sim}) (-[4]{\sim}M) }
\arrow
\subscheme{
\chemfig{H_2C=[@{bond}]CH_2}
\arrow{0}[-90,.23]
\chemfig{ M (-[0]M{\sim}) (-[4]{\sim}M) }
\chemmove{
\node[below=3px of bond] (double_bond) {};
\node[below=19px of bond] (solid_surface) {};
\draw[-stealth](double_bond)--(solid_surface);
}
}
\schemestop
\end{document}
答案1
问题是 后面有一个你不想要的空格\chemfig{ M(-[0]M{\sim}) (-[4]{\sim}M) }
。添加%
以删除行末的空格。
\subscheme{
\chemfig{H_2C=[@{bond}]CH_2}
\arrow{0}[-90,.23]
\chemfig{ M(-[0]M{\sim}) (-[4]{\sim}M) }% <--------NEED THIS!!
\chemmove{
\node[below=3px of bond] (double_bond) {};
\node[below=19px of bond] (solid_surface) {};
\draw[-stealth](double_bond)--(solid_surface);
}
}
\schemestop
答案2
没有必要使用 \subscheme 或 \chemmove,可以使用更短的代码。无需使用 \arrow 命令即可将箭头插入分子内部
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{chemfig}
\usetikzlibrary{shapes,positioning,intersections,quotes}
\setchemfig{%
arrow offset=9pt,
arrow coeff=0.7,
+ sep left=0.3em,
+ sep right=0.3em,
atom sep=1.5em,
fixed length=true
}
\begin{document}
\schemestart
\chemfig{C(-[3]H)(-[5]H)=C(-[1]H)-[7]H}
\arrow{0}[,0] \+
\chemfig{ M(-[0]M{\sim})(-[4]{\sim}M)}
\arrow
\chemfig{H_2C=[,.5](-[6,,,,->,shorten <=2pt]M(-[0]M{\sim})(-[4]{\sim}M))=[,.5]CH_2}
\schemestop
\end{document}