[Tex/LaTex] Missing dot at units with siunitx

siunitx

This example

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

produces the following result:

enter image description here

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.

Best Answer

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:

enter image description here

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}

enter image description here

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}
Related Question