Can anyone tell how to put the capital Angstrom to express units. I have been looking for a package but I haven't found one yet.
Asked
Active
Viewed 7.9k times
16
3 Answers
21
The excellent siunitx package is there for you:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\si{\angstrom}
\SI{1}{\angstrom}
\end{document}
user94293
- 4,254
-
4Unfortunately,
\angstromhas been deprecated insiunitxfrom version 2 to 3 (as it is not an official SI unit), it has to be defined as a custom unit, examples: https://tex.stackexchange.com/questions/24255/angstrom-not-working Also,\SIhas been replaced by\qty{}commands. – escalator Jun 07 '21 at 06:59 -
2
7
Actually, simply typing
\r{A}
works fine! Also, it seems that it does not need any package, not even the ams packages, which is a bit strange).
P.S.: I do not have the unitx package installed (I want to install it, but for the moment to do not know how to install it on miktex..)
Wendigo
- 71
-
\r{A}is invalid in math mode. In math mode, put it in\text{}as\(\text{\r{A}}\), or see some solutions at this question – ydhhat Jun 06 '21 at 18:33 -
1
-
@user1271772 mathjax has notthing to do with LaTeX other than it knows a limited math syntax – daleif Aug 23 '21 at 15:16
-
@daleif that is false. Not only does it know a limited math syntax, it also knows a limited LaTeX syntax. So it doesn't have "nothing" to do with LaTeX other than that. – user1271772 Aug 23 '21 at 15:38
-
3
An alternative that works in both text and math mode is
\textup{~\AA}
This always sets the unit upright, but makes it bold if you use it in a header. It also avoids line breaking between a quantity and its unit. In practice, you’d end up defining a macro for this that’s no simpler than \qty from siunitx.
Davislor
- 44,045
-
1But the spacing is wrong, that is a word space it should be a small space:
\,– daleif Aug 23 '21 at 15:17
\AAis not OK? – Przemysław Scherwentke Feb 02 '18 at 04:12\AAis invalid in math mode. In math mode, put it in\text{}as\(\text{\AA}\), or see some solutions at this question – ydhhat Jun 06 '21 at 18:39\text, the formatting of the surrounding text will bleed through to math mode. This most often happens with italics in theorem statements. You probably would want\textnormalto rest the formatting, or\textupif you want to clear italics/small caps but use bold math in a header. Or, usesiunitx. – Davislor Aug 23 '21 at 14:48