1

I wanted to give my answer to this question

How to align chemical reactions in multiple environments?

with the environment reactions into the manual of chemmacros. I think always that my low level to understand English language is my Achilles' heel.

My apologies to the author of the package Clemens Niederberger of chemmacros v5.10 2020/02/03 for this question. I have seen your guide to the pag. 43:

enter image description here

But how does the reactions environment operate? I don't understand it. For this MWE I have an error:

! LaTeX3 Error: The key 'chemmacros/reactions/before-tag' is unknown and is (LaTeX3) being ignored. For immediate help type H . ...

l.10 }

?

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{chemmacros} %%%%% <---- or chemformula?
\chemsetup[reactions]{
 before-tag =  , %%%%<----automatic number without bold characther
 tag-open = ( ,
 tag-close = )
 }
\begin{document}
\begin{reactions}
 A + 2 B &-> 3 C + D "\label{rxn:test}"
\intertext{Some text in between aligned reactions}
 E + F &<=> G + 1/2 H
\end{reactions}
\end{document}
  • 1
    You need to load chemmacros with the reactions module. – cgnieder Feb 15 at 22:58
  • @cgnieder Hi, I have put after \begin{document} the macro \chemsetup[reactions]{ before-tag = , %%%%<----automatic number without bold characther tag-open = ( , tag-close = ) } but I have an error: The key chemmacros/reactions/before-tag' is unknown and is [ }]. Please, can I have an answer? Thank you very much. – Sebastiano Feb 16 at 10:40
  • 1
    I see that. But what you do not do is load the module reactions which defines the environment and the options. – cgnieder Feb 16 at 14:42
1

Addendum: I leave this post to remember my mistake for the next time.


After the comment of the very good user @cgnieder, excuse me again with the author of the package. I have not read to the begin of the manual that needed to be loaded \usechemmodule{all} or the specific module \usechemmodule{reactions}. I'm very happy to compile himself the code. Thank you very much @cgnieder.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{chemmacros}
\usechemmodule{reactions}
\chemsetup[reactions]{
 before-tag =  ,
 tag-open = ( ,
 tag-close = )
 }
\begin{document}

\begin{reactions}
 A + 2 B &-> 3 C + D "\label{rxn:test}"
\intertext{After many attempts I was been able to compile it :-)}
 E + F &<=> G + 1/2 H
\end{reactions}
\end{document}
| improve this answer | |

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.