2

Following this, I obtain

\sisetup{
  range-phrase=—
}
\SIrange{40}{50}{\liter}

40 L—50 L

Is there a way that can give me output in this format?

40—50 L

user3204810
  • 1,415
  • 1
    Off-topic: \SIrange is somewhat deprecated; you should use \qtyrange unless your TeX distribution hasn't been updated in the last three years or so. – Mico Nov 28 '23 at 17:04
  • 1
    Yes, the reference is quite old. Thank you! – user3204810 Nov 28 '23 at 17:05

1 Answers1

4

Assuming you have access to a reasonably recent version of the siunitx package, I suggest you try

\qtyrange[range-units=single]{10}{50}{\liter}

Of course, the range-phrase=\textendash and range-units=single options may both be set as part of an \sisetup directive.

enter image description here

\documentclass{article}
\usepackage{siunitx}
\sisetup{range-phrase=\textendash, range-units=single}

\begin{document} \qtyrange{10}{50}{\liter} \end{document}

Mico
  • 506,678