From 06467b57e8216af43ec7aa54e312dfaa3b630af1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 4 Dec 2021 21:38:27 +0000 Subject: siunitx (4dec21) git-svn-id: svn://tug.org/texlive/trunk@61216 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md | 8 +++++- .../texmf-dist/doc/latex/siunitx/siunitx-code.pdf | Bin 1517332 -> 607749 bytes Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | Bin 638365 -> 638352 bytes .../source/latex/siunitx/siunitx-code.tex | 6 ++++- .../source/latex/siunitx/siunitx-emulation.dtx | 17 ++++++++++--- .../source/latex/siunitx/siunitx-number.dtx | 8 ++++++ Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 2 +- Master/texmf-dist/source/latex/siunitx/siunitx.tex | 2 +- Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 27 +++++++++++++++++---- 9 files changed, 57 insertions(+), 13 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md index c69dbaa4d81..88a402317a5 100644 --- a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md @@ -7,6 +7,11 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.0.37] + +### Changed +- Documentation and warning improvements for "drop-exponent" option + ## [v3.0.36] ### Changed @@ -1632,7 +1637,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ### Added - First public testing release (as `si`) -[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.36...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.37...HEAD +[v3.0.37]: https://github.com/josephwright/siunitx/compare/v3.0.36...v3.0.37 [v3.0.36]: https://github.com/josephwright/siunitx/compare/v3.0.35...v3.0.36 [v3.0.35]: https://github.com/josephwright/siunitx/compare/v3.0.34...v3.0.35 [v3.0.34]: https://github.com/josephwright/siunitx/compare/v3.0.33...v3.0.34 diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf index 840c9f384cd..a72fe2827b1 100644 Binary files a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf and b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf differ diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf index 89231df355d..9b5fabfa522 100644 Binary files a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf and b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf differ diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-code.tex b/Master/texmf-dist/source/latex/siunitx/siunitx-code.tex index 7396975f445..bf2bd1b7e9f 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-code.tex +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-code.tex @@ -39,6 +39,10 @@ for those people who are interested. \NewDocumentCommand\acro{m}{\textsc{\LowerCaseText{#1}}} \NewDocumentCommand\foreign{m}{\textit{#1}} +% Standard settings +\EnableDocumentation +\DisableImplementation + \begin{document} \GetFileInfo{siunitx.sty} @@ -81,7 +85,7 @@ for those people who are interested. \RenewDocumentCommand\PrintIndex{}{} % Load the source files in order -\DocInput{siunitx.dtx} +%\DocInput{siunitx.dtx} \DocInput{siunitx-angle.dtx} \DocInput{siunitx-compound.dtx} \DocInput{siunitx-locale.dtx} diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx index 92e3671852a..18ad1d2d600 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx @@ -559,10 +559,19 @@ } , table-omit-exponent .code:n = { - \@@_option_deprecated:nnV - { table-omit-exponent } - { drop-exponent } - \l_keys_value_tl + \msg_info:nnnn { siunitx } { option-deprecated } + { table-omit-exponent } { drop-exponent } + \str_if_eq:VnTF \l_keys_value_tl { true } + { + \keys_set:nn + { siunitx } + { drop-exponent = true , exponent-mode = fixed } + } + { + \keys_set:nn + { siunitx } + { drop-exponent = false } + } } , table-omit-exponent .default:n = true , table-parse-only .code:n = diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index 25e15ca4bb0..a7b3594d9d6 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx @@ -2143,6 +2143,8 @@ { \bool_if:NT \l_@@_drop_exponent_bool { + \str_if_eq:VnT \l_@@_exponent_mode_tl { input } + { \msg_warning:nn { siunitx } { ambiguous-dropped-exponent } } \tl_set:Nx #2 { \exp_after:wN \@@_drop_exponent:nnnnnnn #1 } } @@ -3736,6 +3738,12 @@ The~input~'#1'~could~not~be~parsed~as~a~number~following~the~ format~defined~in~module~documentation. } +\msg_new:nnnn { siunitx } { ambiguous-dropped-exponent } + { Potentially~ambiguous~dropping~of~exponent. } + { + The~option~"drop-exponent"~is~active~but~values~do~not~have~an~ + exponent~fixed~by~"exponent-mode".~The~result~could~be~misleading. + } % \end{macrocode} % % \subsection{Standard settings for module options} diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index e48aaa37ae8..46d2b2f9427 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -121,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2021-11-18} {3.0.36} +\ProvidesExplPackage {siunitx} {2021-12-03} {3.0.37} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.tex b/Master/texmf-dist/source/latex/siunitx/siunitx.tex index 0cde5ebbd31..69f61e8c586 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.tex +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.tex @@ -2736,7 +2736,7 @@ combined with \opt{exponent-mode = fixed} can be used to achieve this (Table~\ref{tab:exp:omit}). \begin{LaTeXdemo}[code and float] \begin{table} - \caption{The \opt{table-omit-exponent} option.% + \caption{The \opt{drop-exponent} option.% \label{tab:exp:omit}} \begin{tabular}{@{} S[table-format = 1.1e1] diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index a26cff4d63f..23013ff9ca8 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty @@ -42,7 +42,7 @@ }% \endinput }% -\ProvidesExplPackage {siunitx} {2021-11-18} {3.0.36} +\ProvidesExplPackage {siunitx} {2021-12-03} {3.0.37} {A comprehensive (SI) units package} \msg_new:nnnn { siunitx } { incompatible-package } { Package~'#1'~incompatible. } @@ -2481,6 +2481,8 @@ { \bool_if:NT \l__siunitx_number_drop_exponent_bool { + \str_if_eq:VnT \l__siunitx_number_exponent_mode_tl { input } + { \msg_warning:nn { siunitx } { ambiguous-dropped-exponent } } \tl_set:Nx #2 { \exp_after:wN \__siunitx_number_drop_exponent:nnnnnnn #1 } } @@ -3577,6 +3579,12 @@ The~input~'#1'~could~not~be~parsed~as~a~number~following~the~ format~defined~in~module~documentation. } +\msg_new:nnnn { siunitx } { ambiguous-dropped-exponent } + { Potentially~ambiguous~dropping~of~exponent. } + { + The~option~"drop-exponent"~is~active~but~values~do~not~have~an~ + exponent~fixed~by~"exponent-mode".~The~result~could~be~misleading. + } \keys_set:nn { siunitx } { bracket-ambiguous-numbers = true , @@ -7092,10 +7100,19 @@ } , table-omit-exponent .code:n = { - \__siunitx_option_deprecated:nnV - { table-omit-exponent } - { drop-exponent } - \l_keys_value_tl + \msg_info:nnnn { siunitx } { option-deprecated } + { table-omit-exponent } { drop-exponent } + \str_if_eq:VnTF \l_keys_value_tl { true } + { + \keys_set:nn + { siunitx } + { drop-exponent = true , exponent-mode = fixed } + } + { + \keys_set:nn + { siunitx } + { drop-exponent = false } + } } , table-omit-exponent .default:n = true , table-parse-only .code:n = -- cgit v1.2.3