我在化学图形中遇到了一个小的对齐/间距问题。我正在使用这个 -X> 箭头,这是我在这我相信这篇文章。但正如您在调试信息中看到的那样,甘氨酸的结构与谷氨酰半胱氨酸的结构重叠。最重要的是,结构与“甘氨酸”标签之间的距离大于与其他结构的标签/化学名称之间的距离。我不知道如何解决这个问题,而不会让 -X> 箭头变得异常长。有人能帮忙吗?
我的代码(请原谅冗长的序言,它是用于 -X> 箭头;请参阅上面链接的帖子):
\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,chemformula}
\usepackage[version=4,arrows=pgf-filled]{mhchem}
\usepackage{tikz-cd}
\usetikzlibrary{shapes.geometric, arrows}
\usepackage{amsmath,amssymb}
% allow for editing Chemfig
\catcode`\_=11
% Initial arguments:
% #1, #2: Same as for -U> (above arrow)
% #3: Additional label at midpoint (also above arrow)
% #4, #5, #6: Like #1, #2, and #3, but below arrow
% #7: Optional shift, default 0
% #8: Optional arrow radius
% #9: Optional arrow angle
\definearrow9{-X>}{%
\CF_arrowshiftnodes{#7}%
\expandafter\draw\expandafter[\CF_arrowcurrentstyle](\CF_arrowstartnode)--(\CF_arrowendnode)node[midway](Xarrowarctangent){};%
\CF_ifempty{#8}
{\def\CF_Xarrowradius{0.333}}
{\def\CF_Xarrowradius{#8}}%
\CF_ifempty{#9}%
{\def\CF_Xarrowabsangle{60}}
{\pgfmathsetmacro\CF_Xarrowabsangle{abs(#9)}}
% Draw top arrow (start)
\edef\CF_tmpstr{[\CF_ifempty{#1}{draw=none}{\unexpanded\expandafter{\CF_arrowcurrentstyle}},-]}%
\expandafter\draw\CF_tmpstr (Xarrowarctangent)%
arc[radius=\CF_compoundsep*\CF_currentarrowlength*\CF_Xarrowradius,start angle=\CF_arrowcurrentangle-90,delta angle=-\CF_Xarrowabsangle]node(Xarrow1start){};
% Draw bottom arrow (end)
\edef\CF_tmpstr{[\CF_ifempty{#2}{draw=none}{\unexpanded\expandafter{\CF_arrowcurrentstyle}},-CF]}%
\expandafter\draw\CF_tmpstr (Xarrowarctangent)%
arc[radius=\CF_compoundsep*\CF_currentarrowlength*\CF_Xarrowradius,%
start angle=\CF_arrowcurrentangle-90,%
delta angle=\CF_Xarrowabsangle]%
node(Xarrow1end){};
% Draw bottom arrow (start)
\edef\CF_tmpstr{[\CF_ifempty{#4}{draw=none}{\unexpanded\expandafter{\CF_arrowcurrentstyle}},-]}%
\expandafter\draw\CF_tmpstr (Xarrowarctangent)%
arc[radius=\CF_compoundsep*\CF_currentarrowlength*\CF_Xarrowradius,start angle=\CF_arrowcurrentangle+90,delta angle=\CF_Xarrowabsangle]node(Xarrow2start){};
% Draw bottom arrow (end)
\edef\CF_tmpstr{[\CF_ifempty{#5}{draw=none}{\unexpanded\expandafter{\CF_arrowcurrentstyle}},-CF]}%
\expandafter\draw\CF_tmpstr (Xarrowarctangent)%
arc[radius=\CF_compoundsep*\CF_currentarrowlength*\CF_Xarrowradius,%
start angle=\CF_arrowcurrentangle+90,%
delta angle=-\CF_Xarrowabsangle]%
node(Xarrow2end){};
% Insert labels
\pgfmathsetmacro\CF_tmpstra{\CF_Xarrowradius*cos(\CF_arrowcurrentangle)<0?"-":"+"}%
\pgfmathsetmacro\CF_tmpstrb{\CF_Xarrowradius*cos(\CF_arrowcurrentangle)<0?"+":"-"}%
\ifdim\CF_Xarrowradius pt>0 pt
\CF_arrowdisplaylabel{#1}{0}\CF_tmpstra{Xarrow1start}{#2}{1}\CF_tmpstra{Xarrow1end}%
\CF_arrowdisplaylabel{#4}{0}\CF_tmpstrb{Xarrow2start}{#5}{1}\CF_tmpstrb{Xarrow2end}%
\CF_arrowdisplaylabel{#3}{0.5}\CF_tmpstra\CF_arrowstartnode{}{}{}\CF_arrowendnode%
\CF_arrowdisplaylabel{#6}{0.5}\CF_tmpstrb\CF_arrowstartnode{}{}{}\CF_arrowendnode%
\else
\CF_arrowdisplaylabel{#2}{0}\CF_tmpstra{Xarrow1start}{#1}{1}\CF_tmpstra{Xarrow1end}%
\CF_arrowdisplaylabel{#5}{0}\CF_tmpstrb{Xarrow2start}{#4}{1}\CF_tmpstrb{Xarrow2end}%
\CF_arrowdisplaylabel{#3}{0.5}\CF_tmpstra\CF_arrowstartnode{}{}{}\CF_arrowendnode%
\CF_arrowdisplaylabel{#6}{0.5}\CF_tmpstrb\CF_arrowstartnode{}{}{}\CF_arrowendnode%
\fi
}
% stop editting chemfig
\catcode`\_=8
\begin{document}
\begin{figure}
\centering
\setchemfig{scheme debug=true}
\schemestart
\chemname{\chemfig{(-[:145,0.75]HOOC)(-[:270,0.75]NH_2)(-[:35,0.75]-[:325,0.75]-[:35,0.75](=[:90,0.75]O)-[:325,0.75]OH)}}{\color{blue!70}Glutamat}
\+
\chemname{\chemfig{(-[:145,0.75]HOOC)(-[:270,0.75]NH_2)(-[:35,0.75]-[:325,0.75]SH)}}{\color{blue!70}Cystein}
\arrow(@c1.293--){-X>[*{0.180}\small\chemfig{ATP}][*{0.180}\small\chemfig{ADP+P_i}][][][][*{0}\small \color{blue!70}Glutamyl-Cystein-Ligase][][]}[-90,1]
\chemname{\chemfig{(-[:145,0.75]HOOC)(-[:270,0.75]NH_2)(-[:35,0.75]-[:325,0.75]-[:35,0.75](=[:90,0.75]O)-[:325,0.75]\chembelow{N}{H}-[:35,0.75](-[:90,0.75]-[:135,0.75]HS)-[:325,0.75]COOH)}}{\color{blue!70}$\gamma$-Glutamylcystein}
\arrow(@c2--){-X>[*{0.180}\small\chemfig{ATP}][*{0.180}\small\chemfig{ADP+P_i}][*{0}\small \color{blue!70}Glutathion-Synthetase][*{0}\chemname{\chemfig{NH_2-[:90,0.75]-[:35,0.75](=[:90,0.75]O)(-[:325,0.75]OH)}}{\color{blue!70}Glycin}][][][][]}[-90,2]
\chemname{\chemfig{(-[:145,0.75]HOOC)(<:[:270,0.75]NH_2)(-[:35,0.75]-[:325,0.75]-[:35,0.75](=[:90,0.75]O)-[:325,0.75]\chembelow{N}{H}>[:35,0.75](-[:90,0.75]-[:135,0.75]HS)-[:325,0.75](=[:270,0.75]O)-[:35,0.75]\chemabove{N}{H}-[:325,0.75,1]-[:35,0.75]COOH)}}{\color{blue!70}Glutathion}
\schemestop
\end{figure}
\end{document}
答案1
箭头上有一点变化
\arrow(@c2--){-X>[*{0.180}\small\chemfig{ATP}][*{0.180}\small\chemfig{ADP+P_i}][*{0}\small \color{blue!70}Glutathion-Synthetase][*{0.45}\chemname{\chemfig{NH_2-[:90,0.75]-[:35,0.75](=[:90,0.75]O)(-[:325,0.75]OH)}}{\color{blue!70}Glycin}][][][][0.25]}[-90,3]
更新:完整的解决方案
\schemestart
\subscheme{\chemname{\chemfig{NH_2-[2,0.75,1](-[:145,0.75]HOOC)-[:35,0.75]-[:325,0.75]-[:35,0.75](-[:325,0.75]OH)=[:90,0.75]O}}{\color{blue!70}Glutamat}
\arrow{0}[,0.2] \+ \arrow{0}[,0.2]
\chemname{\chemfig{NH_2-[2,0.75,1](-[:145,0.75]HOOC)-[:35,0.75](=[:90,0.75,,,draw=none]\phantom{O})-[:325,0.75]SH}}{\color{blue!70}Cystein}}
\arrow(@c1.295--){-X>[*{0.180}\small\chemfig{ATP}][*{0.180}\small\chemfig{ADP+P_i}][][][][*{0}\small \color{blue!70}Glutamyl-Cystein-Ligase][][]}[-90,1]
\chemname{\chemfig{NH_2-[2,0.75,1](-[:145,0.75]HOOC)-[:35,0.75]-[:325,0.75]-[:35,0.75](=[:90,0.75]O)-[:325,0.75]\chembelow{N}{H}-[:35,0.75](-[:90,0.75]-[:135,0.75]HS)-[:325,0.75]COOH}}{\color{blue!70}$\gamma$-Glutamylcystein}
\arrow{-X>[*{0.180}\small\chemfig{ATP}][*{0.180}\small\chemfig{ADP+P_i}][*{0}\small\color{blue!70}Glutathion-Synthetase][*{0.45}\chemname{\chemfig{NH_2-[2,0.75]-[:35,0.75](-[:-35,0.75]OH)=[2,0.75]O}}{\color{blue!70}Glycin}][][][][0.25]}[-90,2.6]
\chemname{\chemfig{(-[:145,0.75]HOOC)(<:[:270,0.75]NH_2)(-[:35,0.75]-[:325,0.75]-[:35,0.75](=[:90,0.75]O)-[:325,0.75]\chembelow{N}{H}>[:35,0.75](-[:90,0.75]-[:135,0.75]HS)-[:325,0.75](=[:270,0.75]O)-[:35,0.75]\chemabove{N}{H}-[:325,0.75,1]-[:35,0.75]COOH)}}{\color{blue!70}Glutathion}
\schemestop