could somebody point out what to change in rmstyle.cls file to get siunitx working?

Here is the MWE:

% \documentclass{article}[12pt]

MWE siunitx problem

\author{First Author\footnote{Corresponding author. \texttt{first.author@xx.yy}}, Second Author and Third Author

  • Can you tell us what is going wrong for you? For me, everything seems to be fine. – Joseph Wright Mar 26 '19 at 8:36
  • Thanks for testing. I am using Overleaf, where it doesn't work: overleaf.com/1462967519gxqkdvypmnwm – Tero Frondelius Mar 26 '19 at 8:41
  • 1
    The class redefines the TeX primitive \year, which siunitx (or rather expl3) needs, but the class also needs its definition of \year, so we need to juggle with \year a bit. Add \newcommand*{\texyear}{}\newcommand*{\classyear}{}\let\texyear\year before you load the class. Directly after you load the class call \let\classyear\year\let\year\texyear before you load siunitx. After you have loaded siunitx call \let\year\classyear. – moewe Mar 26 '19 at 9:22
  • 1
    Aha! Much easier: Just load \RequirePackage{expl3} before the documentclass. No need to juggle with \year at all. See tex.stackexchange.com/q/418954/35864 – moewe Mar 26 '19 at 9:27
  • Thanks a lot. Do you want to make it as an answer? I am new to this forum. – Tero Frondelius Mar 26 '19 at 10:44

Just like ieeeaccess the class rmstyle redefines the primitive \year. The original definition of \year is needed by expl3 (which is loaded by siunitx) to work properly.

You can circumvent the issue by loading expl3 even before the document class as suggested by Ulrike Fischer in her answer to How to compile IEEE Access templates with XeLaTeX with fontspec?


note that documentlcass options like 12pt should be given in square brackets before the class name not afterwards.

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.