# How can I display rate constants over the arrows using chemmacros?

I tried to use

\begin{reaction} E + S <=>[$k_1$][$k_{-1}$] ES <=> EP <=> E + P \end{reaction}


but it wouldn't display the subscripts properly. I'm using sharelatex.com but I run MacTeX offline.

## 1 Answer

I suspect by

it wouldn't display the subscripts properly

you mean that the underscore is printed instead of interpreted as subscript?

You have two options:

• leave spaces around the math or
• use \sb instead of _

Since this is unrelated to the chemmacros package and its {reaction} environment but really is due to the behaviour of chemformula I don't use chemmacros in the following example:

\documentclass{article}
\usepackage{chemformula}
\begin{document}

% wrong:
\ch{ E + S <=>[$k_1$][$k_{-1}$] ES <=> EP <=> E + P }

% works:
\ch{ E + S <=>[$k\sb{1}$][$k\sb{-1}$] ES <=> EP <=> E + P }

% works but inserts a space in front of the math:
\ch{ E + S <=>[ $k_1$ ][ $k_{-1}$ ] ES <=> EP <=> E + P }

% works:
\ch[math-space=0pt]{ E + S <=>[ $k_1$ ][ $k_{-1}$ ] ES <=> EP <=> E + P }

\end{document}

• Just stumbled upon this with the same question… How would I know to use \sb? I managed to find some information about the command, but can't find anything that points it out as an alias for _ (latexdef -f _ doesn't mention the alias, though latexdef -f sb points back to the original definition). Any suggestions here? – Dustin Wheeler Jan 30 '19 at 15:41
• @DustinWheeler It should be mentioned in a comprehensive LaTeX introduction. The LaTeX kernel itself does \let\sp=^ and \let\sb=_ – cgnieder Jan 31 '19 at 13:13
• Ahh, thanks. I should get used to digging into code more often… the idea still doesn't come naturally to me. BTW, your chem packages are fantastic, thanks for the great work! – Dustin Wheeler Jan 31 '19 at 16:58