summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-24 01:17:47 +0000
committerKarl Berry <karl@freefriends.org>2010-11-24 01:17:47 +0000
commit2a0f1e86a9ac2e9c7af641ce60e93f8bbf1b2908 (patch)
treedd8961900125920c46c920ac1a711f41608ec6f9 /Master/texmf-dist/source
parent2cc2d8c0e0cf71870980839e3c308789513787a7 (diff)
siunitx (23nov10)
git-svn-id: svn://tug.org/texlive/trunk@20548 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx106
1 files changed, 66 insertions, 40 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index ee99cc0708a..c4a801212de 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -517,6 +517,10 @@ This work consists of the file siunitx.dtx
% \opt{free-standing-units} is active}
%\changes{v2.1d}{2010/11/14}{Error with definition of version 1 option
% \opt{xspace} corrected}
+%\changes{v2.1e}{2010/11/22}{Further corrections when applying unit
+% options when \opt{free-standing-units} is active}
+%\changes{v2.1e}{2010/11/22}{Fix issues with text mode symbols and
+% \pkg{fontspec} package}
%
%\begin{abstract}
% Typesetting values with units requires care to ensure that the
@@ -4401,7 +4405,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2010/11/14} {2.1c}
+\ProvidesExplPackage {siunitx} {2010/11/22} {2.1e}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -4498,18 +4502,34 @@ This work consists of the file siunitx.dtx
%
%\begin{macro}{\c_siunitx_minus_tl}
% To allow the correct symbol to appear in text mode: this is the same
-% as \cs{textminus} from \pkg{textcomp}.
+% as \cs{textminus} from \pkg{textcomp}. If \pkg{fontspec} is loaded
+% then the real character can be used.
% \begin{macrocode}
\DeclareTextSymbolDefault \c_siunitx_minus_tl { TS1 }
\DeclareTextSymbol \c_siunitx_minus_tl { TS1 } { 61 }
+\AtBeginDocument {
+ \@ifpackageloaded { fontspec }
+ {
+ \tl_set:Nx \c_siunitx_minus_tl { \char 8722 }
+ }
+ { }
+}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\c_siunitx_mu_tl}
-% The lack of an upright mu has to be sorted out.
+% The lack of an upright mu has to be sorted out. The same consideration
+% for \pkg{fontspec} as above.
% \begin{macrocode}
\DeclareTextSymbol \c_siunitx_mu_tl { TS1 } { 181 }
\DeclareTextSymbolDefault \c_siunitx_mu_tl { TS1 }
+\AtBeginDocument {
+ \@ifpackageloaded { fontspec }
+ {
+ \tl_set:Nx \c_siunitx_mu_tl { \char 181 }
+ }
+ { }
+}
% \end{macrocode}
%\end{macro}
%
@@ -9866,22 +9886,23 @@ This work consists of the file siunitx.dtx
{
\ProvideDocumentCommand \exp_not:N #1 { }
{
- \exp_not:N \cs_if_free:NF
- \exp_not:c { l_siunitx_ \token_to_str:N #1 _options_tl }
- {
- \keys_set:nV { siunitx }
- \exp_not:c
- { l_siunitx_ \token_to_str:N #1 _options_tl }
- }
- \bool_if:NT \l_siunitx_create_prespace_bool
- {
- \exp_not:n
- {
- \siunitx_ensuremath:n
- { \l_siunitx_number_unit_separator_tl }
- }
- }
- \group_begin:
+ \group_begin:
+ \exp_not:N \cs_if_free:NF
+ \exp_not:c
+ { l_siunitx_ \token_to_str:N #1 _options_tl }
+ {
+ \keys_set:nV { siunitx }
+ \exp_not:c
+ { l_siunitx_ \token_to_str:N #1 _options_tl }
+ }
+ \bool_if:NT \l_siunitx_create_prespace_bool
+ {
+ \exp_not:n
+ {
+ \siunitx_ensuremath:n
+ { \l_siunitx_number_unit_separator_tl }
+ }
+ }
\exp_not:n { \siunitx_unit_output:nn {#1} { } }
\group_end:
\bool_if:NT \l_siunitx_create_xspace_bool
@@ -9898,26 +9919,31 @@ This work consists of the file siunitx.dtx
{
\ProvideDocumentCommand \exp_not:N #1 { o }
{
- \exp_not:N \cs_if_free:cF
- \exp_not:c { l_siunitx_ \token_to_str:N #1 _options_tl }
- {
- \keys_set:nV { siunitx }
- \exp_not:c
- { l_siunitx_ \token_to_str:N #1 _options_tl }
- }
- \exp_not:N \IfNoValueTF {####1}
- { \exp_not:n { \siunitx_unit_output:nn {#1} { } } }
- {
- \bool_if:NT \l_siunitx_create_prespace_bool
- {
- \exp_not:n
- {
- \siunitx_ensuremath:n
- { \l_siunitx_number_unit_separator_tl }
+ \group_begin:
+ \exp_not:N \cs_if_free:cF
+ \exp_not:c
+ { l_siunitx_ \token_to_str:N #1 _options_tl }
+ {
+ \keys_set:nV { siunitx }
+ \exp_not:c
+ {
+ l_siunitx_ \token_to_str:N #1 _options_tl
}
- }
- \SI {####1} { \exp_not:N #1 }
- }
+ }
+ \exp_not:N \IfNoValueTF {####1}
+ {
+ \bool_if:NT \l_siunitx_create_prespace_bool
+ {
+ \exp_not:n
+ {
+ \siunitx_ensuremath:n
+ { \l_siunitx_number_unit_separator_tl }
+ }
+ }
+ \exp_not:n { \siunitx_unit_output:nn {#1} { } }
+ }
+ { \SI {####1} { \exp_not:N #1 } }
+ \group_end:
\bool_if:NT \l_siunitx_create_xspace_bool
{ \exp_not:N \xspace }
}
@@ -14387,7 +14413,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2010/11/14} {2.1c}
+\ProvidesExplFile {siunitx-version-1.cfg} {2010/11/22} {2.1e}
{siunitx: Version 1 settings}
% \end{macrocode}
%
@@ -15668,7 +15694,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2010/11/14} {2.1c}
+\ProvidesExplFile {siunitx-binary.cfg} {2010/11/22} {2.1e}
{siunitx: Binary units}
% \end{macrocode}
%