# Customize numbering of equations, using roman numerals some places and arabic numerals other places [separate counters]

For my chemistry course, our lab-leader insists that we use roman numerals for the numbering of reaction equations, and arabic numerals for the numbering of mathematical equations. So when I write

some reaction equation

I would like LaTeX to use roman numerals to number the equation, and I would like them to follow a counter different from the counter for the arabic numerals. Can I customize it in this way, or if it's difficult, how could I do it manually?

Also, I would like the mathematical equations to be numbered, for instance,(1-1) instead of (1)when it's the first mathematical equation of section 1. How can I do that?

• This post covers the use of Roman numerals: tex.stackexchange.com/questions/63138/… And this article covers numbering, though the format is "1.1" as opposed to "1-1": en.wikibooks.org/wiki/LaTeX/…
– Aces
Commented Oct 2, 2016 at 13:06
• This would use different counters, I suppose? Commented Oct 2, 2016 at 13:18
• Please clarify if different counters are to be used for reaction equations and "ordinary" equations.
– Mico
Commented Oct 2, 2016 at 13:19
• @Bernard Yes, I forgot to specify that. I've edited the post now. Commented Oct 2, 2016 at 13:57

In the following example I use the reaction environment as given by Martin H. to question 11456 and I changed to Roman the numbering.

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,chemmacros}
\usepackage[version=3]{mhchem}
\usepackage{enumitem}
\newcounter{tmp}
\renewenvironment{reaction}[1][\relax]{%
\setcounter{tmp}{\value{equation}}
\setcounter{equation}{\value{reaction}}
\renewcommand{\theequation}{\Roman{equation}}
$$\addcontentsline{rxs}{reactions}{\protect\numberline{\thereaction}#1} }{%$$
\setcounter{reaction}{\value{equation}}
\setcounter{equation}{\value{tmp}}
}

\begin{document}
In this exemple mathematical equations are numbered with arabic numbers
$$\rho_A(\mathbf r) = \int\hat A(\mathbf r,\mathbf p)F(\mathbf r,\mathbf p)d\mathbf p \label{eq:odp}$$
where $\hat A(\mathbf r,\mathbf p)$ is a one electron operator and
$F(\mathbf{r, p})$ the joint distribution of position and momentum.
$$\rho_A(\mathbf r)= A(\mathbf r)\rho(\mathbf r) \label{ref:eq21}$$
and chemical equations with capital roman letters
\begin{reaction}
\ce{CH4 + 2O2 -> CO2 + 2H2O}
\end{reaction}
$$\langle \hat A\rangle_{\Omega_I}=\int\limits_{\Omega_I} \rho_A(\mathbf r) d\mathbf r$$

\begin{reaction}
\ce{ SO4^2- + Ba^2+ -> BaSO4 v}
\end{reaction}
\end{document}

• Great, thanks. I actually "solved" it, meaning it looks the way I want it to now. But your solution is probably better, I'll try it out. Commented Oct 2, 2016 at 17:01