diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-09 21:37:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-09 21:37:06 +0000 |
commit | deab5d4372d55f8f501872dba6a5a5d8e3b5e67b (patch) | |
tree | 9488abd0282d5ae3ef6c579287f81dd3d913120b /Master/texmf-dist/source | |
parent | 358774b44f57eabd62294dec13884e8b7bd2cc1f (diff) |
siunitx update (9jul10)
git-svn-id: svn://tug.org/texlive/trunk@19308 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 122 |
1 files changed, 107 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 643f65308e1..7952e315abe 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -444,6 +444,8 @@ This work consists of the file siunitx.dtx % \opt{input-symbols} are always printed in math mode} %\changes{v2.0k}{2010/07/04}{Fix for \pkg{babel} French settings with % \cs{fg} in tabular material} +%\changes{v2.0l}{2010/07/07}{Further adjustments to \pkg{babel} support} +%\changes{v2.0m}{2010/07/09}{Re-introduce \opt{locale} option} % %\begin{abstract} % Typesetting values with units requires care to ensure that the @@ -3066,6 +3068,18 @@ This work consists of the file siunitx.dtx % %\subsection{Other options} % +%\DescribeOption{locale} +% \pkg{siunitx} allows the user to switch between the typographic +% conventions of different (geographical) areas by using locales. +% Currently, the package is supplied with configurations for locales +% \opt{UK}, \opt{US}, \opt{DE} (Germany), \opt{FR} (French) and \opt{ZA} +% (South Africa). The \opt{locale} option is used to switch to a +% particular locale. +%\begin{LaTeXdemo} +% \SI{1.234}{\metre}\\ +% \SI[locale = DE]{6.789}{\metre} +%\end{LaTeXdemo} +% %\DescribeOption{strict} % Some users will want to stick closely to the official rules for % typesetting units. This could be made complicated if the options @@ -3458,6 +3472,18 @@ This work consists of the file siunitx.dtx % \end{table} %\end{LaTeXdemo} % +%\subsection{Associating a locale with a \pkg{babel} language} +% +% It is possible to instruct the \pkg{babel} package to switch +% to a particular \pkg{siunitx} locale when changing language. This +% can be done using the \pkg{babel} \cs{extras\meta{language}} +% system. For example, to associate the \texttt{DE} locale with +% the \texttt{german} \pkg{babel} language, the appropriate +% code would be +%\begin{LaTeXdemo}[code only] +% \addto\extrasgerman{\sisetup{locale = DE}} +%\end{LaTeXdemo} +% %\section{Information for those upgrading from version 1} % % The key--value control system of \pkg{siunitx} has been completely @@ -3471,10 +3497,9 @@ This work consists of the file siunitx.dtx % Many of the options from version 1 map to similar ones in version 2 % (\cref{tab:opt:map}). The correspondence often includes a syntax % change: consult details of the new options for the correct syntax for -% the new options. In some places the new behaviour is fundamentally -% different to version 1, and as a result some options from version 1 -% are simply ignored by the new code. These cases are not included in -% the table. +% the new options. In some cases, the new approach is different to the +% older one, and in these cases the most appropriate option new has been +% listed in the table. %\begin{center} % \tablecaption{Mapping of version 1 options to version 2.} % \label{tab:opt:map} @@ -3508,6 +3533,14 @@ This work consists of the file siunitx.dtx % closefrac & close-bracket \\ % closerange & close-bracket \\ % colour & color \\ +% colorall & color \\ +% colourall & color \\ +% colorunits & unit-color \\ +% colorneg & negative-color \\ +% colourneg & negative-color \\ +% colourunits & unit-color \\ +% colorvalues & value-color \\ +% colourvalues & value-color \\ % decimalsymbol & output-decimal-marker \\ % detectdisplay & detect-display-math \\ % digitsep & group-separator \\ @@ -3520,6 +3553,7 @@ This work consists of the file siunitx.dtx % fixsf & round-mode \\ % fraction & fraction-function \\ % inlinebold & detect-inline-weight \\ +% locale & locale \\ % mathOmega & math-ohm \\ % mathcelsius & math-celsius \\ % mathdegree & math-degree \\ @@ -3627,7 +3661,26 @@ This work consists of the file siunitx.dtx % valuesep & number-unit-separator \\ % xspace & use-xparse \\ % \end{xtabular} -%\end{center} +%\end{center} +% A small number of the options from version 1 are used unchanged in +% version 2, for example the \opt{mode} setting. These are listed above +% but require no action on the part of the user. There are also a +% few options which are no longer used at all, and are therefore ignored +% by the current code. +% +% Loading configuration files has been completely changed, and this +% means that the options \opt{alsoload}, \opt{load} and \opt{noload} are +% ignored by version 2. In the same way the options \opt{debug} and +% \opt{log} are not used by the current release of \pkg{siunitx}, as +% this information is usually only needed by the package author. +% Emulation of older packages is no longer offered (it was intended +% to help with the transition form earlier packages), and so the +% \opt{emulate} option no longer applies. +% +% A few options currently do not apply as the development of version 2 +% did not allow time for them to be re-implemented, but they will be +% returned to the package for version 2.1. This applies to the +% \opt{angformat} and \opt{tablexpalign} options. % %\section{Correct application of (SI) units} % @@ -3975,7 +4028,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2010/07/04} {2.0k} +\ProvidesExplPackage {siunitx} {2010/07/09} {2.0m} {A comprehensive (SI) units package} % \end{macrocode} % @@ -4169,7 +4222,6 @@ This work consists of the file siunitx.dtx \siunitx_tmp:w { fixsf } \siunitx_tmp:w { fraction } \siunitx_tmp:w { inlinebold } -\siunitx_tmp:w { locale } \siunitx_tmp:w { loctolang } \siunitx_tmp:w { log } \siunitx_tmp:w { load } @@ -4230,7 +4282,7 @@ This work consists of the file siunitx.dtx \siunitx_tmp:w { sign } \siunitx_tmp:w { slash } \siunitx_tmp:w { stickyper } -\siunitx_tmp:w { stricarc } +\siunitx_tmp:w { strictarc } \siunitx_tmp:w { tabalign } \siunitx_tmp:w { tabalignexp } \siunitx_tmp:w { tabautofit } @@ -9012,9 +9064,10 @@ This work consists of the file siunitx.dtx % a table cell. % \begin{macrocode} \AtBeginDocument { - \tl_map_function:nN { \bar \color \fg \ng \pm } + \tl_map_function:nN { \bar \color \ng \pm } \siunitx_protect_symbols:N } +\tl_put_right:Nn \document { \siunitx_protect_symbols:N \fg } \cs_new_protected_nopar:Npn \siunitx_protect_symbols:N #1 { \cs_if_exist:NT #1 { @@ -13107,8 +13160,48 @@ This work consists of the file siunitx.dtx %\end{macro} %\end{macro} % - - +%\subsection{Locales} +% +% The basics for defining locales are easy: these are just meta keys. +% The US locale is simply an alias for the UK one, which is the default. +% \begin{macrocode} +\keys_define:nn { siunitx } { + locale .choice:, + locale / + DE .meta:n = + { + exponent-product = \cdot , + inter-unit-separator = { \, } , + output-decimal-marker = { , } , + }, + locale / + FR .meta:n = + { + exponent-product = \times , + inter-unit-separator = { \, } , + output-decimal-marker = { , } , + }, + locale / + UK .meta:n = + { + exponent-product = \times , + inter-unit-separator = \, , + output-decimal-marker = . , + }, + locale / + US .meta:n = { locale = UK }, + locale / + USA .meta:n = { locale = UK }, + locale / + ZA .meta:n = + { + exponent-product = \times , + inter-unit-separator = \cdot , + output-decimal-marker = { , } , + }, +} +% \end{macrocode} +% %\subsection{Localisation} % % Localisation makes use of the \pkg{translator} package. This only @@ -13204,7 +13297,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2010/07/04} {2.0k} +\ProvidesExplFile {siunitx-version-1.cfg} {2010/07/09} {2.0m} {siunitx: Version 1 settings} % \end{macrocode} % @@ -13413,7 +13506,6 @@ This work consists of the file siunitx.dtx per-mode = symbol-or-fraction }, inlinebold .meta:n = { detect-inline-weight = #1 }, - locale .code:n = , log .code:n = , load .code:n = , loctolang .code:n = , @@ -14194,7 +14286,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/07/04} {2.0k} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2010/07/09} {2.0m} {siunitx: Abbreviated units} % \end{macrocode} % @@ -14402,7 +14494,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2010/07/04} {2.0k} +\ProvidesExplFile {siunitx-binary.cfg} {2010/07/09} {2.0m} {siunitx: Binary units} % \end{macrocode} % |