summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-28 00:17:34 +0000
committerKarl Berry <karl@freefriends.org>2012-11-28 00:17:34 +0000
commita6af47132f51f0bc81b929bcbb3ce0b705806ae2 (patch)
tree0deaad7d98e9bf8da6c701f9f565bd668381a2e6 /Master/texmf-dist/tex/latex/siunitx
parent1ef5ffd1489b60f8d1d6521ba89d3c48bb9cd851 (diff)
siunitx (27nov12)
git-svn-id: svn://tug.org/texlive/trunk@28378 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty62
4 files changed, 38 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
index 97cd12ed1a1..a57975c0f80 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/11/27} {2.5m}
{siunitx: Abbreviated units}
\DeclareSIUnit \A { \ampere }
\DeclareSIUnit \pA { \pico \ampere }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
index e5b0ce34b9b..46d2e387740 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-binary.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/11/27} {2.5m}
{siunitx: Binary units}
\DeclareBinaryPrefix \kibi { Ki } { 10 }
\DeclareBinaryPrefix \mebi { Mi } { 20 }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
index f603a32f1f0..a66bd18c707 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-version-1.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/11/27} {2.5m}
{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 852b51f7677..73ed6ae89e4 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -14,7 +14,7 @@
%% ---------------------------------------------------------------
%%
\RequirePackage{expl3,xparse}
-\ProvidesExplPackage {siunitx} {2012/11/13} {2.5k}
+\ProvidesExplPackage {siunitx} {2012/11/27} {2.5m}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2012/11/21 }
{ }
@@ -351,6 +351,16 @@
}
{ }
}
+\cs_new_eq:NN \__siunitx_ensure_ltr:n \use:n
+\AtBeginDocument
+ {
+ \@ifpackageloaded { bidi }
+ {
+ \xetex_if_engine:T
+ { \cs_set_protected:Npn \__siunitx_ensure_ltr:n #1 { \LRE {#1} } }
+ }
+ { }
+ }
\cs_new_eq:NN \__siunitx_textsuperscript:n \textsuperscript
\bool_new:N \l__siunitx_display_math_bool
\tex_everydisplay:D \exp_after:wN
@@ -749,22 +759,26 @@
\group_end:
}
\cs_generate_variant:Nn \__siunitx_print:nn { nV }
-\cs_new_protected:Npn \__siunitx_print_aux: {
- \text
- {
- \__siunitx_print_color:
- \__siunitx_font_shape:
- \__siunitx_font_weight:
- \use:c
- {
- __siunitx_ \l__siunitx_print_type_tl _
- text \l__siunitx_font_family_tl :
- }
- \bool_if:NTF \l__siunitx_font_math_mode_bool
- { \__siunitx_print_math: }
- { \__siunitx_print_text: }
- }
-}
+\cs_new_protected:Npn \__siunitx_print_aux:
+ {
+ \text
+ {
+ \__siunitx_ensure_ltr:n
+ {
+ \__siunitx_print_color:
+ \__siunitx_font_shape:
+ \__siunitx_font_weight:
+ \use:c
+ {
+ __siunitx_ \l__siunitx_print_type_tl _
+ text \l__siunitx_font_family_tl :
+ }
+ \bool_if:NTF \l__siunitx_font_math_mode_bool
+ { \__siunitx_print_math: }
+ { \__siunitx_print_text: }
+ }
+ }
+ }
\cs_new_protected:Npn \__siunitx_print_color: {
\tl_if_empty:cF { l__siunitx_ \l__siunitx_print_type_tl _color_tl }
{
@@ -4794,10 +4808,7 @@
\__siunitx_unit_format_literal_extras_aux:nN #1#2 {
\char_set_lccode:nn { `\@ } {#1}
\tl_to_lowercase:n
- {
- \tl_replace_all:NnV \l__siunitx_unit_tl { @ }
- \l__siunitx_unit_tl
- }
+ { \tl_replace_all:NnV \l__siunitx_unit_tl { @ } #2 }
}
\pdftex_if_engine:T
{
@@ -7214,6 +7225,7 @@
\cs_set_eq:NN \SI \__siunitx_bookmark_SI:w
\cs_set_eq:NN \SIrange \__siunitx_bookmark_SIrange:w
\cs_set_eq:NN \si \__siunitx_bookmark_si:w
+ \cs_set_eq:NN \highlight \use_ii:nn
\cs_set_eq:NN \__siunitx_textsuperscript:n \use:n
\cs_set:Npn \SIUnitSymbolAngstrom { \AA }
\cs_set:Npn \SIUnitSymbolArcminute { ' }
@@ -7470,7 +7482,7 @@
abbreviations .default:n = true ,
binary-units .choice:,
binary-units /
- true .code:n = { \__siunitx_load_binary: },
+ true .code:n = { \AtBeginDocument { \__siunitx_load_binary: } },
binary-units /
false .code:n =
{ \cs_set_eq:NN \__siunitx_load_binary: \prg_do_nothing: } ,
@@ -7486,11 +7498,7 @@
\@onefilewithoptions { siunitx-binary } [ ] [ ]
\c__siunitx_configuration_ext_tl
}
-\AtBeginDocument
- {
- \__siunitx_load_abbreviations:
- \__siunitx_load_binary:
- }
+\AtBeginDocument { \__siunitx_load_abbreviations: }
\__siunitx_option_deactivate:n { abbreviations , binary }
\keys_define:nn { siunitx }
{