Is there a way to create an environment for reactions defined with mhchem that behaves similarly to equation in terms of numbering the reactions (including a \nonumber command)? Can I get a list of those reactions?
\documentclass{article}
\usepackage[version=3]{mhchem}
\newcounter{rxnum}
\newenvironment{reaction}{
\refstepcounter{rxnum}
\noindent
%???
}{
%???
\par\noindent
}
\begin{document}
\begin{reaction}
\ce{X + Y -> XY}
\end{reaction}
\begin{reaction}
\ce{XX + YY -> X2Y2} \\%<- newline just like in equation
\ce{A + B -> C}
\end{reaction}
\end{document}
This is a two part question. The first part is about creating an environment that behaves similarly to equation, but for reactions defined in mhchem. I had a look in source2e in the definition of equation (around l. 293 in source2e) but couldn't quite figure out how to transfer that onto my new environment.
The second part is about how to create a list of those reactions containing the reaction number, the page they occur on and optional a description that is only printed in the \listofreactions.
For example:
In the code I write
\begin{reaction}
\ce{X + Y ->XY}\descriptionforlist{XY formation reaction}\\
\ce{A +B -> C}
\ce{G + H -> J}\nonumber
\end{reaction}
Then in the list it should appear as
List of reaction
R 1: XY formation reaction 6
R 2: 6

