From 7482e30efe28ea00047350822337d8a4defbd87a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 19 May 2017 21:05:05 +0000 Subject: siunitx (19may17) git-svn-id: svn://tug.org/texlive/trunk@44428 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | Bin 621980 -> 621724 bytes Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 123 +++++++++------------ .../tex/latex/siunitx/siunitx-abbreviations.cfg | 2 +- .../tex/latex/siunitx/siunitx-binary.cfg | 2 +- .../tex/latex/siunitx/siunitx-version-1.cfg | 2 +- Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 87 ++++++--------- 6 files changed, 87 insertions(+), 129 deletions(-) diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf index 75f16247b39..478deea8988 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.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 23cc0e9a91e..a37bd7952d0 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -664,6 +664,8 @@ This work consists of the file siunitx.dtx % aligning decimal marker to center} % \changes{v2.7d}{2017/02/19}{Avoid doubled pre-number tokens in % tables} +% \changes{v2.7g}{2017/05/19}{Avoid an issue with recent \pkg{expl3} +% update} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -796,7 +798,7 @@ This work consists of the file siunitx.dtx % \SIrange{0.13}{0.67}{\milli\metre} %\end{LaTeXdemo} % -% By default, all text is typeset in the current upright, serif math +% By default, all text is typeset in the current upright math % font. This can be changed by setting the appropriate options: % "\sisetup{detect-all}" will use the current font for typesetting. % @@ -4024,7 +4026,7 @@ This work consists of the file siunitx.dtx % preamble-only option \opt{strict} resets package behaviour to % follow the rules closely, and disables options which deviate from % this. If the package is loaded with the \opt{strict} option, all -% output is made using the upright serif font. +% output is made using the upright (serif) font. % %\subsection{Local configurations} %\label{sec:config:local} @@ -4955,10 +4957,12 @@ This work consists of the file siunitx.dtx % % The mathematical meaning of units also means that the shape, weight % and family are important. Units are supposed to be typeset in an -% upright, medium weight serif font. Italic, bold and sans serif are -% all used mathematically to convey other meanings. The \pkg{siunitx} +% upright, medium weight font. Italic, bold and sans serif are +% all used mathematically to convey other meanings. (In an all +% sans serif document, using sans serif for units is reasonable.) +% The \pkg{siunitx} % package defaults again follow this convention: any local settings are -% ignored, and uses the current upright serif math font. However, +% ignored, and uses the current upright math font. However, % there are occasions where this may not be the most desirable % behaviour. A classic example would be in an all-bold section % heading. As the surrounding text is bold, some people feel that @@ -5207,7 +5211,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2017/03/23} {2.7f} +\ProvidesExplPackage {siunitx} {2017/05/19} {2.7g} {A comprehensive (SI) units package} % \end{macrocode} % @@ -5215,7 +5219,7 @@ This work consists of the file siunitx.dtx % This will also trap any problems with \pkg{l3packages} (as the two are now % tied together, version-wise). % \begin{macrocode} -\@ifpackagelater { expl3 } { 2015/09/11 } +\@ifpackagelater { expl3 } { 2015/11/15 } { } { \PackageError { siunitx } { Support~package~expl3~too~old } @@ -5653,15 +5657,15 @@ This work consists of the file siunitx.dtx % \begin{macrocode} \prg_new_conditional:Npnn \@@_cs_if_tl:N #1 { T, F , TF , p } { - \bool_if:nTF + \bool_lazy_and:nnTF { \tl_if_empty_p:f { \token_get_prefix_spec:N #1 \token_get_arg_spec:N #1 } - && ! \cs_if_exist_p:c { \cs_to_str:N #1 ~ } } + { \bool_not_p:n { \cs_if_exist_p:c { \cs_to_str:N #1 ~ } } } { \prg_return_true: } { \prg_return_false: } } @@ -8876,11 +8880,9 @@ This work consists of the file siunitx.dtx % \begin{macrocode} \cs_new_protected:Npn \@@_number_process_round_tidy:n #1 { - \bool_if:nTF - { - \@@_number_if_zero_p:V \l_@@_round_integer_out_tl - && \@@_number_if_zero_p:V \l_@@_round_decimal_out_tl - } + \bool_lazy_and:nnTF + { \@@_number_if_zero_p:V \l_@@_round_integer_out_tl } + { \@@_number_if_zero_p:V \l_@@_round_decimal_out_tl } { \str_if_eq:VnTF \l_@@_process_round_min_tl { 0 } { @@ -10489,11 +10491,9 @@ This work consists of the file siunitx.dtx % number formatter again. % \begin{macrocode} \cs_new_protected:Npn \@@_number_output_parts: { - \bool_if:nTF - { - \tl_if_empty_p:N \l_@@_pre_unit_tl && - \tl_if_empty_p:N \l_@@_unit_tl - } + \bool_lazy_and:nnTF + { \tl_if_empty_p:N \l_@@_pre_unit_tl } + { \tl_if_empty_p:N \l_@@_unit_tl } { \@@_number_output_single: } { \@@_number_output_parts_aux: } } @@ -10557,11 +10557,9 @@ This work consists of the file siunitx.dtx \cs_new_protected:Npn \@@_number_output_product: { \bool_if:NTF \l_@@_product_brackets_bool { - \bool_if:nTF - { - \tl_if_empty_p:N \l_@@_pre_unit_tl && - \tl_if_empty_p:N \l_@@_unit_tl - } + \bool_lazy_and:nnTF + { \tl_if_empty_p:N \l_@@_pre_unit_tl } + { \tl_if_empty_p:N \l_@@_unit_tl } { \@@_number_output_product_aux: } { \@@_number_output_product_brackets: } } @@ -10728,11 +10726,9 @@ This work consists of the file siunitx.dtx % mathematically there is no need for brackets at this point. % \begin{macrocode} \cs_new_protected:Npn \@@_number_output_single: { - \bool_if:nF - { - \tl_if_empty_p:N \l_@@_pre_unit_tl && - \tl_if_empty_p:N \l_@@_unit_tl - } + \bool_lazy_and:nnF + { \tl_if_empty_p:N \l_@@_pre_unit_tl } + { \tl_if_empty_p:N \l_@@_unit_tl } { \prop_if_in:NnF \l_@@_number_out_prop { exponent } { \@@_number_format_brackets:n { result } } @@ -11026,22 +11022,18 @@ This work consists of the file siunitx.dtx % correct places. % \begin{macrocode} \cs_new_protected:Npn \@@_angle_zero_fill: { - \bool_if:nT - { - \prop_if_empty_p:N \l_@@_angle_second_prop && - \l_@@_angle_second_zero_bool - } + \bool_lazy_and:nnT + { \l_@@_angle_second_zero_bool } + { \prop_if_empty_p:N \l_@@_angle_second_prop } { \prop_put:Nnn \l_@@_angle_second_prop { mantissa } { true } \prop_put:Nnn \l_@@_angle_second_prop { mantissa-integer } { 0 } } - \bool_if:nT - { - \prop_if_empty_p:N \l_@@_angle_minute_prop && - \l_@@_angle_minute_zero_bool - } + \bool_lazy_and:nnT + { \l_@@_angle_minute_zero_bool } + { \prop_if_empty_p:N \l_@@_angle_minute_prop } { \prop_put:Nnn \l_@@_angle_minute_prop { mantissa } { true } @@ -11049,11 +11041,9 @@ This work consists of the file siunitx.dtx { 0 } \@@_angle_sign_shuffle:nn { second } { minute } } - \bool_if:nT - { - \prop_if_empty_p:N \l_@@_angle_degree_prop && - \l_@@_angle_degree_zero_bool - } + \bool_lazy_and:nnT + { \l_@@_angle_degree_zero_bool } + { \prop_if_empty_p:N \l_@@_angle_degree_prop } { \prop_put:Nnn \l_@@_angle_degree_prop { mantissa } { true } @@ -12425,11 +12415,7 @@ This work consists of the file siunitx.dtx { \char_generate:nn { #1 } { 12 } } {#2} } -\bool_if:nF - { - \sys_if_engine_luatex_p: || - \sys_if_engine_xetex_p: - } +\bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { \AtBeginDocument { @@ -12726,11 +12712,9 @@ This work consists of the file siunitx.dtx \tl_set:Nx \l_@@_unit_tl { \exp_not:V \l_@@_unit_numerator_tl - \bool_if:nF - { - \tl_if_empty_p:N \l_@@_unit_numerator_tl || - \tl_if_empty_p:N \l_@@_unit_denominator_tl - } + \bool_lazy_or:nnF + { \tl_if_empty_p:N \l_@@_unit_numerator_tl } + { \tl_if_empty_p:N \l_@@_unit_denominator_tl } { \exp_not:N \l_@@_unit_product_tl } @@ -13971,7 +13955,7 @@ This work consists of the file siunitx.dtx { \skip_horizontal:n { \c_@@_one_fill_skip - ##1 } \tex_kern:D \c_zero_skip - \hbox_set_end: + \c_group_end_token \@@_table_colortbl_correction: } } @@ -15701,11 +15685,8 @@ This work consists of the file siunitx.dtx { min~exponent~for~1000~sep = \int_eval:n { \l_@@_group_min_int - 1 } } - \bool_if:nF - { - \l_@@_group_decimal_bool || - \l_@@_group_integer_bool - } + \bool_lazy_or:nnF + { \l_@@_group_decimal_bool } { \l_@@_group_integer_bool } { \clist_put_right:Nn \l_@@_pgf_link_clist { min~exponent~for~1000~sep = 999 } @@ -16834,7 +16815,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-version-1.cfg} {2017/05/19} {2.7g} {siunitx: Version 1 settings} % \end{macrocode} % @@ -17776,7 +17757,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2017/05/19} {2.7g} {siunitx: Abbreviated units} % \end{macrocode} % @@ -17958,7 +17939,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-binary.cfg} {2017/05/19} {2.7g} {siunitx: Binary units} % \end{macrocode} % @@ -17993,7 +17974,7 @@ This work consists of the file siunitx.dtx % % \bibitem{BIPM} % \emph{The International System of Units (SI)}, -% \url{http://www.bipm.org/en/si/}. +% \url{http://www.bipm.org/en/measurement-units/}. % % \bibitem{NIST} % \emph{International System of Units from NIST}, @@ -18001,34 +17982,34 @@ This work consists of the file siunitx.dtx % % \bibitem{SI:2.1} % \emph{SI base units}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter2/2-1/}. +% \url{http://www.bipm.org/en/publications/si-brochure/section2-1.html}. % % \bibitem{SI:2.2.2} % \emph{Units with special names and symbols; units that % incorporate special names and symbols}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter2/2-2/2-2-2.html}. +% \url{http://www.bipm.org/en/publications/si-brochure/section2-2-2.html}. % % \bibitem{SI:3.1} % \emph{SI Prefixes}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter3/prefixes.html}. +% \url{http://www.bipm.org/en/publications/si-brochure/chapter3.html}. % % \bibitem{SI:4.1.T6} % \emph{Non-SI units accepted for use with the International % System of Units}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter4/table6.html}. +% \url{http://www.bipm.org/en/publications/si-brochure/table6.html}. % % \bibitem{SI:4.1.T7} % \emph{Non-SI units whose values in SI units must be obtained % experimentally}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter4/table7.html}. +% \url{http://www.bipm.org/en/publications/si-brochure/table7.html}. % % \bibitem{SI:4.1.T8} % \emph{Other non-SI units}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter4/table8.html}. +% \url{http://www.bipm.org/en/publications/si-brochure/table8.html}. % % \bibitem{SI:5.3.3} % \emph{Formatting the value of a quantity}, -% \url{http://www.bipm.org/en/si/si_brochure/chapter5/5-3-2.html#5-3-3}. +% \url{http://www.bipm.org/en/publications/si-brochure/section5-3-3.html}. % % \end{thebibliography} % diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg index cb6fad4c7a9..7181219793d 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-abbreviations.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2017/05/19} {2.7g} {siunitx: Abbreviated units} \DeclareSIUnit \A { \ampere } \DeclareSIUnit \pA { \pico \ampere } diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx-binary.cfg b/Master/texmf-dist/tex/latex/siunitx/siunitx-binary.cfg index e36b7ba4a75..acaaf9fda54 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx-binary.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx-binary.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-binary.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-binary.cfg} {2017/05/19} {2.7g} {siunitx: Binary units} \DeclareBinaryPrefix \kibi { Ki } { 10 } \DeclareBinaryPrefix \mebi { Mi } { 20 } diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx-version-1.cfg b/Master/texmf-dist/tex/latex/siunitx/siunitx-version-1.cfg index b3f5bbfbe8f..c66c1f3610b 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx-version-1.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx-version-1.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-version-1.cfg} {2017/03/23} {2.7f} +\ProvidesExplFile {siunitx-version-1.cfg} {2017/05/19} {2.7g} {siunitx: Version 1 settings} \keys_define:nn { siunitx } { addsign .choice: , diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index 3794491ca28..ed8c1cd37f9 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty @@ -15,9 +15,9 @@ %% \RequirePackage{expl3}[2015/09/11] \RequirePackage{xparse} -\ProvidesExplPackage {siunitx} {2017/03/23} {2.7f} +\ProvidesExplPackage {siunitx} {2017/05/19} {2.7g} {A comprehensive (SI) units package} -\@ifpackagelater { expl3 } { 2015/09/11 } +\@ifpackagelater { expl3 } { 2015/11/15 } { } { \PackageError { siunitx } { Support~package~expl3~too~old } @@ -321,15 +321,15 @@ \cs_generate_variant:Nn \tl_replace_all:Nnn { NnV } \prg_new_conditional:Npnn \__siunitx_cs_if_tl:N #1 { T, F , TF , p } { - \bool_if:nTF + \bool_lazy_and:nnTF { \tl_if_empty_p:f { \token_get_prefix_spec:N #1 \token_get_arg_spec:N #1 } - && ! \cs_if_exist_p:c { \cs_to_str:N #1 ~ } } + { \bool_not_p:n { \cs_if_exist_p:c { \cs_to_str:N #1 ~ } } } { \prg_return_true: } { \prg_return_false: } } @@ -2497,11 +2497,9 @@ } \cs_new_protected:Npn \__siunitx_number_process_round_tidy:n #1 { - \bool_if:nTF - { - \__siunitx_number_if_zero_p:V \l__siunitx_round_integer_out_tl - && \__siunitx_number_if_zero_p:V \l__siunitx_round_decimal_out_tl - } + \bool_lazy_and:nnTF + { \__siunitx_number_if_zero_p:V \l__siunitx_round_integer_out_tl } + { \__siunitx_number_if_zero_p:V \l__siunitx_round_decimal_out_tl } { \str_if_eq:VnTF \l__siunitx_process_round_min_tl { 0 } { @@ -3632,11 +3630,9 @@ } } \cs_new_protected:Npn \__siunitx_number_output_parts: { - \bool_if:nTF - { - \tl_if_empty_p:N \l__siunitx_pre_unit_tl && - \tl_if_empty_p:N \l__siunitx_unit_tl - } + \bool_lazy_and:nnTF + { \tl_if_empty_p:N \l__siunitx_pre_unit_tl } + { \tl_if_empty_p:N \l__siunitx_unit_tl } { \__siunitx_number_output_single: } { \__siunitx_number_output_parts_aux: } } @@ -3690,11 +3686,9 @@ \cs_new_protected:Npn \__siunitx_number_output_product: { \bool_if:NTF \l__siunitx_product_brackets_bool { - \bool_if:nTF - { - \tl_if_empty_p:N \l__siunitx_pre_unit_tl && - \tl_if_empty_p:N \l__siunitx_unit_tl - } + \bool_lazy_and:nnTF + { \tl_if_empty_p:N \l__siunitx_pre_unit_tl } + { \tl_if_empty_p:N \l__siunitx_unit_tl } { \__siunitx_number_output_product_aux: } { \__siunitx_number_output_product_brackets: } } @@ -3812,11 +3806,9 @@ \__siunitx_number_format: } \cs_new_protected:Npn \__siunitx_number_output_single: { - \bool_if:nF - { - \tl_if_empty_p:N \l__siunitx_pre_unit_tl && - \tl_if_empty_p:N \l__siunitx_unit_tl - } + \bool_lazy_and:nnF + { \tl_if_empty_p:N \l__siunitx_pre_unit_tl } + { \tl_if_empty_p:N \l__siunitx_unit_tl } { \prop_if_in:NnF \l__siunitx_number_out_prop { exponent } { \__siunitx_number_format_brackets:n { result } } @@ -3992,22 +3984,18 @@ } } \cs_new_protected:Npn \__siunitx_angle_zero_fill: { - \bool_if:nT - { - \prop_if_empty_p:N \l__siunitx_angle_second_prop && - \l__siunitx_angle_second_zero_bool - } + \bool_lazy_and:nnT + { \l__siunitx_angle_second_zero_bool } + { \prop_if_empty_p:N \l__siunitx_angle_second_prop } { \prop_put:Nnn \l__siunitx_angle_second_prop { mantissa } { true } \prop_put:Nnn \l__siunitx_angle_second_prop { mantissa-integer } { 0 } } - \bool_if:nT - { - \prop_if_empty_p:N \l__siunitx_angle_minute_prop && - \l__siunitx_angle_minute_zero_bool - } + \bool_lazy_and:nnT + { \l__siunitx_angle_minute_zero_bool } + { \prop_if_empty_p:N \l__siunitx_angle_minute_prop } { \prop_put:Nnn \l__siunitx_angle_minute_prop { mantissa } { true } @@ -4015,11 +4003,9 @@ { 0 } \__siunitx_angle_sign_shuffle:nn { second } { minute } } - \bool_if:nT - { - \prop_if_empty_p:N \l__siunitx_angle_degree_prop && - \l__siunitx_angle_degree_zero_bool - } + \bool_lazy_and:nnT + { \l__siunitx_angle_degree_zero_bool } + { \prop_if_empty_p:N \l__siunitx_angle_degree_prop } { \prop_put:Nnn \l__siunitx_angle_degree_prop { mantissa } { true } @@ -4896,11 +4882,7 @@ { \char_generate:nn { #1 } { 12 } } {#2} } -\bool_if:nF - { - \sys_if_engine_luatex_p: || - \sys_if_engine_xetex_p: - } +\bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { \AtBeginDocument { @@ -5120,11 +5102,9 @@ \tl_set:Nx \l__siunitx_unit_tl { \exp_not:V \l__siunitx_unit_numerator_tl - \bool_if:nF - { - \tl_if_empty_p:N \l__siunitx_unit_numerator_tl || - \tl_if_empty_p:N \l__siunitx_unit_denominator_tl - } + \bool_lazy_or:nnF + { \tl_if_empty_p:N \l__siunitx_unit_numerator_tl } + { \tl_if_empty_p:N \l__siunitx_unit_denominator_tl } { \exp_not:N \l__siunitx_unit_product_tl } @@ -5900,7 +5880,7 @@ { \skip_horizontal:n { \c__siunitx_one_fill_skip - ##1 } \tex_kern:D \c_zero_skip - \hbox_set_end: + \c_group_end_token \__siunitx_table_colortbl_correction: } } @@ -7086,11 +7066,8 @@ { min~exponent~for~1000~sep = \int_eval:n { \l__siunitx_group_min_int - 1 } } - \bool_if:nF - { - \l__siunitx_group_decimal_bool || - \l__siunitx_group_integer_bool - } + \bool_lazy_or:nnF + { \l__siunitx_group_decimal_bool } { \l__siunitx_group_integer_bool } { \clist_put_right:Nn \l__siunitx_pgf_link_clist { min~exponent~for~1000~sep = 999 } -- cgit v1.2.3