Skip to content

Would be nice if \ang could parse uncertainties the same way as \qty. #871

@Pvarfalvy

Description

@Pvarfalvy

Basically \ang{17.8(3)} simply ignores the uncertainty and forces one to use \qty{17.8(3)}{\degree} instead. It would be useful in context of introductory laboratory courses where we teach measurement and how to propagate uncertainties. While the workaround with \qty exists, I did inadvertently make a lab quiz (my bad) that was easier than intended by creating and printing the quiz on the spot before checking that the angle had an uncertainty!

\listfiles
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{siunitx}
% siunitx prefs
\sisetup{per-mode = symbol} % display units as fractions such as m/s
\sisetup{separate-uncertainty = true} % this prints the uncertainties as \pm and not as bracketed.

%-----------------------------------------------------------------------------
% Document begins
%-----------------------------------------------------------------------------
\begin{document}
\noindent Would be nice if \textsf{siunitx} \verb!\ang! would parse uncertainties the same way as \verb!\qty!

\vspace{2em}

Reference output: \qty{17.8(3)}{\degree} \hfill \verb!\qty{17.8(3)}{\degree}!

\vspace{2em}

\textsf{siunitx} output: \ang{17.8(3)} \hfill \verb!\ang{17.8(3)}!

\vspace{2em}

\noindent (Running MiKTeX, most recent versions of all packages as of May 27th, 2026.)
\end{document}

Minimal.pdf

Minimal.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions