siunitx icon indicating copy to clipboard operation
siunitx copied to clipboard

Add optional prefix phrase to \SIrange

Open ScumCoder opened this issue 9 years ago • 1 comments

GOST 2.105-95, clause 4.2.11 says that the ranges of physical quantities should be typed like this:

  1. От 1 до 5 мм.
  2. От 10 до 100 кг.
  3. От плюс 10 до минус 40°С.
  4. От плюс 10 до плюс 40°С.

The word от means "from", the word до means "to"; so the needed form is from 1 to 5 mm. In other words, Russian users of the siunitx package have to add a word at the start of the range. It would be very cool if that could be done automatically, e.g. by setting a range-prefix-phrase at \sisetup.

ScumCoder avatar Sep 07 '16 10:09 ScumCoder

For example, the cleveref package defines two commands for this express purpose: \crefrangepreconjunction and \crefrangepostconjunction. This is what the cleveref manual has to say:

These commands are not used in the default English format definitions, but they are needed in some languages to correctly express a range. For exam- ple, the Italian format defines \crefrangepreconjunction to be “da”

ScumCoder avatar Sep 21 '16 21:09 ScumCoder

I've given this some thought, and at the moment it feels like it doesn't fit into siunitx. The 'pre-phrase' is required by the language the document is written in and is fixed, so unlike the 'to' phrase there is nothing that siunitx can 'do' with it. (The 'to' phrase may be omitted, depending on settings.) As such, I feel this is out-of-scope.

josephwright avatar Dec 17 '22 08:12 josephwright