summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-29 15:51:55 +0000
committerKarl Berry <karl@freefriends.org>2010-05-29 15:51:55 +0000
commit6a97bb6a82e6de5116bcddc5702e6bbbcd7ac24c (patch)
tree50c4d12fded00c3cbdb78db2f5c594dd7c12fad4 /Master/texmf-dist/tex
parentf0729600155900a5daf4683836c310f43b613d3d (diff)
siunitx 2.0a (28may10)
git-svn-id: svn://tug.org/texlive/trunk@18587 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-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.cfg79
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty189
4 files changed, 236 insertions, 36 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 d4d787aeb34..cfa9241cd4d 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} {2010/05/23} {2.0}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/05/28} {2.0a}
{siunitx: Abbreviated units}
\DeclareSIUnit \pA { \pico \ampere }
\DeclareSIUnit \nA { \nano \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 32707c3458b..3db2a7eb0dd 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} {2010/05/23} {2.0}
+\ProvidesExplFile {siunitx-binary.cfg} {2010/05/28} {2.0a}
{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 c7129987c98..790ecfc3f67 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} {2010/05/23} {2.0}
+\ProvidesExplFile {siunitx-version-1.cfg} {2010/05/28} {2.0a}
{siunitx: Version 1 settings}
\keys_set:nn { siunitx } { load-configurations = abbreviations }
\keys_define:nn { siunitx } {
@@ -29,39 +29,41 @@
allowoptargs .default:n = { true },
allowzeroexp .meta:n = { retain-zero-exponent = #1 },
allowzeroexp .default:n = { true },
- angelsep .choice: ,
- angelsep /
+ alsoload .code:n = ,
+ angformat .code:n = ,
+ anglesep .choice: ,
+ anglesep /
cdot .meta:n =
{ arc-separator = { } \cdot { } },
- angelsep /
+ anglesep /
comma .meta:n = { arc-separator = { {,} } },
- angelsep /
+ anglesep /
fullstop .meta:n = { arc-separator = { { . } } },
- angelsep /
+ anglesep /
med .meta:n = { arc-separator = \: },
- angelsep /
+ anglesep /
medium .meta:n = { arc-separator = \: },
- angelsep /
+ anglesep /
none .meta:n = { arc-separator = },
- angelsep /
+ anglesep /
period .meta:n = { arc-separator = { { . } } },
- angelsep /
+ anglesep /
space .meta:n = { arc-separator = \text { ~ } },
- angelsep /
+ anglesep /
stop .meta:n = { arc-separator = { { . } } },
- angelsep /
+ anglesep /
thick .meta:n = { arc-separator = \; },
- angelsep /
+ anglesep /
thin .meta:n = { arc-separator = \, },
- angelsep /
+ anglesep /
tightcdot .meta:n =
{ arc-separator = \bgroup \cdot \egroup },
- angelsep /
+ anglesep /
tighttimes .meta:n =
{ arc-separator = \bgroup \times \egroup },
- angelsep /
+ anglesep /
times .meta:n = { arc-separator = \times },
- angelsep /
+ anglesep /
unknown .meta:n = { arc-separator = #1 },
astroang .meta:n =
{ angle-symbol-over-decimal = #1 },
@@ -209,8 +211,8 @@
mathrm .meta:x =
{ math-rm = \exp_not:c {#1} },
mathsOmega .meta:n = { math-ohm = #1 },
- mathscelsius .meta:n = { math-celsius . = #1 },
- mathsdegree .meta:n = { math-degree . = #1 },
+ mathscelsius .meta:n = { math-celsius = #1 },
+ mathsdegree .meta:n = { math-degree = #1 },
mathsecond .meta:n = { math-arcsecond = #1 },
mathsf .meta:x =
{ math-sf = \exp_not:c {#1} },
@@ -244,7 +246,7 @@
obeybold .meta:n = { detect-weight = #1 },
obeybold .default:n = { true },
obeyitalic .meta:n = { detect-italic = #1 },
- opbeyitalic .default:n = { true },
+ obeyitalic .default:n = { true },
obeymode .meta:n = { detect-mode = #1 },
obeymode .default:n = { true },
openerr .meta:n = { open-bracket = #1 },
@@ -562,9 +564,24 @@
xspace .meta:n = { use-xspace = #1 },
xpace .default:n = { true }
}
-\cs_set_eq:NN \newunit \DeclareSIUnit
-\cs_set_eq:NN \renewunit \DeclareSIUnit
-\cs_set_eq:NN \provideunit \DeclareSIUnit
+\keys_define:nn { siunitx } {
+ unknown .code:n =
+ {
+ \msg_error:nnx { siunitx } { unknown-option }
+ { \exp_not:V \l_keys_key_tl }
+ }
+}
+\keys_set:nn { siunitx } {
+ free-standing-units = true ,
+ mode = math ,
+}
+\NewDocumentCommand \newunit { o m m } {
+ \IfNoValueTF {#1}
+ { \_siunitx_declare_unit:Nnn #2 {#3} { } }
+ { \_siunitx_declare_unit:Nnn #2 {#3} {#1} }
+}
+\cs_set_eq:NN \renewunit \newunit
+\cs_set_eq:NN \provideunit \newunit
\NewDocumentCommand \newpower { o m m } {
\IfNoValueTF {#1}
{ \DeclareSIPrePower #2 {#3} }
@@ -638,6 +655,22 @@
\DeclareSIUnit \Molar { \textsc { m } }
\DeclareSIUnit \torr { Torr }
\DeclareSIUnit \gon { gon }
+\DeclareSIUnit \micron { \micro \metre }
+\DeclareSIUnit \mrad { \milli \rad }
+\DeclareSIUnit \gauss { G }
+\DeclareSIUnit \eVperc { \eV \per \clight }
+\DeclareSIUnit \nanobarn { \nano \barn }
+\DeclareSIUnit \picobarn { \pico \barn }
+\DeclareSIUnit \femtobarn { \femto \barn }
+\DeclareSIUnit \attobarn { \atto \barn }
+\DeclareSIUnit \zeptobarn { \zepto \barn }
+\DeclareSIUnit \yoctobarn { \yocto \barn }
+\DeclareSIUnit \nb { \nano \barn }
+\DeclareSIUnit \pb { \pico \barn }
+\DeclareSIUnit \fb { \femto \barn }
+\DeclareSIUnit \ab { \atto \barn }
+\DeclareSIUnit \zb { \zepto \barn }
+\DeclareSIUnit \yb { \yocto \barn }
%%
%% Copyright (C) 2008-2010 by
%% Joseph Wright <joseph.wright@morningstar2.co.uk>
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index a407b5d22b6..97211e1db54 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}
-\ProvidesExplPackage {siunitx} {2010/05/23} {2.0}
+\ProvidesExplPackage {siunitx} {2010/05/28} {2.0a}
{A comprehensive (SI) units package}
\msg_set:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
@@ -79,11 +79,171 @@
}
\cs_generate_variant:Nn \_siunitx_tl_put_right_math:Nn { NV }
\cs_generate_variant:Nn \_siunitx_tl_put_right_math:Nn { cV }
+\seq_new:N \_c_siunitx_old_options_seq
+\cs_set_protected_nopar:Npn \_siunitx_tmp:w #1 {
+ \seq_put_right:Nx \_c_siunitx_old_options_seq { \tl_to_str:n {#1} }
+}
+\_siunitx_tmp:w { addsign }
+\_siunitx_tmp:w { allowlitunits }
+\_siunitx_tmp:w { allowoptarg }
+\_siunitx_tmp:w { allowzeroexp }
+\_siunitx_tmp:w { alsoload }
+\_siunitx_tmp:w { angformat }
+\_siunitx_tmp:w { anglesep }
+\_siunitx_tmp:w { astroang }
+\_siunitx_tmp:w { closeerr }
+\_siunitx_tmp:w { closrfrac }
+\_siunitx_tmp:w { closerange }
+\_siunitx_tmp:w { colorall }
+\_siunitx_tmp:w { colourall }
+\_siunitx_tmp:w { colorneg }
+\_siunitx_tmp:w { colourneg }
+\_siunitx_tmp:w { colourunits }
+\_siunitx_tmp:w { colourunits }
+\_siunitx_tmp:w { colorvalues }
+\_siunitx_tmp:w { colourvalues }
+\_siunitx_tmp:w { decimalsymbol }
+\_siunitx_tmp:w { debug }
+\_siunitx_tmp:w { detectdisplay }
+\_siunitx_tmp:w { digitsep }
+\_siunitx_tmp:w { dp }
+\_siunitx_tmp:w { emulate }
+\_siunitx_tmp:w { errspace }
+\_siunitx_tmp:w { eVcorra }
+\_siunitx_tmp:w { eVcorrb }
+\_siunitx_tmp:w { expbase }
+\_siunitx_tmp:w { expproduct }
+\_siunitx_tmp:w { fixdp }
+\_siunitx_tmp:w { fixsf }
+\_siunitx_tmp:w { fraction }
+\_siunitx_tmp:w { inlinebold }
+\_siunitx_tmp:w { log }
+\_siunitx_tmp:w { load }
+\_siunitx_tmp:w { mathOmega }
+\_siunitx_tmp:w { mathcelsius }
+\_siunitx_tmp:w { mathdegree }
+\_siunitx_tmp:w { mathminute }
+\_siunitx_tmp:w { mathmu }
+\_siunitx_tmp:w { mathringA }
+\_siunitx_tmp:w { mathrm }
+\_siunitx_tmp:w { mathsOmega }
+\_siunitx_tmp:w { mathscelsius }
+\_siunitx_tmp:w { mathsdegree }
+\_siunitx_tmp:w { mathsecond }
+\_siunitx_tmp:w { mathsf }
+\_siunitx_tmp:w { mathsminute }
+\_siunitx_tmp:w { mathsmu }
+\_siunitx_tmp:w { mathsringA }
+\_siunitx_tmp:w { mathsrm }
+\_siunitx_tmp:w { mathssecond }
+\_siunitx_tmp:w { mathssf }
+\_siunitx_tmp:w { mathstt }
+\_siunitx_tmp:w { mathtt }
+\_siunitx_tmp:w { negcolor }
+\_siunitx_tmp:w { negcolour }
+\_siunitx_tmp:w { noload }
+\_siunitx_tmp:w { numaddn }
+\_siunitx_tmp:w { numcloseerr }
+\_siunitx_tmp:w { numdecimal }
+\_siunitx_tmp:w { numdigits }
+\_siunitx_tmp:w { numdiv }
+\_siunitx_tmp:w { numexp }
+\_siunitx_tmp:w { numgobble }
+\_siunitx_tmp:w { numopenerr }
+\_siunitx_tmp:w { numprod }
+\_siunitx_tmp:w { numsign }
+\_siunitx_tmp:w { obeyall }
+\_siunitx_tmp:w { obeybold }
+\_siunitx_tmp:w { obeymode }
+\_siunitx_tmp:w { obeyitalic }
+\_siunitx_tmp:w { openerr }
+\_siunitx_tmp:w { openfrac }
+\_siunitx_tmp:w { openrange }
+\_siunitx_tmp:w { padangle }
+\_siunitx_tmp:w { padnumber }
+\_siunitx_tmp:w { per }
+\_siunitx_tmp:w { prefixbase }
+\_siunitx_tmp:w { prefixproduct }
+\_siunitx_tmp:w { prefixsymbolic }
+\_siunitx_tmp:w { prespace }
+\_siunitx_tmp:w { redefsymbols }
+\_siunitx_tmp:w { repeatunits }
+\_siunitx_tmp:w { retainplus }
+\_siunitx_tmp:w { seperr }
+\_siunitx_tmp:w { sepfour }
+\_siunitx_tmp:w { sf }
+\_siunitx_tmp:w { sign }
+\_siunitx_tmp:w { slash }
+\_siunitx_tmp:w { stickyper }
+\_siunitx_tmp:w { stricarc }
+\_siunitx_tmp:w { tabalign }
+\_siunitx_tmp:w { tabalignexp }
+\_siunitx_tmp:w { tabautofit }
+\_siunitx_tmp:w { tabformat }
+\_siunitx_tmp:w { tabnumalign }
+\_siunitx_tmp:w { tabparseonly }
+\_siunitx_tmp:w { tabtextalign }
+\_siunitx_tmp:w { textOmega }
+\_siunitx_tmp:w { textcelsius }
+\_siunitx_tmp:w { textdegree }
+\_siunitx_tmp:w { textminute }
+\_siunitx_tmp:w { textmode }
+\_siunitx_tmp:w { textmu }
+\_siunitx_tmp:w { textringA }
+\_siunitx_tmp:w { textrm }
+\_siunitx_tmp:w { textsecond }
+\_siunitx_tmp:w { textsf }
+\_siunitx_tmp:w { texttt }
+\_siunitx_tmp:w { tightpm }
+\_siunitx_tmp:w { tophrase }
+\_siunitx_tmp:w { trapamigerr }
+\_siunitx_tmp:w { trapambigfrac }
+\_siunitx_tmp:w { trapambigrange }
+\_siunitx_tmp:w { unitcolor }
+\_siunitx_tmp:w { unitcolour }
+\_siunitx_tmp:w { unitmathrm }
+\_siunitx_tmp:w { unitmathsf }
+\_siunitx_tmp:w { unitmathsrm }
+\_siunitx_tmp:w { unitmathssf }
+\_siunitx_tmp:w { unitmathstt }
+\_siunitx_tmp:w { unitmathtt }
+\_siunitx_tmp:w { unitmode }
+\_siunitx_tmp:w { unitsep }
+\_siunitx_tmp:w { unitspace }
+\_siunitx_tmp:w { valuecolor }
+\_siunitx_tmp:w { valuecolour }
+\_siunitx_tmp:w { valuemathrm }
+\_siunitx_tmp:w { valuemathsf }
+\_siunitx_tmp:w { valuemathsrm }
+\_siunitx_tmp:w { valuemathssf }
+\_siunitx_tmp:w { valuemathstt }
+\_siunitx_tmp:w { valuemathtt }
+\_siunitx_tmp:w { valuemode }
+\_siunitx_tmp:w { valuesep }
+\_siunitx_tmp:w { xpace }
+\tl_new:N \l_siunitx_key_tl
\keys_define:nn { siunitx } {
unknown .code:n =
{
- \msg_error:nnx { siunitx } { unknown-option }
- { \exp_not:V \l_keys_key_tl }
+ \seq_if_in:NVTF \_c_siunitx_old_options_seq \l_keys_key_tl
+ {
+ \msg_warning:nnx { siunitx } { version-1-option }
+ { \exp_not:V \l_keys_key_tl }
+ \tl_set:Nx \_l_siunitx_key_tl
+ {
+ \keys_set:nn { siunitx }
+ {
+ \exp_not:V \l_keys_key_tl
+ \tl_if_blank:nF {#1} { = \exp_not:n {#1} }
+ }
+ }
+ \keys_set:nn { siunitx } { load-configurations = version-1 }
+ \tl_use:N \_l_siunitx_key_tl
+ }
+ {
+ \msg_error:nnx { siunitx } { unknown-option }
+ { \exp_not:V \l_keys_key_tl }
+ }
}
}
\clist_new:N \_l_siunitx_option_deactivate_clist
@@ -3113,7 +3273,7 @@
{ \_l_siunitx_number_unit_sep_tl }
}
}
- \exp_not:n { \_siunitx_unit_in:nn {#1} { } }
+ \exp_not:n { \_siunitx_unit_output:nn {#1} { } }
\bool_if:NT \_l_siunitx_create_xspace_bool
{ \exp_not:N \xspace }
}
@@ -3129,7 +3289,7 @@
\ProvideDocumentCommand \exp_not:N #1 { o }
{
\exp_not:N \IfNoValueTF {####1}
- { \exp_not:n { \_siunitx_unit_in:nn {#1} { } } }
+ { \exp_not:n { \_siunitx_unit_output:nn {#1} { } } }
{
\bool_if:NT \_l_siunitx_create_prespace_bool
{
@@ -3244,13 +3404,16 @@
}
\cs_set_protected_nopar:Npn \_siunitx_pm: { }
\cs_set_protected:Npn \_siunitx_unit_parse_options:nn #1#2 {
- \cs_if_free:cF
- { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl }
+ \tl_if_single:nT {#1}
{
- \keys_set:nv { siunitx }
+ \cs_if_free:cF
{ _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl }
- \keys_set:nn { siunitx } {#2}
- }
+ {
+ \keys_set:nv { siunitx }
+ { _l_siunitx_ \_siunitx_unit_first_token:n {#1} _options_tl }
+ \keys_set:nn { siunitx } {#2}
+ }
+ }
}
\cs_set_protected:Npn \_siunitx_unit_parse_power_before:n #1 {
\tl_set:Nx \_l_siunitx_tmpa_tl
@@ -5410,6 +5573,11 @@
The~option~file~'#1'~is~not~known~by~siunitx: \\
perhaps~it~is~spelled~incorrectly.
}
+\msg_set:nnn { siunitx } { version-1-option }
+ {
+ Version~1~option~'#1'~detected: \\
+ loading~compatibility~code.
+ }
\cs_set_protected_nopar:Npn \DeclareBinaryPrefix #1#2#3 {
\_siunitx_declare_prefix:Nnnn #1 {#2} { 2 } {#3}
}
@@ -5439,7 +5607,6 @@
\@onlypreamble \DeclareSIUnit
\@onlypreamble \DeclareSIUnitWithOptions
\cs_set_protected_nopar:Npn \SendSettingsToPgf { \_siunitx_pgf_link: }
-\@onlypreamble \SendSettingsToPgf
\NewDocumentCommand \ang { o > { \SplitArgument { 2 } { ; } } m } {
\group_begin:
\IfNoValueF {#1}