I'm new to Latex and I'm having some trouble with a simple chemical equation.
I have the following code:
\documentclass{article}
\usepackage[version=3]{mhchem} % Package for chemical equation typesetting
\usepackage{amssymb}
\begin{document}
\begin{equation} \ce{N2(g) + 3H2(g) -> 2NH3(g)}} \end{equation}
$\Delta H_{\mathrm{f}}^\circ = \SI{-92.5}{kJ}$
\end{document}
This prints everything that I need, but on separate lines. I would just like the heat of formation (deltaH=-92.5kj) to be inline with the equation. I've tried multiple approaches, but keep getting stuck. I haven't seen this discussed on TEX or elsewhere.
Best Answer
You can simply write it inside the equation and maybe add some horizontal space between with
\quad
or\qquad
:An alternative using
chemmacros
:For a non-molar heat of formation it would let you easily define a command
\formation
:There are a number of options for customization (e.g. regarding the position of the subscript).