[Tex/LaTex] Angstrom not working

units

Using \AA for angstrom is not working for me. When I write 1 \AA all I get is 2 (r)A in the output. I have tried putting the curly brackets around it {\AA} but still no success. I do not know why. I have even tried changing the fonts I am using. Any help will be appreciated.

Best Answer

\AA is a text command which essentially becomes \r{A}; \r is the command producing the "ring accent" and is invalid in math mode. Here's a way:

\newcommand{\angstrom}{\mbox{\normalfont\AA}}

If the unit must be used also in subscripts or superscripts,

\usepackage{amsmath} % or simply amstext
\newcommand{\angstrom}{\text{\normalfont\AA}}

Following daleif suggestion, a more compact version would be

\usepackage{amsmath} % or simply amstext
\newcommand{\angstrom}{\textup{\AA}}

(amsmath is necessary, otherwise \textup doesn't change sizes in subscripts).

However, the best practice when dealing with units is to use siunitx as suggested by quinmars. The macros \si and \SI made available by it provide the correct spacing.