[Tex/LaTex] write a range in [0-1) style with siunitx

delimiterssiunitx

I want to give a range of degree in my document.
One end is explicitly inside the range, while the other is outside.

Is there a "correct" SI way of writing a range with an inclusive and exclusive end (i.e., left-open right-closed interval or vice versa)?

I'm already using siunitx for ranges: \SIrange{0}{180}{\degree} -> 0 bis 180°

There is one example in the documentation (page 46) that seems to be somewhat similar, but i don't think that it applies to my problem:

\SIrange[range-units = brackets]{2}{4}{\degreeCelsius} -> ( 2 to 4 ) °C

Best Answer

Just set open-bracket or close-bracket:

\documentclass{article}
\usepackage{siunitx}

\begin{document}
\SIrange[range-units = brackets,open-bracket = {[}]{2}{4}{\degreeCelsius}
\end{document}

enter image description here

Related Question