我想在同一行上显示一系列反应(对于化学家来说,坎尼扎罗反应)。在我的例子中,我必须在箭头上写一个长分子(Ph-CH=O),但我的代码有问题:要么我有正确的大小,但箭头上的文字不起作用(使用命令\arrow[,2,](start.mid east--.mid west){->[\chemfig{Ph-CH=O}]}
),要么我有箭头上的文字,但大小不正确(使用命令\arrow(start.mid east--.mid west){->[\chemfig{Ph-CH=O}]}
)。
如何增加箭头的大小,同时保留其上方的文本?
\documentclass[border=1mm]{standalone}
\usepackage{graphicx} % Required for inserting images
\usepackage{chemfig}
\begin{document}
\schemestart
\chemfig{[:-30]*6(=-=(-@{atoc}C([6]=[@{db}]@{atoo1}O)-H)-=-)}
\arrow(start.mid east--.mid west){->[\chemfig{@{atoo2}\chemabove{O}{\scriptstyle\ominus}}H]}
\chemfig{[:-30]*6(=-=(-C([6]-[@{sb1}]@{atoo1}\chembelow{O}{\scriptstyle\ominus})([2]-OH)-[@{sb2}]H)-=-)}
\arrow[,2,](start.mid east--.mid west){->[\chemfig{Ph-CH=O}]}
\chemfig{[:-30]*6(=-=(-C([1]-@{atoo2}O-[@{sb}0]@{atoh}H)([6]=O))-=-)}
\arrow{0}
\chemfig{[:-30]*6((-C(-[5]H)(-[7]H)-[2]@{atoo1}\chemabove{O}{\scriptstyle\ominus})-=-=-=)}
\chemmove[-stealth,shorten >=2pt,dash pattern=on 1pt off 1pt,thin]{
\draw[shorten <=7pt](atoo1.90) ..controls +(+90:8mm) and +(up:10mm)..(atoh);
\draw[shorten <=2pt](sb) ..controls +(up:5mm) and +(up:5mm)..(atoo2);}
\schemestop
\end{document}
答案1
因此?
你也可以缩短箭头上方分子的键
\documentclass[border=1mm]{standalone}
\usepackage{graphicx} % Required for inserting images
\usepackage{chemfig}
\begin{document}
\schemestart
\chemfig{[:-30]*6(=-=(-@{atoc}C([6]=[@{db}]@{atoo1}O)-H)-=-)}
\arrow(start.mid east--.mid west){->[\chemfig{@{atoo2}\chemabove{O}{\scriptstyle\ominus}}H]}
\chemfig{[:-30]*6(=-=(-C([6]-[@{sb1}]@{atoo1}\chembelow{O}{\scriptstyle\ominus})([2]-OH)-[@{sb2}]H)-=-)}
\arrow{->[\chemfig{Ph-[,.7]CH=[0,.7]O}]}[0,2]
\chemfig{[:-30]*6(=-=(-C([1]-@{atoo2}O-[@{sb}0]@{atoh}H)([6]=O))-=-)}
\arrow{0}
\chemfig{[:-30]*6((-C(-[5]H)(-[7]H)-[2]@{atoo1}\chemabove{O}{\scriptstyle\ominus})-=-=-=)}
\chemmove[-stealth,shorten >=2pt,dash pattern=on 1pt off 1pt,thin]{
\draw[shorten <=7pt](atoo1.90) ..controls +(+90:8mm) and +(up:10mm)..(atoh);
\draw[shorten <=2pt](sb) ..controls +(up:5mm) and +(up:5mm)..(atoo2);}
\schemestop
\end{document}