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

2
  • 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, 2023 at 17:04
  • 1
    Yes, the reference is quite old. Thank you! Nov 28, 2023 at 17:05

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .