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
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
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.
\documentclass{article}
\usepackage{siunitx}
\sisetup{range-phrase=\textendash, range-units=single}
\begin{document}
\qtyrange{10}{50}{\liter}
\end{document}
\SIrangeis somewhat deprecated; you should use\qtyrangeunless your TeX distribution hasn't been updated in the last three years or so. – Mico Nov 28 '23 at 17:04