Most of the time I work with siunitx package I need to specify only units like: "give the answer in psia".

For achieving this every time I try with \unit{\watt} (W for example) but it produces a !Undefined control sequence. I need to use \SI{}{\watt} but I'm afraid this it's not the proper way.

I use PDFLatex as compiler and my config is like this:


%%%%%%%   Document configuration   %%%%%%%
\usepackage[letterpaper, margin=2.5cm]{geometry}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{8pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{8pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

%%%%%%%%%%%   Math   %%%%%%%%%%%
\sisetup{per-mode = fraction}

%%%%%%%%%    Custom units     %%%%%%%%%
\DeclareSIUnit\fahrenheit{\degree F}


    I like to output Watt as \unit{\watt}

Am I doing something wrong ?

  • 1
    What version of siunitx is installed on your device? (You will usually find this in the build log.) According to section 5 in the corresponding manual, you need siunitx version 3 for the new macros to be available. Some more information is available in tex.stackexchange.com/questions/601428.
    – epR8GaYuh
    Aug 31 '21 at 5:18
  • Thank you, I had updated the package a few days ago, but for some reason it failed. and looking at the.log you mentioned, I found out that I still had v2.8 I updated an it works now Aug 31 '21 at 6:21

If you have version 2, then \unit is not available and the older name is \si. As I've mentioned in my blog, you can move to the newer interfaces and cover both v2 and v3 by ensuring that the newer names are available


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.