How to include a chemical reaction in the equation numbering?

I would like to have my chemical reaction as equation number 0.1 and the equation (K_D) as an equation with the second number 0.2.

  \documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{chemmacros}

\begin{document}

\begin{align*}
\ch{S + E <>[ $k_{\mathrm{SI}}$ ][ $k_{\mathrm{IS}}$ ] E.I <>[ $k_{\mathrm{PI}}$ ][ $k_{\mathrm{IP}}$ ] P + E}
\begin{align*}

$$\label{} K_{D} = \frac{[A][B]^{N_{max}}}{[AB_{N_{max}]}} = \frac{k_{off}}{k_{on}}.$$

\end{document}


With Alex's suggestion I got this:

This is the SOLUTION:

$$\ch{ A + B -> C + D }$$

• Thanks for providing code with your question. However, at present it does not compile. For completeness and later reference, could you add the \documentclass and the \usepackages? – Marijn Oct 26 '17 at 21:12

You can use numberwithin{equation}{section}:

    \documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{chemmacros}
\begin{document}

\numberwithin{equation}{section}
\begin{align}
\ch{S + E <>[ $k_{\mathrm{SI}}$ ][ $k_{\mathrm{IS}}$ ] E.I <>[                 $k_{\mathrm{PI}}$ ][ $k_{\mathrm{IP}}$ ] P + E}
\end{align}

$$\label{} K_{D} = \frac{[A][B]^{N_{max}}}{[AB_{N_{max}]}} = \frac{k_{off}} {k_{on}}.$$

\end{document}

• @Marijn, I added the document class and the packages required to compile. – Alex Oct 29 '17 at 10:57
• unfortunately your solution only provides the numbering expansion of the existing equation numbering – Mathy Oct 29 '17 at 16:45
• indeed your example works, but when I transpose it to my case then its not working. See image posted in the question – Mathy Oct 29 '17 at 16:51
• solution posted in main question window – Mathy Oct 29 '17 at 17:00
• @Mathy, are you adding any \section or \subsection? I don't see a reason to have 0.2.1 instead of 0.1. And why is your first equation without number? Did you see that (in my answer) I removed the asterisks from the align environment? – Alex Oct 29 '17 at 21:35