Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
Hi! I think the title is fine. I made couple small corrections in the post (see the revision), if you don't like them, you can of course revert them. And a nice question btw! –  tohecz Aug 12 at 8:19

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
3  
Note that this is entirely illogical :-) The siunitx package is about physical units, and you can't measure an open interval, only some real value (with an uncertainty you might or might not think about). –  Joseph Wright Aug 12 at 9:13
    
If you measure an angle you always have [0-360). I measured an rectangle object without a defined front, so i measured [0-180). The scales that end in the beginning are tricky objects ^^ –  Sebastian Schmitz Aug 12 at 9:17
    
@JosephWright That's also my opinion. –  egreg Aug 12 at 9:20
    
@SebastianSchmitz, for angles you would need the non-existing \angrange. @JosephWright, maybe this is some missing feature? –  quinmars Aug 12 at 9:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.