0

I'm trying to use the thermodynamics module, among others, to display enthalpy but it doesn't seem to work.

\documentclass[twocolumn]{article}
\usepackage{chemmacros}
\usechemmodule{all}

\begin{document} 
  \enthalpy*(r){1} 
\end{document}
  • 1
    Can you be a bit more specific on the doesn't seem to work part? Right now, there are issues on MikTeX, reports have already been made. – Johannes_B Oct 6 '15 at 11:19
  • If \usechemmodule is undefined then you have an outdated version and you should just leave it away. If you get errors about modules not loaded then I suspect you're using MiKTeX: there are known issues which should be fixed soon (sourceforge.net/p/miktex/bugs/2403). Meanwhile you can use \usepackage[compatibility=4.7]{chemmacros}, leave \usechemmodule away, and work with the older version. (Beware that then the command was called \Enthalpy) – clemens Oct 6 '15 at 11:38
  • (The older manual is available here: github.com/cgnieder/chemmacros/releases/tag/v4.7) – clemens Oct 6 '15 at 11:40
  • Sorry for the jumble. I'm using sharelatex.com but I also tried running it on MacTeX. The first message I got was that \enthalpy was undefined. When I added \usechemmodule{all}, it said \usechemmodule was undefined as well. – Gabriel Christian Alava Oct 6 '15 at 14:35
  • 1
    I suppose that sharelatex is still shipping an older version of chemmacros. I'm not sure about their update policies, but in general web-LaTeX services aren't the fastest, I seem to have gathered. – moewe Oct 6 '15 at 15:54
2

The following should work both with versions prior to v5.0 and current versions:

\documentclass{article}
\usepackage{chemmacros}

% versions below 5.0 don't have the macro. Let's provide it
% to expand to the “false” branch if it isn't defined:
\providecommand\IfChemCompatibilityTF[4]{#4}

% let's check if the current version of chemmacros (or rather the
% compatibility mode it is used with) is 5.0 or newer:
\IfChemCompatibilityTF{>=}{5.0}{
  % load all the modules we need. “all” is overkill but will do:
  \usechemmodule{all}
}{
  % in the new versions \Enthalpy is called \enthalpy. Let's
  % take care we can use the same command either way:
  \let\enthalpy\Enthalpy
}

\begin{document} 

\enthalpy*(r){1} 

\end{document}

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.