diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-22 20:40:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-22 20:40:24 +0000 |
commit | 0ba7f884a6a123c6e85781421c3b17ce11557203 (patch) | |
tree | 68a4fc38851a7a5b3b3bd82cb64e2e2c42399a33 /Master | |
parent | 1533ab903c9333f75c242d2a5927036e4ce14739 (diff) |
siunitx (22jul21)
git-svn-id: svn://tug.org/texlive/trunk@60017 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf | bin | 1496050 -> 1497883 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | bin | 635529 -> 636251 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx | 17 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 8 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.tex | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 18 |
8 files changed, 62 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md index 83907537c68..0c0c7545fa8 100644 --- a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md @@ -7,6 +7,16 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.0.22] + +### Changed +- Support `table-text-alignment = none` for interoperation with + `tabularray` (issue #510) + +### Fixed +- Support for `input-remove` (issue #511) +- Interaction with `cellspace` package (issue #512) + ## [v3.0.21] ### Fixed @@ -1439,7 +1449,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.21...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.22...HEAD +[v3.0.22]: https://github.com/josephwright/siunitx/compare/v3.0.21...v3.0.22 [v3.0.21]: https://github.com/josephwright/siunitx/compare/v3.0.20...v3.0.21 [v3.0.20]: https://github.com/josephwright/siunitx/compare/v3.0.19...v3.0.20 [v3.0.19]: https://github.com/josephwright/siunitx/compare/v3.0.18...v3.0.19 diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf Binary files differindex 513b2d7da8d..4327acc11e7 100644 --- a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf +++ b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf Binary files differindex 041c2f21c7e..0d5c442a746 100644 --- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf +++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index 59a6dd8129c..61ca7af1032 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx @@ -514,6 +514,7 @@ \cs_generate_variant:Nn \tl_if_blank:nTF { f } \cs_generate_variant:Nn \tl_if_blank_p:n { f } \cs_generate_variant:Nn \tl_if_in:NnTF { NV } +\cs_generate_variant:Nn \tl_remove_all:Nn { NV } \cs_generate_variant:Nn \tl_replace_all:Nnn { NnV } % \end{macrocode} % @@ -814,6 +815,9 @@ } \tl_set_eq:NN \l_@@_input_tl \l_@@_arg_tl \siunitx_number_normalize_symbols:N \l_@@_arg_tl + \protected@edef \l_@@_input_ignore_tl { \l_@@_input_ignore_tl } + \tl_if_empty:NF \l_@@_input_ignore_tl + { \tl_remove_all:NV \l_@@_arg_tl \l_@@_input_ignore_tl } \tl_if_empty:NF \l_@@_arg_tl { \@@_parse_comparator: } \@@_parse_check: diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx index efd2c6bc9b4..64ef013e176 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx @@ -200,11 +200,12 @@ % % \begin{function}{table-text-alignment} % \begin{syntax} -% |table-text-alignment| = |center|\verb"|"|left|\verb"|"|right| +% |table-text-alignment| = |center|\verb"|"|left|\verb"|"|none|\verb"|"|right| % \end{syntax} % Selects the alignment of non-numerical content with the margins of the % table cell (or other boundary). See also |table-alignment| and -% |table-number-alignment|. The standard setting is |center|. +% |table-number-alignment|. Notice the additional support for |none| here. +% The standard setting is |center|. % \end{function} % % \end{documentation} @@ -599,7 +600,8 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_align_center:n, \@@_align_left:n, \@@_align_right:n} +% \begin{macro} +% {\@@_align_center:n, \@@_align_left:n, \@@_align_right:n, \@@_align_none:n} % \begin{macro}{\@@_align_auxi:nn, \@@_align_auxii:nn} % The beginning and end of each table cell have to adjust the position of % the content using glue. When \pkg{colortbl} is loaded the glue is done in @@ -613,6 +615,13 @@ { \@@_align_auxi:nn {#1} { 0pt } } \cs_new_protected:Npn \@@_align_right:n #1 { \@@_align_auxi:nn {#1} { 0pt~plus~1fill } } +\cs_new_protected:Npn \@@_align_none:n #1 + { + \bool_if:NTF \l_@@_fixed_width_bool + { \hbox_to_wd:nn \l_@@_column_width_dim } + { \use:n } + {#1} + } \cs_new_protected:Npn \@@_align_auxi:nn #1#2 { \bool_if:NTF \l_@@_fixed_width_bool @@ -656,7 +665,7 @@ \keys_define:nn { siunitx } { table-text-alignment .choices:nn = - { center , left , right } + { center , left , right , none } { \tl_set:Nn \l_@@_align_text_tl {#1} } , } \tl_new:N \l_@@_align_text_tl diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 8f9b2dab570..73f54d71eba 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-07-20} {3.0.21} +\ProvidesExplPackage {siunitx} {2021-07-22} {3.0.22} {A comprehensive (SI) units package} % \end{macrocode} % @@ -472,14 +472,16 @@ % Creating numerical columns requires that these are declared before anything % else in \cs{NC@list}: this is necessary to work with optional arguments. % This means a bit of manual effort after the simple declaration of a new -% column type. The token assigned to the column type is not fixed as this -% allows the same code to be used in compatibility with version~$2$. +% column type. % \begin{macrocode} \cs_new_protected:Npn \@@_declare_column:Nnn #1#2#3 { \cs_if_exist:cT { NC@find@ #1 } { \cs_undefine:c { NC@find@ #1 } + \cs_set_protected:Npn \@@_tmp:w ##1 \NC@do #1 ##2 \q_stop + { \NC@list {##1##2} } + \exp_after:wN \@@_tmp:w \the \NC@list \q_stop \msg_warning:nnn { siunitx } { column-overwritten } {#1} } \newcolumntype {#1} { } diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.tex b/Master/texmf-dist/source/latex/siunitx/siunitx.tex index a97ab0bc58f..c37e3682e0a 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.tex +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.tex @@ -2418,20 +2418,20 @@ to the layout of tabular material (Table~\ref{tab:opt:tables}). \DescribeOption{table-alignment-mode} The method used by \pkg{siunitx} to align numbers is selected using the \opt{table-alignment-mode} option, which may be one of \opt{marker}, -\opt{format} or \meta{none}. With the standard setting, \meta{marker}, the +\opt{format} or \meta{none}. With the standard setting, \opt{marker}, the package centers the decimal marker in a tabular column, potentially leaving -white space at the shorter end of a number. The \meta{format} mode uses -information from the \meta{table-format} key to construct a model: this is then +white space at the shorter end of a number. The \opt{format} mode uses +information from the \opt{table-format} key to construct a model: this is then used to define the space available to a number. For asymmetrical numbers, this method is strongly preferable. Finally, \opt{none} disables alignment entirely: numbers are simply parsed. \DescribeOption{table-number-alignment} -When \opt{table-alignment-mode} is set to \meta{format} or \meta{none}, the +When \opt{table-alignment-mode} is set to \opt{format} or \opt{none}, the placement of the number \enquote{block} within the cell as a whole is set by -the \meta{table-number-alignment} option, which may be one of \meta{left}, -\meta{center} or \meta{right}. (When \opt{table-alignment-mode} is set to -\meta{marker}, the decimal marker is always centered in the cell.) The +the \opt{table-number-alignment} option, which may be one of \opt{left}, +\opt{center} or \opt{right}. (When \opt{table-alignment-mode} is set to +\opt{marker}, the decimal marker is always centered in the cell.) The different alignment choices are illustrated in Table~\ref{tab:S:align}, which uses somewhat exaggerated column headings to show the relative position of the cell contents. @@ -2485,7 +2485,7 @@ Table~\ref{tab:S:parse}. \DescribeOption{table-format} When the \opt{table-alignment-mode} is set to \opt{format}, \pkg{siunitx} uses -the information set in \meta{table-format} to construct a \enquote{model} which +the information set in \opt{table-format} to construct a \enquote{model} which defines the space to reserve for a number. The \opt{table-format} key is interpreted in much the same way as a table cell. The numerical part should consist of a number showing how many figures to reserve in each part of the @@ -2805,7 +2805,10 @@ the numbers themselves right-aligned (Table~\ref{tab:width:special}). Cell contents which are not part of a number can be protected using braces, as illustrated. Cells which contain no numerical data at all are aligned using the setting specified by the \opt{table-text-alignment} option, which recognises -the values \opt{center}, \opt{left} and \opt{right} (Table~\ref{tab:S:text}). +the values \opt{center}, \opt{left}, \opt{none} and \opt{right} +(Table~\ref{tab:S:text}). The setting \opt{none} is intended for use with +the package \pkg{tabularray}, which carries out its own alignment of textual +values. \begin{LaTeXdemo}[code and float] \begin{table} \caption{Aligning text in \texttt{S} columns.% diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index 03d48ee1604..8af08eb1376 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-07-20} {3.0.21} +\ProvidesExplPackage {siunitx} {2021-07-22} {3.0.22} {A comprehensive (SI) units package} \msg_new:nnnn { siunitx } { incompatible-package } { Package~'#1'~incompatible. } @@ -1472,6 +1472,7 @@ \cs_generate_variant:Nn \tl_if_blank:nTF { f } \cs_generate_variant:Nn \tl_if_blank_p:n { f } \cs_generate_variant:Nn \tl_if_in:NnTF { NV } +\cs_generate_variant:Nn \tl_remove_all:Nn { NV } \cs_generate_variant:Nn \tl_replace_all:Nnn { NnV } \tl_new:N \l__siunitx_number_tmp_tl \tl_new:N \l__siunitx_number_outputted_tl @@ -1593,6 +1594,9 @@ } \tl_set_eq:NN \l__siunitx_number_input_tl \l__siunitx_number_arg_tl \siunitx_number_normalize_symbols:N \l__siunitx_number_arg_tl + \protected@edef \l__siunitx_number_input_ignore_tl { \l__siunitx_number_input_ignore_tl } + \tl_if_empty:NF \l__siunitx_number_input_ignore_tl + { \tl_remove_all:NV \l__siunitx_number_arg_tl \l__siunitx_number_input_ignore_tl } \tl_if_empty:NF \l__siunitx_number_arg_tl { \__siunitx_number_parse_comparator: } \__siunitx_number_parse_check: @@ -4129,6 +4133,13 @@ { \__siunitx_table_align_auxi:nn {#1} { 0pt } } \cs_new_protected:Npn \__siunitx_table_align_right:n #1 { \__siunitx_table_align_auxi:nn {#1} { 0pt~plus~1fill } } +\cs_new_protected:Npn \__siunitx_table_align_none:n #1 + { + \bool_if:NTF \l__siunitx_table_fixed_width_bool + { \hbox_to_wd:nn \l__siunitx_table_column_width_dim } + { \use:n } + {#1} + } \cs_new_protected:Npn \__siunitx_table_align_auxi:nn #1#2 { \bool_if:NTF \l__siunitx_table_fixed_width_bool @@ -4159,7 +4170,7 @@ \keys_define:nn { siunitx } { table-text-alignment .choices:nn = - { center , left , right } + { center , left , right , none } { \tl_set:Nn \l__siunitx_table_align_text_tl {#1} } , } \tl_new:N \l__siunitx_table_align_text_tl @@ -7497,6 +7508,9 @@ \cs_if_exist:cT { NC@find@ #1 } { \cs_undefine:c { NC@find@ #1 } + \cs_set_protected:Npn \__siunitx_tmp:w ##1 \NC@do #1 ##2 \q_stop + { \NC@list {##1##2} } + \exp_after:wN \__siunitx_tmp:w \the \NC@list \q_stop \msg_warning:nnn { siunitx } { column-overwritten } {#1} } \newcolumntype {#1} { } |