# Missing dot at units with siunitx

This example

\documentclass{article}
\usepackage{siunitx}
\begin{document}
... dimensions of at least \SI{0.5}{[a.u.]}.
\end{document}


produces the following result:

How can I have the dot with a.u.?

a.u. stands for arbitrary units. I am looking for a general case where one needs a dot in the units.

• Possible duplicate of tex.stackexchange.com/questions/230129/…? Jan 17, 2018 at 9:53
• This question might well be a duplicate of some other, but I wouldn't say it is a duplicate of this particular linked question. Jan 17, 2018 at 10:28
• Please, DON'T write units inside brackets. Units should be never typeset within brackets. Brackets are used around quantities to denote the unit of a quantity, e.g., [L] = m, or [v] = m/s. Jan 17, 2018 at 10:37

siunitx has the unit \astronomicalunit defined (supposing that's what you want with "a.u."), I'd go with that, even though it is not rendered as you initially imagined. siunitx complies with SI and, given that this compliance is one of the big purposes of the package, we can suppose you want to comply too. So that's a hint siunitx gives you.

\documentclass{article}
\usepackage{siunitx}

\begin{document}

... dimensions of at least \SI{0.5}{\astronomicalunit}.

\end{document}


That gives you:

Now, if you really, really want to render it differently, or if you are forced to it, you can always redefine it. (Not recommended).

\documentclass{article}
\usepackage{siunitx}

\DeclareSIUnit{\astronomicalunit}{[a.u.]}

\begin{document}

... dimensions of at least \SI{0.5}{\astronomicalunit}.

\end{document}


Update: Given the update of the OP. In the spirit of the above. If I want to render an "arbitrary unit", I'd first look if it is predefined in siunitx. If it is, I'd use it. If not, one can always define it (ideally checking then what's the SI standard for it).

\documentclass{article}
\usepackage{siunitx}

\DeclareSIUnit{\arbitraryunit}{a.u.}

\begin{document}

... dimensions of at least \SI{0.5}{\arbitraryunit}.

\end{document}

• +1. Redefining \astronomicalunit should be considered preferable in my opinion so the snippet \SI{0.5}{\astronomicalunit} will retain meaning if copied elsewhere. Jan 17, 2018 at 10:03
• According to the SI Brochure, page 128, ua is the only right way. Hence the choice made in siunitx See (bipm.org/en/publications/si-brochure). Jan 17, 2018 at 10:05
• I aggree with both of you. But I'm not really sure what the OP means by "a.u." (atomic units perhaps?). I'd go with the predefined, which will be in accordance to SI. But if the change is really desired, then redefine the correct unit (I will update the answer to reflect this). Jan 17, 2018 at 10:09
• Yes, following SI is best practice (which siunitx does), if the OP wants to deviate from SI (or use a non-SI unit) and siunitx already defines a macro for the unit then they should redefine that with \DeclareSIUnit, otherwise they should define a new unit macro as necessary. Jan 17, 2018 at 10:12
• The International Astronomical Union apparently prefer "au", and the BIPM have accepted this as of the 2014 update (Wikipedia has more info). Not that most astronomers I know use SI consistently, some even use CGS still Jan 17, 2018 at 11:31

What about placing [a.u.] inside braces?

\documentclass{article}
\usepackage{siunitx}
\begin{document}
... dimensions of at least \SI{0.5}{{[a.u.]}}
\end{document}