我有以下与 MWE 相关的化学反应方案:
平均能量损失
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
P \arrow(P--Q){<=>[$\mathrm{k_{pq}}$]} Q
\arrow{<=>[$\mathrm{k_{qs}}$]}[30] S \arrow(S--T){<=>[][$\mathrm{k_{st}}$]}[-30] T
\arrow(@Q--R){<=>[][$\mathrm{k_{qr}}$]}[-30] R
\arrow(@R--@T){<=>[][$\mathrm{k_{rt}}$]}
\arrow(@T--U){<=>[][$\mathrm{k_{tu}}$]} U
\arrow(@U--V){->[$\mathrm{k_{uv}}$]} V
\schemestop
\end{document}
如何向特定方案中添加阴影圆角矩形?举例来说,请参见下图:
答案1
\documentclass{article}
\usepackage{chemfig}
\usepackage{tikz}
\usetikzlibrary{fit}
% from https://tex.stackexchange.com/questions/402462/tikz-equivalent-of-pstricks-commands-ncbar-and-rnode
\newcommand{\tikznode}[2]{%
\ifmmode%
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {$#2$};
\else
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {#2};%
\fi}
\begin{document}
\schemestart
P \arrow(P--Q){<=>[$\mathrm{k_{pq}}$]} \tikznode{Q}{Q}
\arrow{<=>[$\mathrm{k_{qs}}$]}[30] \tikznode{S}{S}
\arrow(S--T){<=>[][$\mathrm{k_{st}}$]}[-30] \tikznode{T}{T}
\arrow(@Q--R){<=>[][$\mathrm{k_{qr}}$]}[-30] \tikznode{R}{R}
\arrow(@R--@T){<=>[][$\mathrm{k_{rt}}$]}
\arrow(@T--U){<=>[][$\mathrm{k_{tu}}$]} U
\arrow(@U--V){->[$\mathrm{k_{uv}}$]} V
\schemestop
% from https://tex.stackexchange.com/questions/251330/draw-rectangle-around-nodes-with-tikz
\tikz[overlay,remember picture]{\node[draw,inner sep=2mm,rounded corners, fit=(S) (R) (T) (Q)] {};}
\end{document}