1

I have some chemical reaction equations which I want to reference in the subscript of an inline equation.

\begin{subequations}
\begin{align}
\cee{
    \text{NO} +\text{O}_3 &-> \text{NO}_2 +\text{O}_2\label{eq:example1},\\
    \text{NO} + \text{O}_3 &-> \text{NO}_2^* + \text{O}_2\label{eq:example2},

}
\end{align}
\end{subequations}


$k_{\ref{eq:example2}}$

I want to refer to eq:example 2 as the subscript for k, so if example2 was equation 1b, it would be equivalent to:

$k_{1b}$

But 1b obviously changing according to the equation numbering. Is there any way to do this, as putting \ref in the $$ symbols does not work.

2

You may just set the reference in text mode. Load amsmath or mathtools for this.

% arara: pdflatex
% arara: pdflatex

\documentclass{article}
\usepackage[version=3]{mhchem}
\usepackage{mathtools}
\usepackage{hyperref}

\begin{document}
\begin{subequations}
    \begin{align}
        \cee{NO + O3 &-> NO2 + O2\label{eq:example1}\\
            NO + O3 &-> NO2^* + O2\label{eq:example2}}
    \end{align}
\end{subequations}
 $k_\text{\ref{eq:example1}}\ne k_\text{\eqref{eq:example2}}$
\end{document}

enter image description here

  • Thanks! Managed to get it to work, MikTex couldn't originally find mathtools, but fixed it by going to MikTex/Bin/ and running mpm_mfc_admin, then going Repository/Synchronise. Seems that the package manager hadn't updated since Mh got split into mathtools and breqn. – Alzinos Nov 14 '14 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.