# Defining a list and range of \ang values in siunitx

The angle processing function \ang provided in siunitx to print angles are printed in arc format with degree, arcmin and arcsec separated by semi-colons:

\ang{1;2;3}


Is it possible to define a macro for lists and ranges of angular quantities in a similar way as the \SIlist and \SIrange functions to handle lists and ranges of numbers?

• Please clarify, how this list should look like. As \ang and \SIlist both use a semicolon as separator, you should choose your preferred syntax. – LaRiFaRi Mar 23 '15 at 15:11

% arara: pdflatex

\documentclass{article}
\usepackage{siunitx}
\usepackage{xparse}
\NewDocumentCommand\angRange{O{} m m}{\SIrange[parse-numbers=false, #1]{\ang[parse-numbers=true]{#2}}{\ang[parse-numbers=true]{#3}}{}}

\begin{document}
\noindent
\angRange{2.67}{6;7;6.5} \\
\angRange[number-angle-product = \,]{2.67}{6;7;6.5} \\
\angRange{6;7;6.5}{-1;;} \\
\angRange[arc-separator = \,]{6;7;6.5}{-1;;} \\
\angRange{-1;;}{;;-3} \\
\angRange{-1;;}{;;-3} \\
\angRange{-1;;}{;;-3} \\

• Just out of curiosity: what is arara? – ScumCoder Jan 15 at 20:20