summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/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/source/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/source/latex/siunitx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx81
1 files changed, 51 insertions, 30 deletions
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}
%