diff options
author | Karl Berry <karl@freefriends.org> | 2016-11-24 23:05:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-11-24 23:05:24 +0000 |
commit | 7a13ffb6d9458fd728428c6202ef1afa1debfa45 (patch) | |
tree | 4b4fa07e11460c4c31ea52f95027581f015b4126 /Master/texmf-dist/source/latex | |
parent | 2b2d2aae3d6375923ff7dc0547c4fe32d909122d (diff) |
siunitx (24nov16)
git-svn-id: svn://tug.org/texlive/trunk@42566 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 87 |
1 files changed, 59 insertions, 28 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index d2dc271a9b8..e32599d1463 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -491,7 +491,7 @@ This work consists of the file siunitx.dtx %\changes{v2.2a}{2011/04/16}{Group digits for input containing symbolic % entries} %\changes{v2.2a}{2011/04/16}{Insert tokens correctly when last tabular cell -% does not end \cs{\\}} +% does not end \texttt{\textbackslash\textbackslash}} %\changes{v2.2a}{2011/04/16}{Fix bug with literal units and auto-insertion % of \num{1} when \opt{per-mode} is \opt{symbol}} %\changes{v2.2b}{2011/04/17}{Make \cs{of} work in hyper-linked sections} @@ -655,6 +655,9 @@ This work consists of the file siunitx.dtx % \changes{v2.6r}{2016/08/21}{Correctly handle \texttt{e0}} % \changes{v2.6r}{2016/08/21}{Warn when color support is not available} % \changes{v2.6s}{2016/09/02}{Drop one excess warning} +% \changes{v2.7}{2016/11/11}{Start adding documented code level interfaces} +% \changes{v2.7}{2016/11/23}{Fix when \pkg{cellspace} is applied to +% math mode material} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -5150,6 +5153,22 @@ This work consists of the file siunitx.dtx % \href{mailto:joseph.wright@morningstar2.co.uk} % {\texttt{joseph.wright@morningstar2.co.uk}}. % +% \section{Code level interfaces} +% +% At present, most interfaces in \pkg{siunitx} at the code level are internal. +% This largely reflects the parallel between \pkg{siunitx} and core \pkg{expl3} +% development: much of the code here was written whilst the \LaTeX{} team were +% defining how best to handle this area. Development work on the next major +% release of \pkg{siunitx} includes a full set of documented code level +% interfaces. Some of these will be added to this (release) version of the +% package over time, where this is appropriate. +% +% \begin{variable}{\l_siunitx_unit_symbolic_seq} +% This sequence contains all of the symbolic \meta{unit} names defined : +% these will be in the form of control sequences such as |\kilogram|. +% The order of the sequence is unimportant. +% \end{variable} +% %\section{Thanks} % % Many users have provided feedback, bug reports and ideas for new @@ -5179,7 +5198,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2016/09/02} {2.6s} +\ProvidesExplPackage {siunitx} {2016/11/24} {2.7} {A comprehensive (SI) units package} % \end{macrocode} % @@ -11222,15 +11241,15 @@ This work consists of the file siunitx.dtx % method only makes these available inside the unit-processing functions % (\cs{SI}, \cs{si} and the \texttt{S} column). % -%\begin{macro}{\l_@@_declare_list_seq} +%\begin{macro}{\l_siunitx_unit_symbolic_seq} % A list of all unit and related functions. % \begin{macrocode} -\seq_new:N \l_@@_declare_list_seq -\seq_put_right:Nn \l_@@_declare_list_seq { \of } -\seq_put_right:Nn \l_@@_declare_list_seq { \highlight } -\seq_put_right:Nn \l_@@_declare_list_seq { \per } -\seq_put_right:Nn \l_@@_declare_list_seq { \raiseto } -\seq_put_right:Nn \l_@@_declare_list_seq { \tothe } +\seq_new:N \l_siunitx_unit_symbolic_seq +\seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \of } +\seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \highlight } +\seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \per } +\seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \raiseto } +\seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \tothe } % \end{macrocode} %\end{macro} % @@ -11241,14 +11260,14 @@ This work consists of the file siunitx.dtx % Creating powers is all about storing values. % \begin{macrocode} \cs_new_protected:Npn \@@_declare_power_after:Nn #1#2 { - \seq_put_right:Nn \l_@@_declare_list_seq {#1} + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq {#1} \cs_set:cpn { @@_ \token_to_str:N #1 _literal:w } { \@@_textsuperscript:n {#2} } \cs_set:cpn { @@_ \token_to_str:N #1 _function:w } { \@@_unit_parse_power_after:n {#2} } } \cs_new_protected:Npn \@@_declare_power_before:Nn #1#2 { - \seq_put_right:Nn \l_@@_declare_list_seq {#1} + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq {#1} \cs_set:cpn { @@_ \token_to_str:N #1 _literal:w } ##1 { ##1 \@@_textsuperscript:n {#2} } \cs_set:cpn { @@_ \token_to_str:N #1 _function:w } @@ -11266,7 +11285,7 @@ This work consists of the file siunitx.dtx % \begin{macrocode} \cs_new_protected:Npn \@@_declare_prefix:Nnnn #1#2#3#4 { - \seq_put_right:Nn \l_@@_declare_list_seq {#1} + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq {#1} \prop_put:Nnn \l_@@_prefix_forward_prop {#1} {#4} \prop_put:Nnn \l_@@_prefix_reverse_prop {#4} {#1} \cs_set:cpn { @@_ \token_to_str:N #1 _literal:w } {#2} @@ -11287,7 +11306,7 @@ This work consists of the file siunitx.dtx % Qualifiers just need storing. % \begin{macrocode} \cs_new_protected:Npn \@@_declare_qualifier:Nn #1#2 { - \seq_put_right:Nn \l_@@_declare_list_seq {#1} + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq {#1} \cs_set:cpn { @@_ \token_to_str:N #1 _literal:w } { \text { ~ } ( #2 ) } \cs_set:cpn { @@_ \token_to_str:N #1 _function:w } @@ -11304,7 +11323,7 @@ This work consists of the file siunitx.dtx % problem with the creation order for units. % \begin{macrocode} \cs_new_protected:Npn \@@_declare_unit:Nnn #1#2#3 { - \seq_put_right:Nn \l_@@_declare_list_seq {#1} + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq {#1} \cs_set:cpn { @@_ \token_to_str:N #1 _literal:w } {#2} \cs_set_protected:cpn { @@_ \token_to_str:N #1 _function:w } { @@ -11385,7 +11404,7 @@ This work consists of the file siunitx.dtx \cs_set_protected:Npn \@@_cancel:n #1 { \@@__real_cancel:n { \@@_print:nn { unit } {#1} } } \cs_set_eq:NN \@@__real_cancel:n \cancel - \seq_put_right:Nn \l_@@_declare_list_seq { \cancel } + \seq_put_right:Nn \l_siunitx_unit_symbolic_seq { \cancel } \cs_new_protected:cpn { @@_ \token_to_str:N \cancel _function:w } { \@@_unit_parse_special:n { \@@_cancel:n } } @@ -11449,7 +11468,7 @@ This work consists of the file siunitx.dtx \cs_new_protected:Npn \@@_unit_create_empty_functions: { \@@_unit_create_functions_aux_i: - \seq_map_function:NN \l_@@_declare_list_seq + \seq_map_function:NN \l_siunitx_unit_symbolic_seq \@@_unit_create_empty_functions_aux:N \@@_unit_create_functions_aux_ii: } @@ -11474,14 +11493,14 @@ This work consists of the file siunitx.dtx { \@@_unit_create_functions_aux_i: \bool_if:NT \l_@@_create_overwrite_bool - { \seq_map_function:NN \l_@@_declare_list_seq \cs_undefine:N } + { \seq_map_function:NN \l_siunitx_unit_symbolic_seq \cs_undefine:N } \bool_if:NTF \l_@@_create_optional_bool { - \seq_map_function:NN \l_@@_declare_list_seq + \seq_map_function:NN \l_siunitx_unit_symbolic_seq \@@_unit_create_with_arg:N } { - \seq_map_function:NN \l_@@_declare_list_seq + \seq_map_function:NN \l_siunitx_unit_symbolic_seq \@@_unit_create:N } \@@_unit_create_functions_aux_ii: @@ -11686,7 +11705,7 @@ This work consists of the file siunitx.dtx % \begin{macrocode} \cs_new_protected:Npn \@@_unit_if_literal:nTF #1#2#3 { \group_begin: - \seq_map_function:NN \l_@@_declare_list_seq + \seq_map_function:NN \l_siunitx_unit_symbolic_seq \@@_unit_if_literal_aux:N \cs_set_eq:NN \of \use_none:n \cs_set_eq:NN \highlight \use_none:n @@ -11775,7 +11794,7 @@ This work consists of the file siunitx.dtx \prop_clear:N \l_@@_unit_prop \int_zero:N \l_@@_unit_int \bool_set_false:N \l_@@_per_bool - \seq_map_inline:Nn \l_@@_declare_list_seq + \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq { \cs_set_eq:Nc ##1 { @@_ \token_to_str:N ##1 _function:w } } } % \end{macrocode} @@ -12331,7 +12350,7 @@ This work consists of the file siunitx.dtx \int_zero:N \l_@@_unit_prefix_int \int_zero:N \l_@@_unit_denominator_int \int_zero:N \l_@@_unit_numerator_int - \seq_map_inline:Nn \l_@@_declare_list_seq + \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq { \@@_unit_print_literal_aux:N ##1 } } % \end{macrocode} @@ -12350,7 +12369,7 @@ This work consists of the file siunitx.dtx \cs_new_protected:Npn \@@_unit_format_literal:n #1 { \int_zero:N \l_@@_unit_prefix_int - \seq_map_inline:Nn \l_@@_declare_list_seq + \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq { \@@_unit_print_literal_aux:N ##1 } \tl_set:Nn \l_@@_unit_tl {#1} \tl_replace_all:NnV \l_@@_unit_tl { . } @@ -13383,6 +13402,18 @@ This work consists of the file siunitx.dtx \msg_new:nnn { siunitx } { moved-cellspace-column } { Column~type~for~cellspace~package~moved~to~'#1'. } \msg_warning:nnn { siunitx } { moved-cellspace-column } { C } + \ifcellspace@m + \def \env@matrix + { + \hskip -\arraycolsep + \let \@ifnextchar \new@ifnextchar + \array + { + * { \c@MaxMatrixCols } + { > { \bcolumn c \@nil $ } c < { $ \ecolumn } } @ { } + } + } + \fi } { } } @@ -16087,7 +16118,7 @@ This work consists of the file siunitx.dtx \cs_set_eq:NN \label \use_none:n \cs_set_eq:NN \index \use_none:n \cs_set_eq:NN \glossary \use_none:n - \seq_map_inline:Nn \l_@@_declare_list_seq + \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq { \@@_contents_add:N ##1 } } { \token_to_str:N \@writefile {#1} {#2} } @@ -16114,7 +16145,7 @@ This work consists of the file siunitx.dtx % \begin{macrocode} \cs_new_protected:Npn \@@_contents_bookmarks: { - \seq_map_inline:Nn \l_@@_declare_list_seq + \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq { \@@_unit_print_literal_aux:N ##1 } \cs_if_exist:NT \FB@fg { \cs_set_eq:NN \fg \FB@fg } @@ -16769,7 +16800,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2016/09/02} {2.6s} +\ProvidesExplFile {siunitx-version-1.cfg} {2016/11/24} {2.7} {siunitx: Version 1 settings} % \end{macrocode} % @@ -17711,7 +17742,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2016/09/02} {2.6s} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2016/11/24} {2.7} {siunitx: Abbreviated units} % \end{macrocode} % @@ -17893,7 +17924,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2016/09/02} {2.6s} +\ProvidesExplFile {siunitx-binary.cfg} {2016/11/24} {2.7} {siunitx: Binary units} % \end{macrocode} % |