summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx.dtx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx97
1 files changed, 57 insertions, 40 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 4d189b18bbe..9530459da64 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -58,7 +58,7 @@ See http://www.latex-project.org/lppl.txt
\endpreamble
\postamble
-Copyright (C) 2008-2009 by
+Copyright (C) 2008-2010 by
Joseph Wright <joseph.wright@morningstar2.co.uk>
It may be distributed and/or modified under the conditions of
@@ -2724,20 +2724,6 @@ This work consists of the file siunitx.dtx
% \num[numaddn=\numpi,mode=text]{4\numpi e-7}
%\end{LaTeXexample}
%
-%\subsection{Entire document in sans serif font}
-% If your entire document is not in a Roman font, using
-% the font detection system is not the most efficient method
-% for setting the \currpkg output. Instead, the \opt{mathrm}
-% and \opt{textrm} package options can be redefined.
-%\begin{LaTeXexample}
-% \sffamily
-% Some text \\
-% \sisetup{obeyfamily=false,mathrm=mathsf,textrm=sffamily}
-% \num{1e2} \\
-% \SI{3}{\newton}
-% \[ \SI{4e5}{\pascal} \]
-%\end{LaTeXexample}
-%
%\subsection{Effects of emulation}
% The package has been designed so that almost everything can be set
% using the options. In the emulation code, some internal macros are
@@ -3322,7 +3308,7 @@ author.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{siunitx}
- [2009/12/25 v1.3g A comprehensive (SI) units package]
+ [2010/01/16 v1.4 A comprehensive (SI) units package]
% \end{macrocode}
% The package requires \eTeX, so the usual test is made.
% \begin{macrocode}
@@ -5635,6 +5621,37 @@ author.
% \end{macrocode}
%\end{macro}
%\end{macro}
+%
+%\begin{macro}{\si@fam@detect@default}
+%\changes{v1.4}{2010/01/16}{Detect entire document in non-serif font}
+% Some packages (for example \pkg{cmbright}) and classes
+% (for example \pkg{beamer}) set the default family to be something
+% other than serif family. A one-off detection will make life easier
+% all round.
+% \begin{macrocode}
+\newcommand*\si@fam@detect@default{%
+ \edef\si@tempa{\familydefault}%
+ \edef\si@tempb{\sfdefault}%
+ \ifx\si@tempa\si@tempb
+ \sisetup
+ {
+ mathsrm = mathsf,
+ textrm = sffamily
+ }%
+ \fi
+ \edef\si@tempb{\ttdefault}%
+ \ifx\si@tempa\si@tempb
+ \sisetup
+ {
+ mathsrm = mathtt,
+ textrm = ttfamily
+ }%
+ \fi
+}
+\AtBeginDocument{\si@fam@detect@default}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\si@fam@ifbtext}
%\begin{macro}{\si@fam@ifbmaths}
%\darg{code}
@@ -10847,7 +10864,7 @@ author.
% powers.
% \begin{macrocode}
\ProvidesFile{si-prefix.cfg}
- [2009/12/25 v1.3g siunitx: SI Multiple prefixes]
+ [2010/01/16 v1.4 siunitx: SI Multiple prefixes]
\newprefix{\yocto}{-24}{y}
\newprefix{\zepto}{-21}{z}
\newprefix{\atto}{-18}{a}
@@ -10951,7 +10968,7 @@ author.
% is an awkward one, but here the UK standard is used.
% \begin{macrocode}
\ProvidesFile{si-named.cfg}
- [2009/12/25 v1.3g siunitx: SI Named units]
+ [2010/01/16 v1.4 siunitx: SI Named units]
\newunit{\becquerel}{Bq}
\newunit{\coulomb}{C}
\newunit{\farad}{F}
@@ -11050,7 +11067,7 @@ author.
% This requires \file{si-prefix.cfg} and \file{si-named.cfg}.
% \begin{macrocode}
\ProvidesFile{si-prefixed.cfg}
- [2009/12/25 v1.3g siunitx: SI Prefixed units]
+ [2010/01/16 v1.4 siunitx: SI Prefixed units]
\requiresiconfigs{prefix,named,accepted,physical}
% \end{macrocode}
%\begin{macro}{\picometre}
@@ -11348,7 +11365,7 @@ author.
% block for the appropriate option. First currents.
% \begin{macrocode}
\ProvidesFile{si-abbr.cfg}
- [2009/12/25 v1.3g siunitx: Abbreviated units]
+ [2010/01/16 v1.4 siunitx: Abbreviated units]
\requiresiconfigs{prefix,named,accepted,physical}
\newunit{\pA}{\pico\ampere}
\newunit{\nA}{\nano\ampere}
@@ -11571,7 +11588,7 @@ author.
% These are defined here, although some are in very general use.
% \begin{macrocode}
\ProvidesFile{si-addn.cfg}
- [2009/12/25 v1.3g siunitx: SI Additional units]
+ [2010/01/16 v1.4 siunitx: SI Additional units]
\provideunit{\angstrom}{\si@sym@ringA}
\AtBeginDocument{%
\ifdefined\Saveangstrom
@@ -11626,7 +11643,7 @@ author.
%\begin{macro}{\bel}
% \begin{macrocode}
\ProvidesFile{si-accepted.cfg}
- [2009/12/25 v1.3g siunitx: SI Accepted units]
+ [2010/01/16 v1.4 siunitx: SI Accepted units]
\newunit{\minute}{min}
\newunit{\hour}{h}
\newunit{\Day}{d}
@@ -11684,7 +11701,7 @@ author.
% for a negative kern does make things a bit complicated.
% \begin{macrocode}
\ProvidesFile{si-physical.cfg}
- [2009/12/25 v1.3g siunitx: SI Physically-measured units]
+ [2010/01/16 v1.4 siunitx: SI Physically-measured units]
\newcommand*{\si@eVspacea}{\text{\kern-\si@eVcorra}}%
\newcommand*{\si@eVspaceb}{\text{\kern-\si@eVcorrb}}%
\newunit{\electronvolt}{e\protect\si@eVspacea V\protect%
@@ -11720,7 +11737,7 @@ author.
% own definitions.
% \begin{macrocode}
\ProvidesFile{si-synchem.cfg}
- [2009/12/25 v1.3g siunitx: Units for synthetic chemists]
+ [2010/01/16 v1.4 siunitx: Units for synthetic chemists]
\requiresiconfigs{prefix}
\newunit{\mmHg}{mmHg}
\newunit{\molar}{\mole\per\cubic\deci\metre}
@@ -11741,7 +11758,7 @@ author.
% Some units inspired by \pkg{hepunits}.
% \begin{macrocode}
\ProvidesFile{si-hep.cfg}
- [2009/12/25 v1.3g siunitx: Units for high-energy physics]
+ [2010/01/16 v1.4 siunitx: Units for high-energy physics]
\requiresiconfigs{prefix,named}
% \end{macrocode}
%\begin{macro}{\micron}
@@ -11823,7 +11840,7 @@ author.
% For astronomy, the \cs{parsec} unit is needed.
% \begin{macrocode}
\ProvidesFile{si-astro.cfg}
- [2009/12/25 v1.3g siunitx: Units for astronomy]
+ [2010/01/16 v1.4 siunitx: Units for astronomy]
\newunit{\parsec}{pc}
\newunit{\lightyear}{ly}
% \end{macrocode}
@@ -11838,7 +11855,7 @@ author.
% The unit \cs{gon} is useful here.
% \begin{macrocode}
\ProvidesFile{si-geophys.cfg}
- [2009/12/25 v1.3g siunitx: Units for astronomy]
+ [2010/01/16 v1.4 siunitx: Units for astronomy]
\newunit{\gon}{gon}
% \end{macrocode}
%\end{macro}
@@ -11853,7 +11870,7 @@ author.
% For astronomy, the \cs{parsec} unit is needed.
% \begin{macrocode}
\ProvidesFile{si-chemeng.cfg}
- [2009/12/25 v1.3g siunitx: Units for chemical engineering]
+ [2010/01/16 v1.4 siunitx: Units for chemical engineering]
\newunit{\gmol}{g\text{-}mol}
\newunit{\kgmol}{kg\text{-}mol}
\newunit{\lbmol}{lb\text{-}mol}
@@ -11878,7 +11895,7 @@ author.
% \SIunits. First, the binary prefixes.
% \begin{macrocode}
\ProvidesFile{si-binary.cfg}
- [2009/12/25 v1.3g siunitx: Binary units]
+ [2010/01/16 v1.4 siunitx: Binary units]
\newprefix[binary]{\kibi}{10}{Ki}
\newprefix[binary]{\mebi}{20}{Mi}
\newprefix[binary]{\gibi}{30}{Gi}
@@ -11921,7 +11938,7 @@ author.
% default values.\footnote{The package author is in the UK.}
% \begin{macrocode}
\ProvidesFile{si-UK.cfg}
- [2009/12/25 v1.3g siunitx: UK locale]
+ [2010/01/16 v1.4 siunitx: UK locale]
\sisetup{
unitsep=thin,
expproduct=times,
@@ -11939,7 +11956,7 @@ author.
% The same as for the UK.
% \begin{macrocode}
\ProvidesFile{si-USA.cfg}
- [2009/12/25 v1.3g siunitx: USA locale]
+ [2010/01/16 v1.4 siunitx: USA locale]
\sisetup{
unitsep=thin,
expproduct=times,
@@ -11957,7 +11974,7 @@ author.
% Germany, hopefully.
% \begin{macrocode}
\ProvidesFile{si-DE.cfg}
- [2009/12/25 v1.3g siunitx: Germany locale]
+ [2010/01/16 v1.4 siunitx: Germany locale]
\sisetup{
unitsep=cdot,
valuesep=thin,
@@ -11975,7 +11992,7 @@ author.
% Design decisions taken from the same section of \SIstyle.
% \begin{macrocode}
\ProvidesFile{si-ZA.cfg}
- [2009/12/25 v1.3g siunitx: South Africa locale]
+ [2010/01/16 v1.4 siunitx: South Africa locale]
\sisetup{
unitsep=cdot,
valuesep=thin,
@@ -12008,7 +12025,7 @@ author.
% \units for conflicting options, so users probably expect none.
% \begin{macrocode}
\ProvidesFile{si-units.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of units]
+ [2010/01/16 v1.4 siunitx: Emulation of units]
\si@emulating{units}{1998/08/04 v0.9b}
\si@ifloaded{SIunits}
{\si@emclash{units}{SIunits}\endinput}{}
@@ -12078,7 +12095,7 @@ author.
% clash.
% \begin{macrocode}
\ProvidesFile{si-unitsdef.cfg}
- [2009/12/25 v1.3g siunitx:
+ [2010/01/16 v1.4 siunitx:
Emulation of unitsdef]
\si@emulating{unitsdef}{2005/01/04 v0.2}
\si@ifloaded{SIunits}
@@ -12527,7 +12544,7 @@ author.
% the macros in \SIstyle as given in the manual for that package.
% \begin{macrocode}
\ProvidesFile{si-sistyle.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of
+ [2010/01/16 v1.4 siunitx: Emulation of
SIstyle]
\si@emulating{sistyle}{2006/12/20 v2.3}
\sisetup{%
@@ -12711,7 +12728,7 @@ author.
% \SIunits emulation starts in much the same way.
% \begin{macrocode}
\ProvidesFile{si-SIunits.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of
+ [2010/01/16 v1.4 siunitx: Emulation of
SIunits]
\si@emulating{SIunits}{2007/12/02 v1.36}
\sisetup{
@@ -13270,7 +13287,7 @@ author.
% which are not really to be encouraged.
% \begin{macrocode}
\ProvidesFile{si-hepunits.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of
+ [2010/01/16 v1.4 siunitx: Emulation of
hepunits]
\si@emulating{hepunits}{2007/09/27}
\requiresiconfigs{SIunits,accepted,prefix,hep}
@@ -13425,7 +13442,7 @@ author.
% a little emulation and a few macros needed.
% \begin{macrocode}
\ProvidesFile{si-fancynum.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of
+ [2010/01/16 v1.4 siunitx: Emulation of
fancynum]
\si@emulating{fancynum}{2000/08/08 0.92}
\sisetup{decimalsymbol=cdot,digitsep=comma}
@@ -13487,7 +13504,7 @@ author.
% test is needed.
% \begin{macrocode}
\ProvidesFile{si-fancyunits.cfg}
- [2009/12/25 v1.3g siunitx: Emulation of
+ [2010/01/16 v1.4 siunitx: Emulation of
fancyunits]
\si@emulating{fancyunits}{2007/02/01 v1.0.1}
\si@ifloaded{SIunits}