summaryrefslogtreecommitdiff
path: root/Master
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
parent1ef5ffd1489b60f8d1d6521ba89d3c48bb9cd851 (diff)
siunitx (27nov12)
git-svn-id: svn://tug.org/texlive/trunk@28378 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin578927 -> 579069 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx81
-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
6 files changed, 89 insertions, 60 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index 13470bd672b..53e0eb8b35a 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index c6042d49de3..3c1925a113b 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -599,6 +599,11 @@ This work consists of the file siunitx.dtx
% using \cs{let}: fixes a warning with \pkg{amsmath}}
%\changes{v2.5k}{2012/11/13}{Skip spaces correctly after start of document}
%\changes{v2.5l}{2012/11/21}{Track changes in \pkg{expl3}}
+%\changes{v2.5m}{2012/11/27}{Fix bug with UTF8 engines and literal units}
+%\changes{v2.5m}{2012/11/27}{Handle \cs{highlight} correctly in bookmarks}
+%\changes{v2.5m}{2012/11/27}{Load \opt{binary-units} only if requested}
+%\changes{v2.5m}{2012/11/27}{Allow for right-to-left mode with \pkg{bidi}
+% package}
%
%\begin{abstract}
% Physical quantities have both numbers and units, and each physical
@@ -5109,7 +5114,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2012/11/13} {2.5k}
+\ProvidesExplPackage {siunitx} {2012/11/27} {2.5m}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -5608,6 +5613,24 @@ This work consists of the file siunitx.dtx
{ }
}
% \end{macrocode}
+%
+% \begin{macro}{\@@_ensure_ltr:n}
+% When the \pkg{bidi} package is loaded with \XeTeX{} we need to make sure
+% that \cs{text} is doing the correct thing. The \pkg{bidi} package seems to
+% lead to a slightly broken \cs{text}, so this is something of a hack.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_ensure_ltr:n \use:n
+\AtBeginDocument
+ {
+ \@ifpackageloaded { bidi }
+ {
+ \xetex_if_engine:T
+ { \cs_set_protected:Npn \@@_ensure_ltr:n #1 { \LRE {#1} } }
+ }
+ { }
+ }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\@@_textsuperscript:n}
% This function is set up here so that it can be redefined
@@ -6284,22 +6307,26 @@ This work consists of the file siunitx.dtx
% function is called. Everything is inside \cs{text} as this allows
% proper setting of the various mode settings.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_print_aux: {
- \text
- {
- \@@_print_color:
- \@@_font_shape:
- \@@_font_weight:
- \use:c
- {
- @@_ \l_@@_print_type_tl _
- text \l_@@_font_family_tl :
- }
- \bool_if:NTF \l_@@_font_math_mode_bool
- { \@@_print_math: }
- { \@@_print_text: }
- }
-}
+\cs_new_protected:Npn \@@_print_aux:
+ {
+ \text
+ {
+ \@@_ensure_ltr:n
+ {
+ \@@_print_color:
+ \@@_font_shape:
+ \@@_font_weight:
+ \use:c
+ {
+ @@_ \l_@@_print_type_tl _
+ text \l_@@_font_family_tl :
+ }
+ \bool_if:NTF \l_@@_font_math_mode_bool
+ { \@@_print_math: }
+ { \@@_print_text: }
+ }
+ }
+ }
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -12203,10 +12230,7 @@ This work consists of the file siunitx.dtx
\@@_unit_format_literal_extras_aux:nN #1#2 {
\char_set_lccode:nn { `\@ } {#1}
\tl_to_lowercase:n
- {
- \tl_replace_all:NnV \l_@@_unit_tl { @ }
- \l_@@_unit_tl
- }
+ { \tl_replace_all:NnV \l_@@_unit_tl { @ } #2 }
}
\pdftex_if_engine:T
{
@@ -15848,6 +15872,7 @@ This work consists of the file siunitx.dtx
\cs_set_eq:NN \SI \@@_bookmark_SI:w
\cs_set_eq:NN \SIrange \@@_bookmark_SIrange:w
\cs_set_eq:NN \si \@@_bookmark_si:w
+ \cs_set_eq:NN \highlight \use_ii:nn
\cs_set_eq:NN \@@_textsuperscript:n \use:n
\cs_set:Npn \SIUnitSymbolAngstrom { \AA }
\cs_set:Npn \SIUnitSymbolArcminute { ' }
@@ -16397,7 +16422,7 @@ This work consists of the file siunitx.dtx
abbreviations .default:n = true ,
binary-units .choice:,
binary-units /
- true .code:n = { \@@_load_binary: },
+ true .code:n = { \AtBeginDocument { \@@_load_binary: } },
binary-units /
false .code:n =
{ \cs_set_eq:NN \@@_load_binary: \prg_do_nothing: } ,
@@ -16413,11 +16438,7 @@ This work consists of the file siunitx.dtx
\@onefilewithoptions { siunitx-binary } [ ] [ ]
\c_@@_configuration_ext_tl
}
-\AtBeginDocument
- {
- \@@_load_abbreviations:
- \@@_load_binary:
- }
+\AtBeginDocument { \@@_load_abbreviations: }
\@@_option_deactivate:n { abbreviations , binary }
% \end{macrocode}
% \end{macro}
@@ -16491,7 +16512,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/11/27} {2.5m}
{siunitx: Version 1 settings}
% \end{macrocode}
%
@@ -17436,7 +17457,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/11/27} {2.5m}
{siunitx: Abbreviated units}
% \end{macrocode}
%
@@ -17618,7 +17639,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2012/11/13} {2.5k}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/11/27} {2.5m}
{siunitx: Binary units}
% \end{macrocode}
%
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 }
{