0

I would love to be able to represent a network of reactions in a square like so (pardon the scribbling)

enter image description here

note: I don't care about the squares around the nodes of the reaction, I can live without those.

I've been doing my reactions using mhchem, and I found this answer showing how to display a network of chemical reactions using chemfig. However, I need the arrows in the reactions to show the reatcion rates, like in the picture above, and I couldn't find how to do that with chemfig, nor with mhchem.

Puff
  • 103

2 Answers2

4

Using only chemfig

\documentclass[border=2mm]{standalone}
\usepackage{chemfig}
\usepackage{amsmath}
\begin{document}
    \schemestart
    \chemfig{@{a}P_{00}} \arrow{<=>[$R_{H+}$][$R_{H-}$]}[0,1.5] \chemfig{@{b}P_{10}}
    \arrow(@{a}--){<=>[$K_{S+}$][$K_{S-}$]}[270,1.5] \chemfig{P_{01}} \arrow{<=>[$K_{SH+}$][$K_{SH-}$]}[0,1.5] \chemfig{P_{11}}
    \arrow(@{b}--){<=>[$R_{HS+}$][$R_{HS-}$]}[270,1.5]
    \schemestop
\end{document}

enter image description here

Or, using the command \tiny

\documentclass[border=2mm]{standalone}
\usepackage{chemfig}
\usepackage{amsmath}
\begin{document}
    \schemestart
    \chemfig{@{a}P_{00}} \arrow{<=>[{\tiny $R_{H+}$}][{\tiny$R_{H-}$}]}[0,1.5] \chemfig{@{b}P_{10}}
    \arrow(@{a}--){<=>[*0{\tiny$K_{S+}$}][*0{\tiny$K_{S-}$}]}[270,1.5] \chemfig{P_{01}} \arrow{<=>[{\tiny$K_{SH+}$}][{\tiny$K_{SH-}$}]}[0,1.5] \chemfig{P_{11}}
    \arrow(@{b}--){<=>[*0{\tiny$R_{HS+}$}][*0{\tiny$R_{HS-}$}]}[270,1.5]
    \schemestop
\end{document}

enter image description here

CrocoDuck
  • 3,875
2

Here is a tikz-cd option:

enter image description here

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=1.5cm, column sep=1.5cm, cells={nodes={draw, outer sep=3mm, minimum height=8mm}}] P_{00}\arrow[r, harpoon, shift left, "k_{H^+}"]\arrow[d, harpoon', shift right, "k_{S^+}"'] & |[red, text=black]|P_{10}\arrow[l, harpoon, shift left, "k_{H^-}"]\arrow[d, harpoon, shift left, "k_{HS^+}"]\ P_{01}\arrow[r, harpoon', shift right, "k_{SH^+}"']\arrow[u, harpoon', shift right, "k_{S^-}"'] & |[red, dashed, text=black]|P_{11}\arrow[l, harpoon', shift right, "k_{SH^-}"']\arrow[u, harpoon, shift left, "k_{HS^-}"] \end{tikzcd}

\end{document}

Sandy G
  • 42,558
  • Thanks for that demonstration of tikz-cd. I just wondered if you can raise the + and - in the subscripts a bit more. Making them a bit smaller could be achieved by {\small +}, but raising that? – alchemist Feb 07 '23 at 22:16
  • Yes. There are several ways to do this. For example, see here or here – Sandy G Feb 07 '23 at 23:03