[Tex/LaTex] siunitx does not work with overline

math-modesiunitx

When I am typing a laboratory for physics, I tried using \overline inside SI from the siunitx package, like so:

\begin{align}
\begin{split}
s &= \frac{d}{t}\\
&= \frac{\SI{1.15}{m}}{\SI{1.43}{s}}\\
&= \SI{0.\overline{804195}}{m/s}
\end{split}
\end{align}

But it seems that it does not work when you have \overline inside SI, does anyone know how to fix this?

Best Answer

You can also set the number parsing off temporarily.

\documentclass{article}
\usepackage{amsmath,siunitx}

\begin{document}
\begin{align}
\begin{split}
s &= \frac{d}{t}\\
&= \frac{\SI{1.15}{m}}{\SI{1.43}{s}}\\
&= \SI[parse-numbers=false]{0.\overline{804195}}{m/s}
\end{split}
\end{align}
\end{document}

enter image description here

Related Question