diff options
author | Keewis <keewis@posteo.de> | 2021-08-17 18:19:46 +0200 |
---|---|---|
committer | Keewis <keewis@posteo.de> | 2021-08-17 18:19:46 +0200 |
commit | daae1085df859826e7e6b16795a8ec98cb6d2183 (patch) | |
tree | d35c059eec14085f030bedcf82a3de6fe555cf0d /pint/formatting.py | |
parent | ad660f4a6592b30ab066c53e7645c4fcbd504dc4 (diff) | |
download | pint-daae1085df859826e7e6b16795a8ec98cb6d2183.tar.gz |
move the siunitx code to the appropriate formatting function
Diffstat (limited to 'pint/formatting.py')
-rw-r--r-- | pint/formatting.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pint/formatting.py b/pint/formatting.py index 0493485..889dd4e 100644 --- a/pint/formatting.py +++ b/pint/formatting.py @@ -193,12 +193,8 @@ def format_latex(unit, **options): @register_unit_format("Lx") def format_latex_siunitx(unit, **options): - return formatter( - unit.items(), - siopts="", - pm_fmt=" +- ", - **options, - ) + formatted = siunitx_format_unit(unit) + return rf"\si[]{{{formatted}}}" @register_unit_format("H") |