# Chemmacros write next to reaction

I am using the chemmacros package and I would like to know if it's possible to write next to a reaction, for example, like this: Or maybe with the help of other package.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\begin{document}
\begin{reactions*}
2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}\\
2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}\\
2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}
\end{reactions*}
\end{document}

• Is there any special trick necessary to compile the code? I get Paragraph ended before \@fileswith@ptions was complete. – Snobbish Hi-rep users Apr 25 '19 at 19:17
• missing closing braces of \usepackage{babel} @valerie – Weijun Zhou Apr 25 '19 at 19:18
• @WeijunZhou Thanks! – Snobbish Hi-rep users Apr 25 '19 at 19:24

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\begin{document}
\begin{reactions*}
2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}  & text\\
2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}  & text\\
2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}  & text
\end{reactions*}
\end{document}


• Thanks, this works for me, but I seems that this way you can't use spaces, because it seems to ignore them. – Daniel Álvarez Apr 28 '19 at 17:43

chemmacros has a special function to typeset such states:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\usepackage[figuresleft]{rotating}
\usepackage{hyperref}
\usepackage[spanish,es-noquoting]{babel}
\usepackage{chemmacros}
\chemsetup{modules={reactions,thermodynamics}}
\usepackage[margin=2.5cm]{geometry}
\renewcommand{\baselinestretch}{1.15}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\pagenumbering{roman}

\NewChemState\foo{symbol=H,superscript=$\circ$,unit=\kilo\joule,subscript-pos=right}

\begin{document}

\begin{align*}
\ch{2 NH3\gas{} + 5/2 O2\gas{} &-> 3 H2O\gas{} + 2 NO\gas{}} && \foo(A){+2035}  \\
\ch{2 NH3\gas{} + 2 O2\gas{} &-> 3 H2O\gas{} + N2O\gas{}}&& \foo(B){+36}\\
\ch{2 NH3\gas{} + 3/2 O2\gas{} &-> 3 H2O\gas{} + N2\gas{}}&& \foo(C){-285}
\end{align*}

\end{document}