Angstrom not working

I'd suggest to use the siunitx package. If you want a quantity, use:

The lattice constant $a = \SI{2.0}{\angstrom}$ is ...

if you only need the unit, use:

Atomic distances are measured in \si{\angstrom}.

\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.


@egreg answer is correct but in the community is hard to convince others (reluctant-TeX) collaborators to use \mbox{\normalfont\AA} or \text{\normalfont\AA} to write Angstrom units. At best one can hope that they use \mathrm{\AA} (so Angstrom doesn't appear as italic in math formulas). They are just too used to write \AA.

What I suggest is this:

\usepackage{amsmath}
\let\oldAA\AA
\renewcommand{\AA}{\text{\normalfont\oldAA}}

Tags:

Units