2

I am using chemmacros to write chemical reactions, and want to change the way they are numbered from {1},{2},{3}.. to [R1],[R2],[R3].

I have tried what is on the package (page 43) but it doesn't work, maybe because my version is old (4.6). Here is a MWE

\documentclass[12pt,twoside
]{report}
\usepackage{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc} %relacionado al input
\usepackage[T1]{fontenc} 
\usepackage{chemmacros}
\usepackage{gensymb}
\begin{document}
\begin{reactions}
A + B &<=> C + clus \label{reaccio4} \\
D + clus &<=> F + H \label{reaccionRef3}\\
A + B + D &<=> F + G + H  \label{reaccion_neta3}
\end{reactions}
\end{document}

It produces:

image

Any help?

  • Your code is not compilable for me: there's a problem with the labels. Without labels, I know how to do it. – Bernard Sep 8 '17 at 18:45
  • mm @Bernard that is strange, I need the labels and it is in the example of the package also.. – user134500 Sep 8 '17 at 19:34
  • I have an error message – \chemformula seems to be an unknown command (it appears in the .aux file, due to the labels). – Bernard Sep 8 '17 at 19:36
  • 1
    Not with this very code: I had to add \chemsetup{modules=all} to make it accept the reactions environment and compile without error if I commented the labels. – Bernard Sep 8 '17 at 19:48
  • 1
    the simplest solution is (i) update you chemmacros package to recent version (v5.8b), (ii) set up your equations as is described in package manual on bottom of page 43. – Zarko Sep 9 '17 at 3:45
4

Enclose the \label{...} in "...":

\begin{reactions}
  A + B &<=> C + clus "\label{reaccio4}" \\
  D + clus &<=> F + H "\label{reaccionRef3}" \\
  A + B + D &<=> F + G + H  "\label{reaccion_neta3}"
\end{reactions}

With versions older than v5.0 of chemmacros use

\renewtagform{reaction}{[R}{]}

in order to change the tag form of the reaction tags.

Your Answer

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