summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-01 01:02:08 +0000
committerKarl Berry <karl@freefriends.org>2008-07-01 01:02:08 +0000
commit3162035fb38abf635f76f77824771f7d052ce335 (patch)
tree3f9dcb8f3828d39c3d072a54ab0bf9bd17e7cba3 /Master/texmf-dist/tex/latex/siunitx
parente1848a4a89ee2b1e434745fb3f820583d84bee95 (diff)
siunitx update (25jun08)
git-svn-id: svn://tug.org/texlive/trunk@9132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty63
1 files changed, 46 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index ebf7bac4239..e5e5673ee79 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -14,11 +14,11 @@
%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\newcommand*{\si@svn@ver}{v1.0b}
+\newcommand*{\si@svn@ver}{v1.0d}
\def\si@svn@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
\newcommand*{\si@svn@version}{%
#5/#6/#7\space\si@svn@ver\space}}
-\si@svn@id $Id: siunitx.dtx 88 2008-06-23 08:25:52Z joseph $
+\si@svn@id $Id: siunitx.dtx 97 2008-06-25 11:11:46Z joseph $
\ProvidesPackage{siunitx}
[\si@svn@version A comprehensive (SI) units package]
\begingroup
@@ -805,12 +805,16 @@
\DeclareFontSubstitution{TS1}{cmr}{m}{n}
\DeclareTextSymbol{\si@textmu}{TS1}{181}
\DeclareTextSymbolDefault{\si@textmu}{TS1}
-\DeclareFontFamily{OML}{eur}{\skewchar\font127}
-\DeclareFontShape{OML}{eur}{m}{n}%
- {<5> <6> <7> <8> <9> gen * eurm %
- <10><10.95><12><14.4><17.28><20.74><24.88>eurm10}{}
-\DeclareSymbolFont{greek}{OML}{eur}{m}{n}
-\DeclareMathSymbol{\si@mathsmu}{\mathord}{greek}{"16}
+\@ifpackageloaded{upgreek}
+ {}
+ {\DeclareFontFamily{OML}{eur}{\skewchar\font'177}
+ \DeclareFontShape{OML}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}}
+\AtBeginDocument{
+ \@ifpackageloaded{upgreek}
+ {\let\si@mathsmu\upmu}
+ {\DeclareSymbolFont{si@greek}{OML}{eur}{m}{n}
+ \DeclareMathSymbol{\si@mathsmu}{\mathord}{si@greek}{"16}}}
\si@opt@cmdkeys{textdegree,mathsdegree,textminute,mathsminute,
textsecond,mathssecond}
\si@opt@key{mathdegree}{\sisetup{mathsdegree=#1}}
@@ -947,7 +951,6 @@
\fi}{}
\@ifpackageloaded{upgreek}
{\si@log@debug{Redefining symbols using upgreek}%
- \renewcommand*{\si@mathsmu}{\upmu}%
\renewcommand*{\si@mathsOmega}{\Upomega}}{}
\fi}
\newcommand*{\si@frc@frac}[2]{%
@@ -3186,17 +3189,43 @@
\catcode`\~=\active
\catcode`\.=\active
\gdef\si@unt@out#1{%
+ \si@temptoks{#1}%
+ \si@unt@fullstop
+ \def.{\ensuremath{\si@unitsep}}%
+ \def~{\ensuremath{\si@unitspace}}%
+ \expandafter\protected@edef\expandafter\si@tempa
+ \expandafter{\the\si@temptoks}%
\begingroup
\si@unt@nonlatin
\makeatletter
- \catcode`\~=\active
- \catcode`\.=\active
- \def~{\ensuremath{\si@unitspace}}%
- \def.{\ensuremath{\si@unitsep}}%
\endlinechar\m@ne
- \si@out{\scantokens{#1}}%
+ \expandafter\si@out\expandafter{%
+ \expandafter\scantokens\expandafter{\si@tempa}}%
\endgroup}
\endgroup
+\begingroup
+ \catcode`\.=\active
+ \catcode`\&=12\relax
+ \begingroup
+ \lccode`\.=`\.\relax
+ \lccode`\&=`\.\relax
+ \lowercase{\endgroup
+ \gdef\si@unt@fullstop{%
+ \si@temptoks\expandafter{\expandafter}\expandafter
+ \si@unt@stp\the\si@temptoks&\@nil}
+ \gdef\si@unt@stp#1&#2\@nil{%
+ \edef\si@tempa{\the\si@temptoks}%
+ \ifx\si@tempa\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\si@temptoks{#1}}
+ {\si@temptoks\expandafter{\the\si@temptoks.#1}}%
+ \si@ifmtarg{#2}
+ {}
+ {\si@unt@stp#2\@nil}}}
+\endgroup
\newcommand*{\si@unt@nonlatin}{}
\ifdefined\XeTeXrevision
\renewcommand*{\si@unt@nonlatin}{%
@@ -3313,11 +3342,11 @@
\newcommand*{\addtolocale}[2]{%
\si@addtocsname{si@loc@#1@extra}{#2}}
\begingroup
- \catcode`\^=\active\relax
- \catcode`\-=\active\relax
+ \catcode`\^=\active
+ \catcode`\-=\active
\gdef\si@out#1{%
\begingroup
- \catcode`\^=\active\relax
+ \catcode`\^=\active
\makeatletter
\endlinechar\m@ne
\ifsi@fam@set\else