summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx/siunitx.sty')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty42
1 files changed, 25 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 73ed6ae89e4..cb00ec3b1bc 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -14,15 +14,15 @@
%% ---------------------------------------------------------------
%%
\RequirePackage{expl3,xparse}
-\ProvidesExplPackage {siunitx} {2012/11/27} {2.5m}
+\ProvidesExplPackage {siunitx} {2012/12/29} {2.5n}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2012/11/21 }
{ }
{
- \PackageError { siunitx } { Support~package~expl3~too~old. }
+ \PackageError { siunitx } { Support~package~expl3~too~old }
{
You~need~to~update~your~installation~of~the~bundles~'l3kernel'~and~
- 'l3packages'.\\
+ 'l3packages'.\MessageBreak
Loading~siunitx~will~abort!
}
\tex_endinput:D
@@ -846,18 +846,27 @@
{
\sb { \text {#1} }
\sp { \text {##1} }
- }
+ }
}
- \cs_set_eq:NN \l__peek_search_token \__siunitx_print_text_super:n
- \cs_set:Npn \__peek_true:w
+ \cs_set_protected_nopar:Npn \__siunitx_peek_true:
{
- \tex_afterassignment:D \__peek_true_aux:w
- \cs_set_eq:NN \__peek_tmp:w
+ \tex_afterassignment:D \__siunitx_print_text_sub_super:n
+ \cs_set_eq:NN \__siunitx_tmp:w
}
- \cs_set:Npn \__peek_true_aux:w { \__siunitx_print_text_sub_super:n }
- \cs_set:Npn \__peek_false:w { \ensuremath { \sb { \text {#1} } } }
- \peek_after:Nw \__peek_execute_branches_meaning:
+ \cs_set_protected_nopar:Npn \__siunitx_peek_false:
+ { \ensuremath { \sb { \text {#1} } } }
+ \peek_after:Nw \__siunitx_print_text_sub_peek:
+ }
+\cs_new_protected:Npn \__siunitx_print_text_sub_peek:
+ {
+ \if_meaning:w \l_peek_token \__siunitx_print_text_super:n
+ \exp_after:wN \__siunitx_peek_true:
+ \else:
+ \exp_after:wN \__siunitx_peek_false:
+ \fi:
}
+\cs_new_protected_nopar:Npn \__siunitx_peek_true: { }
+\cs_new_protected_nopar:Npn \__siunitx_peek_false: { }
\cs_new_protected:Npn \__siunitx_print_text_sub_super:n { }
\cs_new_protected:Npn \__siunitx_print_text_super:n #1 {
\tl_set:Nn \l__siunitx_tmpa_tl {#1}
@@ -6887,8 +6896,10 @@
}
\clist_put_right:Nx \l__siunitx_pgf_link_clist
{ set~thousands~separator = { \exp_not:V \l__siunitx_group_sep_tl } }
- \clist_put_right:Nn \l__siunitx_pgf_link_clist
- { min~exponent~for~1000~sep = \int_use:N \l__siunitx_group_min_int }
+ \clist_put_right:Nx \l__siunitx_pgf_link_clist
+ {
+ min~exponent~for~1000~sep = \int_eval:n { \l__siunitx_group_min_int - \c_one }
+ }
\bool_if:nF
{
\l__siunitx_group_decimal_bool ||
@@ -6916,15 +6927,12 @@
\clist_put_right:Nn \l__siunitx_pgf_link_clist
{ showpos = false }
}
- \group_begin:
- \cs_set:Npx \__siunitx_tmp:w
+ \use:x
{
- \group_end:
\exp_not:N \pgfqkeys
{ /pgf/number~format }
{ \exp_not:V \l__siunitx_pgf_link_clist }
}
- \__siunitx_tmp:w
}
\msg_new:nnnn { siunitx } { bad-arc-sign }
{ Incorrect~use~of~sign~in~degree-minute-second~angle. }