6

I have a document where figure captions are set sans serif. Section headings are bold. Both do contain the occasional unit, so I have been using the detect-all option with siunitx.

I just now discovered that according to the official changelog all the detect-* options got removed in siunitx v3. Well, technically it seems like they are still working, but at least they have been deprecated, and they are no longer documented.

What is the intended replacement?

1 Answer 1

5

Short answer: there isn't currently one.

In v2 (and v1) of siunitx, I used an approach based on an older package (sistyle). This means resetting everything to a known position, then adding detected changes as requested. There are a few issues with that. The first is it's relatively 'expensive' in TeX terms: we always have to do at least the reset and possibly more. The second is that it means I need to know what to look for to detect/reset. That leads to some issues. The approach is reflected in the option names: detect-... as that's what happens.

In v3, the approach is different. I only alter as many things as are required to match the user request. That is less work, it means I don't have to know what every possible change is, and it reflects the fact that math and text modes work differently. The downside is that I can't find a good name for all of the settings together.

The older detect-all is emulated by applying

mode = match ,
propagate-math-font = true ,
reset-math-version = false ,
reset-text-family = false ,
reset-text-series = false ,
text-family-to-math = true ,
text-series-to-math = true

but as you'll see there's no obvious name here. Notice that in some edge cases it won't do the same as in v2: that's why there is a fallback to load v2 as an option.

As such, you will need to set explicitly those font-control options you want to active.

You must log in to answer this question.

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