resultwizard / ResultWizard

Intelligent interface between Python-computed values and your LaTeX work.
https://resultwizard.github.io/ResultWizard
MIT License
7 stars 0 forks source link

Use siunitx multi uncertainty descriptors #46

Open Splines opened 7 months ago

Splines commented 7 months ago

This fixes #31, also see https://github.com/josephwright/siunitx/issues/725.

Config

Recommended sisetup with this change:

\sisetup{separate-uncertainty=true,uncertainty-descriptor-mode=subscript}

For reviewers

Splines commented 2 months ago

If we merged this, many users cannot use our library and are forced to upgrade to a newer siunitx version as described in my comment here. At least, things don't look so badly anymore for Ubuntu 24 (e.g. Ubuntu 24.04.1 LTS, codename noble) where sudo apt texlive-science comes shipped with siunitx version 2024-01-25 v3.3.10.

Please also take note of my comment here.

In my opinion, we should just go full-in on siunitx and assume users to have one of the newer versions available, e.g. siunitx version 3.1.0 with built-in multi-uncertainty support. If they don't have this version of siunitx available yet, we provide the siunitx_fallback flag for them to fall back to our more "hacky" approach (*), but advise them to use LaTeX without a package manager in a custom install (which probably only the minority of users will do, as I suspect most Linux users to install LaTeX through the package repository, e.g. sudo apt texlive-science.

(*) see our LatexStringifier that basically only relies on the \unit{} command by siunitx.

Splines commented 2 months ago

@paul019 You haven't checked the checkboxes yet in my PR comment at the very top. Could you read through them?