summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-17 22:40:08 +0000
committerKarl Berry <karl@freefriends.org>2011-04-17 22:40:08 +0000
commit40e44782519393652e58da7648eab79685783805 (patch)
tree90169fede512a4b033599b0e393779c7d1e45fe6 /Master/texmf-dist
parent28e4833279c49989c8090e430ae116426000128b (diff)
siunitx (17apr11)
git-svn-id: svn://tug.org/texlive/trunk@22108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/README1
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin544100 -> 546419 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx302
-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.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty68
6 files changed, 218 insertions, 157 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/README b/Master/texmf-dist/doc/latex/siunitx/README
index b733662a20d..119870e638a 100644
--- a/Master/texmf-dist/doc/latex/siunitx/README
+++ b/Master/texmf-dist/doc/latex/siunitx/README
@@ -52,6 +52,7 @@ need the packages:
- cancel
- caption
- cleveref
+ - colortbl
- csquotes
- datatool
- helvet
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index 092dbf74abc..b082cb276eb 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 640c97b8c57..5db38c5667b 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -57,6 +57,7 @@ need the packages:
- cancel
- caption
- cleveref
+ - colortbl
- csquotes
- datatool
- helvet
@@ -142,8 +143,10 @@ This work consists of the file siunitx.dtx
%<*driver>
\documentclass[german,french,english,UKenglish]{l3doc}
+\usepackage[table]{xcolor}
+
\usepackage{amsmath,babel,booktabs,cancel,caption,colortbl,csquotes}
-\usepackage{datatool,helvet,multirow,pgfplots,siunitx,xcolor,xtab}
+\usepackage{datatool,helvet,multirow,pgfplots,siunitx,xtab}
\IfFileExists{xfrac.sty}
{\usepackage{xfrac}}
{%
@@ -158,6 +161,20 @@ This work consists of the file siunitx.dtx
\usepackage[final]{listings}
\usepackage[osf]{mathpazo}
+\crefformat{section}{#2Section~#1#3}
+\Crefformat{section}{#2Section~#1#3}
+\crefformat{subsection}{#2Section~#1#3}
+\Crefformat{subsection}{#2Section~#1#3}
+\crefformat{figure}{#2Figure~#1#3}
+\Crefformat{figure}{#2Figure~#1#3}
+\crefformat{table}{#2Table~#1#3}
+\Crefformat{table}{#2Table~#1#3}
+\crefrangeformat{table}{#3Tables~#1#4 to~#5#2#6}
+\Crefrangeformat{table}{#3Tables~#1#4 to~#5#2#6}
+\crefmultiformat{table}{#2Tables~#1#3}{ and~#2#1#3}{, #2#1#3}{, and~#2#1#3}
+\Crefmultiformat{table}{#2Tables~#1#3}{ and~#2#1#3}{, #2#1#3}{, and~#2#1#3}
+
+
% Silence annoying fp package messages
\FPmessagesfalse
\pgfplotsset{compat = newest}
@@ -399,7 +416,11 @@ This work consists of the file siunitx.dtx
% }^^A
%}
%\author{^^A
-% Joseph Wright\thanks{E-mail: joseph.wright@morningstar2.co.uk}^^A
+% Joseph Wright\thanks
+% {^^A
+% E-mail: \href{mailto:joseph.wright@morningstar2.co.uk}
+% {\texttt{joseph.wright@morningstar2.co.uk}}^^A
+% }^^A
%}
%\date{Released \filedate}
%
@@ -452,7 +473,7 @@ This work consists of the file siunitx.dtx
%\changes{v2.0v}{2010/09/26}{Internal changes reflecting \pkg{expl3}
% updates}
%\changes{v2.0w}{2010/09/29}{Deal with internal function used by
-% REV\TeX\ in tables}
+% REV\TeX{} in tables}
%\changes{v2.0x}{2010/10/05}{Fix bug when detecting single prefixes
% and converting prefixes to numbers}
%\changes{v2.1a}{2010/11/05}{Ensure that output of list separators is
@@ -494,6 +515,16 @@ This work consists of the file siunitx.dtx
% contain comparators fixed}
%\changes{v2.1p}{2011/04/04}{Poor position of comparators in
% numbers fixed}
+%\changes{v2.2a}{2011/04/15}{Fix issue with \texttt{*} tokens in
+% tabular preambles}
+%\changes{v2.2a}{2011/04/15}{Expand macros with arguments correctly
+% in tables}
+%\changes{v2.2a}{2011/04/16}{Group digits for input containing symbolic
+% entries}
+%\changes{v2.2a}{2011/04/16}{Insert tokens correctly when last tabular cell
+% does not end \cs{\\}}
+%\changes{v2.2a}{2011/04/16}{Fix bug with literal units and auto-insertion
+% of \num{1} when \opt{per-mode} is \opt{symbol}}
%
%\begin{abstract}
% Physical quantities have both numbers and units, and each physical
@@ -528,7 +559,7 @@ This work consists of the file siunitx.dtx
% conventions for correctly displaying both numbers and units exist to
% ensure that no loss of meaning occurs in printed matter.
%
-% \pkg{siunitx} aims to provide a unified method for \LaTeX\ users to
+% \pkg{siunitx} aims to provide a unified method for \LaTeX{} users to
% typeset numbers and units correctly and easily. The design
% philosophy of \pkg{siunitx} is to follow the agreed rules by
% default, but to allow variation through option settings. In this way,
@@ -553,7 +584,7 @@ This work consists of the file siunitx.dtx
% zip files. Suitable versions are available in MiK\TeX~2.9 and
% \TeX~Live 2010 (updating the relevant packages online may be
% necessary). \LaTeX3, and so \pkg{siunitx}, requires the \eTeX\
-% extensions: these are available on all modern \TeX\ systems.
+% extensions: these are available on all modern \TeX{} systems.
%
% Typesetting the documentation requires a number of packages in
% addition to those needed to use the package. This is mainly
@@ -565,6 +596,7 @@ This work consists of the file siunitx.dtx
% \item \pkg{cancel}
% \item \pkg{caption}
% \item \pkg{cleveref}
+% \item \pkg{colortbl}
% \item \pkg{csquotes}
% \item \pkg{helvet}
% \item \pkg{mathpazo}
@@ -593,7 +625,8 @@ This work consists of the file siunitx.dtx
% \item \cs{tablenum}\oarg{options}\marg{number}
%\end{itemize}
% plus the \texttt{S} and \texttt{s} column types for decimal
-% alignments and units in tables. These macros are designed for
+% alignments and units in tabular environments. These user macros and
+% column types are designed for
% typesetting numbers and units with control of appearance and with
% intelligent processing.
%
@@ -607,7 +640,7 @@ This work consists of the file siunitx.dtx
%\end{LaTeXdemo}
%
% The unit system can interpret units given as text to be used directly
-% or as macro-based units. In the later case, different formatting is
+% or as macro-based units. In the latter case, different formatting is
% possible.
%\begin{LaTeXdemo}
% \si{kg.m.s^{-1}} \\
@@ -634,7 +667,7 @@ This work consists of the file siunitx.dtx
%
%\subsection{Loading the package}
%
-% The package should be loaded in the usual \LaTeXe\ way.
+% The package should be loaded in the usual \LaTeXe{} way.
%\begin{LaTeXdemo}[code only]
% \usepackage{siunitx}
%\end{LaTeXdemo}
@@ -896,7 +929,7 @@ This work consists of the file siunitx.dtx
% within the SI (\cref{tab:unit:physical}, \cite{SI:4.1.T7}).
% There are also a set of non-SI units which are used in certain
% defined circumstances (\cref{tab:unit:other}), although they are
-% not necessarily official sanctioned \cite{SI:4.1.T8}.
+% not necessarily officially sanctioned \cite{SI:4.1.T8}.
%\begin{table}
% \caption{Non-SI units accepted for use with the
% International System of Units.}
@@ -1207,7 +1240,7 @@ This work consists of the file siunitx.dtx
% maintain the alignment of the numerical data
% (\cref{tab:S:extras}). If the material could be mistaken for
% part of a number, it should be protected by braces. The use of
-% \cs{color} in a table cell will also be detected an will override any
+% \cs{color} in a table cell will also be detected and will override any
% general colour applied by \pkg{siunitx}.
%\begin{LaTeXdemo}[code and float]
% \begin{table}
@@ -1237,7 +1270,7 @@ This work consists of the file siunitx.dtx
% the argument of \cs{multicolumn} or
% \cs{multirow}.\footnote{Provided by the \pkg{multirow} package} The
% \cs{tablenum} function is available to achieve alignment in these
-% situations: this is in effect a macro version of the \texttt{S} macro
+% situations: this is, in effect, a macro version of the \texttt{S} macro
% (\cref{tab:tablenum}).
%\begin{LaTeXdemo}[code and float]
% \begin{table}
@@ -1270,7 +1303,7 @@ This work consists of the file siunitx.dtx
% \end{table}
%\end{LaTeXdemo}
%
-% As a complement to the \texttt{S} column, \pkg{siunitx} also provides
+% As a complement to the \texttt{S} column type, \pkg{siunitx} also provides
% a second column type, \texttt{s}. This is intended for producing
% columns of units. This allows both macro-based and explicit units to
% be printed easily (\cref{tab:s:demo}).
@@ -1295,7 +1328,7 @@ This work consists of the file siunitx.dtx
% column cannot validate the input. \emph{Everything} in an \texttt{s}
% column is therefore passed to the \cs{si} macro for processing. To
% prevent this, you have to use \cs{multicolumn}, as is shown in
-% \cref{tab:s:processing}. Notice that the braces do not prevent
+% \cref{tab:s:processing}. Notice that braces alone do not prevent
% processing and colouring of the cell contents.
%\begin{LaTeXdemo}[code and float]
% \begin{table}
@@ -1314,7 +1347,9 @@ This work consists of the file siunitx.dtx
% \end{table}
%\end{LaTeXdemo}
%
-%\section{The key--value control system}
+%\section{Comprehensive details of package control options}
+%
+%\subsection{The key--value control system}
%
%\DescribeMacro{\sisetup}
% The behaviour of the \pkg{siunitx} package is controlled by a
@@ -1462,11 +1497,12 @@ This work consists of the file siunitx.dtx
% \[ y = \SI{3}{\metre\second\mole} \]
%\end{LaTeXdemo}
%
-%\subsection{Output font families}
+%\subsection{Font settings}
%
% The relationship between font family detected and font family used
% for output is not fixed. The font detected by the package in the
-% surrounding material does not have to match that used for output.
+% surrounding material does not have to match that used for
+% output (\cref{tab:opt:font:set}).
%
%\begin{table}
% \centering
@@ -1531,8 +1567,8 @@ This work consists of the file siunitx.dtx
% option. When no colour is given, printing follows the surrounding
% text. In contrast, when a specific colour is given, it is used
% irrespective of the surroundings. As there are a number of different
-% colour models available, it is left to to user to load \pkg{color} or
-% a more powerful colour package.
+% colour models available, it is left to user to load \pkg{color} or
+% a more powerful colour package such as \pkg{xcolor}.
%\begin{LaTeXdemo}
% \color{red}
% Some text \\
@@ -1669,7 +1705,7 @@ This work consists of the file siunitx.dtx
% and off. The option is made available for two reasons. First, if
% all of the numbers in a document are to be reproduced \enquote{as
% given}, turning off the parser will represent a significant saving in
-% processing required. Second, it allows the use of arbitrary \TeX\
+% processing required. Second, it allows the use of arbitrary \TeX{}
% code in numbers. If the parser is turned off, the input will be
% printed in math mode (requiring \cs{text} to protect any text
% in the number).
@@ -1914,6 +1950,7 @@ This work consists of the file siunitx.dtx
%\end{table}
%
%\DescribeOption{group-digits}
+%\changes{v2.2a}{2011/04/15}{Add missing default for \opt{group-digits} option}
%\DescribeOption{group-decimal-digits}
%\DescribeOption{group-integer-digits}
%\DescribeOption{group-four-digits}
@@ -2085,55 +2122,6 @@ This work consists of the file siunitx.dtx
% \num[tight-spacing = true]{1 \pm 2i e3}
%\end{LaTeXdemo}
%
-% Lists and ranges of numbers have a small number of specialised
-% options, which apply on to these more unusual input forms
-% (\cref{tab:opt:num:list}).
-%
-%\begin{table}
-% \centering
-% \caption{Output options for lists and ranges of numbers.}
-% \label{tab:opt:num:list}
-% \begin{tabular}{>{\ttfamily}ll>{\ttfamily}l}
-% \toprule
-% \multicolumn{1}{l}{Option name} &
-% Type &
-% \multicolumn{1}{l}{Default} \\
-% \midrule
-% list-final-separator & Literal & \verb*= and = \\
-% list-separator & Literal & \verb*=, = \\
-% range-phrase & Literal & \verb*= to = \\
-% \bottomrule
-% \end{tabular}
-%\end{table}
-%
-%\DescribeOption{list-final-separator}
-%\DescribeOption{list-separator}
-% Lists of numbers are printed with a separator between each item,
-% which is stored using the \opt{list-separator} option. The
-% separator before the last item of a list may be different, and
-% is therefore set using the \opt{list-final-separator} option. Any
-% spaces needed should be included in the option settings: none are
-% added within the code. These two items are printed in text mode.
-%\begin{LaTeXdemo}
-% \numlist{0.1;0.2;0.3} \\
-% \numlist[list-separator = {; }]{0.1;0.2;0.3} \\
-% \numlist[list-final-separator = {, }]{0.1;0.2;0.3} \\
-% \numlist[
-% list-separator = { and },
-% list-final-separator = { and finally }
-% ]{0.1;0.2;0.3}
-%\end{LaTeXdemo}
-%
-%\DescribeOption{range-phrase}
-% Ranges of numbers can be given as input. These will have an
-% appropriate word or symbol inserted between the two entries: this
-% is stored using the \opt{range-phrase} option. The phrase should
-% include any necessary spaces: no extra space is added.
-%\begin{LaTeXdemo}
-% \numrange{5}{100} \\
-% \numrange[range-phrase = --]{5}{100}
-%\end{LaTeXdemo}
-%
%\subsection{Multi-part numbers}
%
% \pkg{siunitx} recognises the idea of products and quotients in
@@ -2209,6 +2197,57 @@ This work consists of the file siunitx.dtx
% \num[fraction-function = \tfrac]{1 / 4}
%\end{LaTeXdemo}
%
+%\subsection{Lists and ranges of numbers}
+%
+% Lists and ranges of numbers have a small number of specialised
+% options, which apply to these more unusual input forms
+% (\cref{tab:opt:num:list}).
+%
+%\begin{table}
+% \centering
+% \caption{Output options for lists and ranges of numbers.}
+% \label{tab:opt:num:list}
+% \begin{tabular}{>{\ttfamily}ll>{\ttfamily}l}
+% \toprule
+% \multicolumn{1}{l}{Option name} &
+% Type &
+% \multicolumn{1}{l}{Default} \\
+% \midrule
+% list-final-separator & Literal & \verb*= and = \\
+% list-separator & Literal & \verb*=, = \\
+% range-phrase & Literal & \verb*= to = \\
+% \bottomrule
+% \end{tabular}
+%\end{table}
+%
+%\DescribeOption{list-final-separator}
+%\DescribeOption{list-separator}
+% Lists of numbers are printed with a separator between each item,
+% which is stored using the \opt{list-separator} option. The
+% separator before the last item of a list may be different, and
+% is therefore set using the \opt{list-final-separator} option. Any
+% spaces needed should be included in the option settings: none are
+% added within the code. These two items are printed in text mode.
+%\begin{LaTeXdemo}
+% \numlist{0.1;0.2;0.3} \\
+% \numlist[list-separator = {; }]{0.1;0.2;0.3} \\
+% \numlist[list-final-separator = {, }]{0.1;0.2;0.3} \\
+% \numlist[
+% list-separator = { and },
+% list-final-separator = { and finally }
+% ]{0.1;0.2;0.3}
+%\end{LaTeXdemo}
+%
+%\DescribeOption{range-phrase}
+% Ranges of numbers can be given as input. These will have an
+% appropriate word or symbol inserted between the two entries: this
+% is stored using the \opt{range-phrase} option. The phrase should
+% include any necessary spaces: no extra space is added.
+%\begin{LaTeXdemo}
+% \numrange{5}{100} \\
+% \numrange[range-phrase = --]{5}{100}
+%\end{LaTeXdemo}
+%
%\subsection{Angles}
%
% Angle processing provided by the \cs{ang} function has a set of
@@ -2575,7 +2614,7 @@ This work consists of the file siunitx.dtx
% the units which where provided in version 1 are as follows.
%\begin{LaTeXdemo}[code only]
% % Astronomy
-% \DeclareSIUnit\parse{pc}
+% \DeclareSIUnit\parsec{pc}
% \DeclareSIUnit\lightyear{ly}
%
% % Chemical engineering
@@ -2654,7 +2693,7 @@ This work consists of the file siunitx.dtx
% The separator between each unit is stored using the
% \opt{inter-unit-product} option. The standard setting is a thin
% space: another common choice is a centred dot. To get the correct
-% spacing it is necessary to use "{}\cdot{}" in the later case.
+% spacing it is necessary to use "{}\cdot{}" in the latter case.
%\begin{LaTeXdemo}
% \si{\farad\squared\lumen\candela} \\
% \si[inter-unit-product={}\cdot{}]{\farad\squared\lumen\candela}
@@ -2897,15 +2936,15 @@ This work consists of the file siunitx.dtx
%
%\DescribeOption{list-units}
%\DescribeOption{range-units}
-% The \opt{list-units} and \opt{range-units} options determines how
-% the \cs{SIlist} and\cs{SIrange} function displays units,
+% The \opt{list-units} and \opt{range-units} options determine how
+% the \cs{SIlist} and \cs{SIrange} functions display units,
% respectively. The standard setting for both is \opt{repeat}, where
% each number will be printed with a unit. Alternatives are
% \opt{brackets} and \opt{single}. Any brackets needed on individual
% numbers within a product are controlled by the \opt{brackets-numbers}
% option (\emph{i.e}.~they are treated as pure numbers).
% These options do not affect the application of brackets for each
-% number within the list or range: they only sets those around the
+% number within the list or range: they only set those around the
% entire group.
%\begin{LaTeXdemo}
% \SIlist{2;4;6;8}{\tesla} \\
@@ -3127,7 +3166,7 @@ This work consists of the file siunitx.dtx
% \end{table}
%\end{LaTeXdemo}
% The table-printing code will omit any part of a number which has no
-% space reserved, placing a warning in the \LaTeX\ log. This means that
+% space reserved, placing a warning in the \LaTeX{} log. This means that
% uncertainties and exponents will not be printed if no space is
% reserved for them.
%
@@ -3693,7 +3732,7 @@ This work consists of the file siunitx.dtx
%\end{LaTeXdemo}
% As units are always declared, overwriting any existing definition,
% units may safely be created in the configuration file even when also
-% included in individual \LaTeX\ document headers.
+% included in individual \LaTeX{} document headers.
%
%\section{Localisation}
%
@@ -3746,15 +3785,15 @@ This work consists of the file siunitx.dtx
%\label{sec:expanding}
%
% When processing tables, \pkg{siunitx} will expand anything stored
-% inside a macro, unless it is long or protected. \LaTeXe\ robust
+% inside a macro, unless it is long or protected. \LaTeXe{} robust
% commands are also detected and are not expanded
% (\cref{tab:xmpl:macro}). Values which would otherwise be expanded
-% can be protected by wrapping them in a set of braces. As \TeX\ itself
+% can be protected by wrapping them in a set of braces. As \TeX{} itself
% will expand the first token in a table cell before \pkg{siunitx}
% can act on it, using the \eTeX\ protected mechanism is the
% recommended course of action to prevent expansion of macros in
% table cells. (As is shown in the table, \TeX's expansion of
-% \LaTeXe\ robust commands can lead to unexpected results.)
+% \LaTeXe{} robust commands can lead to unexpected results.)
%\begin{LaTeXdemo}[code and float]
% \begin{table}
% \centering
@@ -3782,7 +3821,7 @@ This work consists of the file siunitx.dtx
%
% It is possible to use calculated values in tables. For this to
% work, the calculation must take place before attempting to parse
-% the number. An added complication is that \TeX\ itself will
+% the number. An added complication is that \TeX{} itself will
% expand the first macro in a table cell until it finds
% something unexpandable. The \eTeX\ protected mechanism can be
% used to prevent this; using the \pkg{etoolbox} package provides
@@ -3875,7 +3914,7 @@ This work consists of the file siunitx.dtx
% A small number of non-Latin symbols are needed by \pkg{siunitx},
% notably \SIUnitSymbolOhm\ and \SIUnitSymbolMicro. The package picks
% glyphs for these which are correct in the sense that they are upright
-% (not italic) symbols, and match the \LaTeX\ standard Computer Modern
+% (not italic) symbols, and match the \LaTeX{} standard Computer Modern
% font. However, this does not make them the best choice if other
% fonts are in use, which is particularly common when \XeTeX\ is
% being used.
@@ -3926,7 +3965,7 @@ This work consists of the file siunitx.dtx
%\subsection{Maximising performance}
%
% Both the number and unit parsers require significant effort in
-% terms of \TeX\ programming. For input that does not require
+% terms of \TeX{} programming. For input that does not require
% such processing, the maximum performance for \pkg{siunitx} can
% therefore be obtained by turning off both systems:
%\begin{LaTeXdemo}
@@ -4015,10 +4054,11 @@ This work consists of the file siunitx.dtx
%
% When using the \pkg{array} package \enquote{\texttt{<}} construct
% to insert material after an \texttt{S} or \texttt{s} column, the
-% spacing will be wrong. This is due to the way that \LaTeX\ constructs
+% alignment of the final column may be wrong if the standard tabular row
+% terminator |\\| is used.
+% This is due to the way that \LaTeX{} constructs
% tables at a low level. The incorrect spacing can be avoided by using
-% the \TeX\ \cs{cr} primitive to end the table rows instead
-% (\cref{tab:cr}).
+% the \TeX{} \cs{cr} primitive to end the table rows (\cref{tab:cr}).
%\begin{LaTeXdemo}[code and float]
% \begin{table}
% \caption{Correcting spacing in last \texttt{S} column}
@@ -4684,7 +4724,7 @@ This work consists of the file siunitx.dtx
% As illustrated, it is usually best to use the \texttt{article}
% class and to only load packages which are needed to show the issue.
% It is also useful to include a copy of the log file generate by
-% \TeX\ when reporting a bug (as the versions of packages can be
+% \TeX{} when reporting a bug (as the versions of packages can be
% important to solving the issue).
%
% Feedback can be sent in a range of ways. The development code
@@ -4692,14 +4732,14 @@ This work consists of the file siunitx.dtx
% \href{http://bitbucket.org/josephwright/siunitx}{BitBucket},
% and the site includes an issue tracker. Adding feedback directly
% to the database means that other users can see it, and also
-% ensures that it does not get forgotten. E-mailing directly is
+% ensures that it does not get forgotten. E-mailing directly
% will also definitely get attention:
% \href{mailto:joseph.wright@morningstar2.co.uk}
% {\texttt{joseph.wright@morningstar2.co.uk}}. I also keep an eye
% on various groups, for example
% \href{http://groups.google.com/group/comp.text.tex/topics}
% {\texttt{comp.text.tex}} and
-% \href{http://www.latex-community.org/forum/}{The \LaTeX\ Community}.
+% \href{http://www.latex-community.org/forum/}{The \LaTeX{} Community}.
% Sometimes I miss posts to these places, so it's useful if you also
% e-mail me pointing to the appropriate thread.
%
@@ -4728,7 +4768,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2011/04/13} {2.2}
+\ProvidesExplPackage {siunitx} {2011/04/16} {2.2a}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -5192,7 +5232,7 @@ This work consists of the file siunitx.dtx
%\begin{macro}[aux]{\siunitx_cs_if_tl_aux:w}
% This is basically a re-hash of stuff from \pkg{expl3}, but to test for
% short macros only. The second test (with the \cs{cs_to_str:N} part)
-% is checking for \LaTeXe\ robust commands.
+% is checking for \LaTeXe{} robust commands.
% \begin{macrocode}
\group_begin:
\tl_map_inline:nn { \M \A \C \R \O }
@@ -6121,8 +6161,7 @@ This work consists of the file siunitx.dtx
\tl_set:Nn \l_siunitx_number_next_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { product }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_arg_tl
{ \siunitx_error:n { starting-product-token } }
\tl_if_empty:NT \l_siunitx_number_next_tl
@@ -6152,8 +6191,7 @@ This work consists of the file siunitx.dtx
\tl_set:Nn \l_siunitx_number_denominator_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { quotient }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_numerator_tl
{ \siunitx_error:n { starting-quotient-token } }
\tl_if_empty:NT \l_siunitx_number_denominator_tl
@@ -6487,8 +6525,7 @@ This work consists of the file siunitx.dtx
% simple and hopefully efficient.
% \begin{macrocode}
\cs_new_protected:Npn \siunitx_number_in_parse_relation:N #1 {
- \exp_last_unbraced:NV \siunitx_number_in_parse_relation:w
- #1 \q_stop #1
+ \exp_after:wN \siunitx_number_in_parse_relation:w #1 \q_stop #1
}
\cs_new_protected:Npn \siunitx_number_in_parse_relation:w
#1#2 \q_stop #3 {
@@ -7683,7 +7720,7 @@ This work consists of the file siunitx.dtx
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_fixed_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -8157,7 +8194,7 @@ This work consists of the file siunitx.dtx
\l_siunitx_round_decimal_out_tl
}
{
- \exp_last_unbraced:NV \siunitx_number_process_round_tidy_aux:w
+ \exp_after:wN \siunitx_number_process_round_tidy_aux:w
\l_siunitx_process_round_min_tl . . \q_stop {#1}
}
}
@@ -8232,7 +8269,7 @@ This work consists of the file siunitx.dtx
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -8278,7 +8315,7 @@ This work consists of the file siunitx.dtx
{ \l_siunitx_tmpa_tl } { \int_use:N \l_siunitx_tmp_int #2 }
{ #3 + 1 }
}
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_ii:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_ii:nnn
\l_siunitx_tmpa_tl
}
% \end{macrocode}
@@ -8731,6 +8768,7 @@ This work consists of the file siunitx.dtx
group-decimal-digits = #1,
group-integer-digits = #1
},
+ group-digits .default:n = true ,
group-four-digits .bool_set:N = \l_siunitx_group_four_bool,
group-integer-digits .bool_set:N =
\l_siunitx_group_integer_bool,
@@ -9117,13 +9155,9 @@ This work consists of the file siunitx.dtx
\cs_new_protected_nopar:Npn \siunitx_number_format_group_aux:nn #1#2 {
\prop_if_in:NnT \l_siunitx_number_in_prop { #1 - #2 }
{
- \prop_if_in:NnTF \l_siunitx_number_in_prop { symbolic }
+ \bool_if:cTF { l_siunitx_group_ #2 _bool }
+ { \siunitx_number_format_group_four:nn {#1} {#2} }
{ \siunitx_number_format_copy:n { #1 - #2 } }
- {
- \bool_if:cTF { l_siunitx_group_ #2 _bool }
- { \siunitx_number_format_group_four:nn {#1} {#2} }
- { \siunitx_number_format_copy:n { #1 - #2 } }
- }
}
}
% \end{macrocode}
@@ -9144,8 +9178,7 @@ This work consists of the file siunitx.dtx
\bool_if:NTF \l_siunitx_group_four_bool
{ \siunitx_number_format_group_four_aux:nn {#1} {#2} }
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_four_aux:NNNNNNw
+ \exp_after:wN \siunitx_number_format_group_four_aux:NNNNNNw
\l_siunitx_tmpa_tl \q_no_value \q_no_value \q_no_value
\q_no_value \q_no_value \q_stop
{ \siunitx_number_format_copy:n {#1 - #2} }
@@ -9175,8 +9208,7 @@ This work consists of the file siunitx.dtx
\cs_new_protected_nopar:Npn \siunitx_number_format_group_decimal: {
\tl_if_empty:NF \l_siunitx_tmpa_tl
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_decimal_aux:NNNN
+ \exp_after:wN \siunitx_number_format_group_decimal_aux:NNNN
\l_siunitx_tmpa_tl { } { } { }
}
}
@@ -10853,7 +10885,7 @@ This work consists of the file siunitx.dtx
%\begin{macro}{\siunitx_protect_symbols:N}
% There are a few unit names which may be defined by other parts of
% \LaTeX. They need to be unexpandable, as in an \texttt{S} column
-% \TeX\ will look for \cs{omit} \emph{before} starting the internal
+% \TeX{} will look for \cs{omit} \emph{before} starting the internal
% version of \cs{si} and doing a redefinition. The same is true
% for the \cs{color} function, which may well be the first thing in
% a table cell. The same is true for \cs{array@row@rst}, from REV\TeX,
@@ -10920,6 +10952,7 @@ This work consists of the file siunitx.dtx
{
\siunitx_unit_if_literal:nTF {#1}
{
+ \tl_clear:N \l_siunitx_per_mode_tl
\bool_if:NTF \l_siunitx_unit_forbid_literal_bool
{
\msg_error:nnx { siunitx } { literal-unit }
@@ -11769,8 +11802,7 @@ This work consists of the file siunitx.dtx
{
\cs_set:Npn \siunitx_tmp:w ##1 - ##2 \q_stop
{ \tl_set:Nn \l_siunitx_tmpa_tl {##2} }
- \exp_last_unbraced:NV \siunitx_tmp:w
- \l_siunitx_tmpa_tl \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_tmpa_tl \q_stop
}
{ \tl_put_left:Nn \l_siunitx_tmpa_tl { - } }
}
@@ -12569,7 +12601,7 @@ This work consists of the file siunitx.dtx
{ > { \bcolumn #1 \@nil } #1 < { \ecolumn } }
\cs_set:Npn \siunitx_tmp:w #1 \NC@do S #2 \q_stop
{ \toks_set:Nn \NC@list { #1 #2 } }
- \exp_last_unbraced:NV \siunitx_tmp:w \NC@list \q_stop
+ \exp_after:wN \siunitx_tmp:w \NC@list \q_stop
\cs_gundefine:N \NC@find@S
}
{ }
@@ -12577,6 +12609,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
%\begin{macro}{\siunitx_table_rewrite_create:N}
+%\begin{macro}[aux]{\siunitx_table_rewrite_create_aux:w}
% The \texttt{s} and \texttt{S} column types are both created using
% the \pkg{array} package, but with the internal macros redefined
% to work with optional argument. First, there is a need to do a
@@ -12586,10 +12619,11 @@ This work consists of the file siunitx.dtx
% to the appropriate macro.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create:N #1 {
- \tl_set:Nn \l_siunitx_tmpa_tl { \NC@do #1 }
- \tl_put_right:NV \l_siunitx_tmpa_tl \NC@list
\newcolumntype {#1} { }
- \toks_set:NV \NC@list \l_siunitx_tmpa_tl
+ \cs_set_protected_nopar:Npn
+ \siunitx_table_rewrite_create_aux:w \NC@do ##1##2 \NC@do #1
+ { \NC@list { \NC@do ##1 \NC@do #1 ##2 } }
+ \exp_after:wN \siunitx_table_rewrite_create_aux:w \toks_use:N \NC@list
\exp_args:NNc \renewcommand * { NC@rewrite@ #1 } [1] [ ]
{
\toks_put_right:Nn \@temptokena
@@ -12601,10 +12635,12 @@ This work consists of the file siunitx.dtx
\NC@find
}
}
+\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create_aux:w { }
\AtBeginDocument { \siunitx_table_rewrite_create:N s }
\AtBeginDocument { \siunitx_table_rewrite_create:N S }
% \end{macrocode}
%\end{macro}
+%\end{macro}
%
%\subsection{Collecting tokens in tables}
%
@@ -12719,8 +12755,8 @@ This work consists of the file siunitx.dtx
{
\tl_use:N \l_siunitx_table_collect_pre_tl
\tl_clear:N \l_siunitx_table_collect_pre_tl
- \cs_set_nopar:Npx \siunitx_table_collect_next:
- { \exp_not:N \siunitx_table_collect_get: \exp_not:V #1 }
+ \cs_set_nopar:Npn \siunitx_table_collect_next:
+ { \exp_after:wN \siunitx_table_collect_get: #1 }
}
{
\bool_if:NTF \l_siunitx_table_collect_pre_bool
@@ -12867,6 +12903,17 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\siunitx_table_collect_end:}
+% The same concept applies to the \cs{end} macro.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \siunitx_table_collect_end: {
+ \siunitx_table_print:
+ \cs_set_eq:NN \siunitx_table_print: \prg_do_nothing:
+ \end
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\siunitx_table_collect_not_braced:N}
%\begin{macro}[aux]{\siunitx_table_collect_not_braced_aux_i:N}
%\begin{macro}[aux]{\siunitx_table_collect_not_braced_aux_ii:N}
@@ -12889,7 +12936,7 @@ This work consists of the file siunitx.dtx
{ \cs_set_eq:NN \siunitx_table_collect_next: ##1 }
}
\tl_map_function:nN
- { \cs:w \end \scan_stop: \siunitx_table_print: }
+ { \cs:w \scan_stop: \siunitx_table_print: }
\siunitx_table_collect_not_braced_aux_ii:N
\token_if_eq_meaning:NNT \siunitx_table_collect_next:
\siunitx_table_collect_get:
@@ -12899,7 +12946,14 @@ This work consists of the file siunitx.dtx
\cs_set_eq:NN \siunitx_table_collect_next:
\siunitx_table_collect_newline:
}
- { \siunitx_table_collect_token:N #1 }
+ {
+ \token_if_eq_meaning:NNTF #1 \end
+ {
+ \cs_set_eq:NN \siunitx_table_collect_next:
+ \siunitx_table_collect_end:
+ }
+ { \siunitx_table_collect_token:N #1 }
+ }
}
}
\cs_new_protected:Npn \siunitx_table_collect_not_braced_aux_ii:N #1 { }
@@ -15513,9 +15567,9 @@ This work consists of the file siunitx.dtx
%\begin{macro}{\c_siunitx_configuration_ext_tl}
% Loading configuration files is made slightly complex by the need
% to remove spaces in the file names (none of the files contain any at
-% all, so this is easy). Secondly, the \LaTeXe\ \cs{@onefilewithoptions}
+% all, so this is easy). Secondly, the \LaTeXe{} \cs{@onefilewithoptions}
% function is used for file loading, as \LaTeX3 currently needs the
-% \LaTeXe\ category code stack to keep things sane.
+% \LaTeXe{} category code stack to keep things sane.
% \begin{macrocode}
\cs_new_protected:Npn \siunitx_load_configuration:n #1 {
\tl_set_rescan:Nnn \l_siunitx_tmpa_tl
@@ -15569,7 +15623,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/16} {2.2a}
{siunitx: Version 1 settings}
% \end{macrocode}
%
@@ -16785,7 +16839,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/04/16} {2.2a}
{siunitx: Binary units}
% \end{macrocode}
%
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 1454b87328f..347d2ab965c 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} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/04/16} {2.2a}
{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 2fea1ee48d2..6d092a7aea7 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} {2011/04/13} {2.2}
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/16} {2.2a}
{siunitx: Version 1 settings}
\keys_set:nn { siunitx }
{ load-configurations = { abbreviations , binary } }
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 7bfb956c781..9b272ce7654 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} {2011/04/13} {2.2}
+\ProvidesExplPackage {siunitx} {2011/04/16} {2.2a}
{A comprehensive (SI) units package}
\cs_if_exist:NTF \msg_set:nnnn
{
@@ -872,8 +872,7 @@
\tl_set:Nn \l_siunitx_number_next_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { product }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_arg_tl
{ \siunitx_error:n { starting-product-token } }
\tl_if_empty:NT \l_siunitx_number_next_tl
@@ -894,8 +893,7 @@
\tl_set:Nn \l_siunitx_number_denominator_tl {##2}
\tl_set:Nn \l_siunitx_number_multi_tl { quotient }
}
- \exp_last_unbraced:NV \siunitx_tmp:w \l_siunitx_number_arg_tl
- \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_number_arg_tl \q_stop
\tl_if_empty:NT \l_siunitx_number_numerator_tl
{ \siunitx_error:n { starting-quotient-token } }
\tl_if_empty:NT \l_siunitx_number_denominator_tl
@@ -1058,8 +1056,7 @@
\cs_new_protected:Npn \siunitx_number_in_parse_loop:N #1 { }
\cs_new_protected:Npn \siunitx_number_in_parse_more:N #1 { }
\cs_new_protected:Npn \siunitx_number_in_parse_relation:N #1 {
- \exp_last_unbraced:NV \siunitx_number_in_parse_relation:w
- #1 \q_stop #1
+ \exp_after:wN \siunitx_number_in_parse_relation:w #1 \q_stop #1
}
\cs_new_protected:Npn \siunitx_number_in_parse_relation:w
#1#2 \q_stop #3 {
@@ -1954,7 +1951,7 @@
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_fixed_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -2337,7 +2334,7 @@
\l_siunitx_round_decimal_out_tl
}
{
- \exp_last_unbraced:NV \siunitx_number_process_round_tidy_aux:w
+ \exp_after:wN \siunitx_number_process_round_tidy_aux:w
\l_siunitx_process_round_min_tl . . \q_stop {#1}
}
}
@@ -2389,7 +2386,7 @@
\tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl
\tl_set:Nx \l_siunitx_tmpa_tl
{ \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } }
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_i:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_i:nnn
\l_siunitx_tmpa_tl
}
}
@@ -2426,7 +2423,7 @@
{ \l_siunitx_tmpa_tl } { \int_use:N \l_siunitx_tmp_int #2 }
{ #3 + 1 }
}
- \exp_last_unbraced:NV \siunitx_number_process_scientific_aux_ii:nnn
+ \exp_after:wN \siunitx_number_process_scientific_aux_ii:nnn
\l_siunitx_tmpa_tl
}
\cs_new_protected_nopar:Npn
@@ -2739,6 +2736,7 @@
group-decimal-digits = #1,
group-integer-digits = #1
},
+ group-digits .default:n = true ,
group-four-digits .bool_set:N = \l_siunitx_group_four_bool,
group-integer-digits .bool_set:N =
\l_siunitx_group_integer_bool,
@@ -3038,13 +3036,9 @@
\cs_new_protected_nopar:Npn \siunitx_number_format_group_aux:nn #1#2 {
\prop_if_in:NnT \l_siunitx_number_in_prop { #1 - #2 }
{
- \prop_if_in:NnTF \l_siunitx_number_in_prop { symbolic }
+ \bool_if:cTF { l_siunitx_group_ #2 _bool }
+ { \siunitx_number_format_group_four:nn {#1} {#2} }
{ \siunitx_number_format_copy:n { #1 - #2 } }
- {
- \bool_if:cTF { l_siunitx_group_ #2 _bool }
- { \siunitx_number_format_group_four:nn {#1} {#2} }
- { \siunitx_number_format_copy:n { #1 - #2 } }
- }
}
}
\cs_new_protected_nopar:Npn \siunitx_number_format_group_four:nn #1#2 {
@@ -3053,8 +3047,7 @@
\bool_if:NTF \l_siunitx_group_four_bool
{ \siunitx_number_format_group_four_aux:nn {#1} {#2} }
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_four_aux:NNNNNNw
+ \exp_after:wN \siunitx_number_format_group_four_aux:NNNNNNw
\l_siunitx_tmpa_tl \q_no_value \q_no_value \q_no_value
\q_no_value \q_no_value \q_stop
{ \siunitx_number_format_copy:n {#1 - #2} }
@@ -3075,8 +3068,7 @@
\cs_new_protected_nopar:Npn \siunitx_number_format_group_decimal: {
\tl_if_empty:NF \l_siunitx_tmpa_tl
{
- \exp_last_unbraced:NV
- \siunitx_number_format_group_decimal_aux:NNNN
+ \exp_after:wN \siunitx_number_format_group_decimal_aux:NNNN
\l_siunitx_tmpa_tl { } { } { }
}
}
@@ -4242,6 +4234,7 @@
{
\siunitx_unit_if_literal:nTF {#1}
{
+ \tl_clear:N \l_siunitx_per_mode_tl
\bool_if:NTF \l_siunitx_unit_forbid_literal_bool
{
\msg_error:nnx { siunitx } { literal-unit }
@@ -4791,8 +4784,7 @@
{
\cs_set:Npn \siunitx_tmp:w ##1 - ##2 \q_stop
{ \tl_set:Nn \l_siunitx_tmpa_tl {##2} }
- \exp_last_unbraced:NV \siunitx_tmp:w
- \l_siunitx_tmpa_tl \q_stop
+ \exp_after:wN \siunitx_tmp:w \l_siunitx_tmpa_tl \q_stop
}
{ \tl_put_left:Nn \l_siunitx_tmpa_tl { - } }
}
@@ -5327,16 +5319,17 @@
{ > { \bcolumn #1 \@nil } #1 < { \ecolumn } }
\cs_set:Npn \siunitx_tmp:w #1 \NC@do S #2 \q_stop
{ \toks_set:Nn \NC@list { #1 #2 } }
- \exp_last_unbraced:NV \siunitx_tmp:w \NC@list \q_stop
+ \exp_after:wN \siunitx_tmp:w \NC@list \q_stop
\cs_gundefine:N \NC@find@S
}
{ }
}
\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create:N #1 {
- \tl_set:Nn \l_siunitx_tmpa_tl { \NC@do #1 }
- \tl_put_right:NV \l_siunitx_tmpa_tl \NC@list
\newcolumntype {#1} { }
- \toks_set:NV \NC@list \l_siunitx_tmpa_tl
+ \cs_set_protected_nopar:Npn
+ \siunitx_table_rewrite_create_aux:w \NC@do ##1##2 \NC@do #1
+ { \NC@list { \NC@do ##1 \NC@do #1 ##2 } }
+ \exp_after:wN \siunitx_table_rewrite_create_aux:w \toks_use:N \NC@list
\exp_args:NNc \renewcommand * { NC@rewrite@ #1 } [1] [ ]
{
\toks_put_right:Nn \@temptokena
@@ -5348,6 +5341,7 @@
\NC@find
}
}
+\cs_new_protected_nopar:Npn \siunitx_table_rewrite_create_aux:w { }
\AtBeginDocument { \siunitx_table_rewrite_create:N s }
\AtBeginDocument { \siunitx_table_rewrite_create:N S }
\tl_new:N \l_siunitx_table_collect_tl
@@ -5397,8 +5391,8 @@
{
\tl_use:N \l_siunitx_table_collect_pre_tl
\tl_clear:N \l_siunitx_table_collect_pre_tl
- \cs_set_nopar:Npx \siunitx_table_collect_next:
- { \exp_not:N \siunitx_table_collect_get: \exp_not:V #1 }
+ \cs_set_nopar:Npn \siunitx_table_collect_next:
+ { \exp_after:wN \siunitx_table_collect_get: #1 }
}
{
\bool_if:NTF \l_siunitx_table_collect_pre_bool
@@ -5491,6 +5485,11 @@
\cs_set_eq:NN \siunitx_table_print: \prg_do_nothing:
\tabularnewline
}
+\cs_new_protected_nopar:Npn \siunitx_table_collect_end: {
+ \siunitx_table_print:
+ \cs_set_eq:NN \siunitx_table_print: \prg_do_nothing:
+ \end
+}
\cs_new_protected:Npn \siunitx_table_collect_not_braced:N #1 {
\token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
{
@@ -5506,7 +5505,7 @@
{ \cs_set_eq:NN \siunitx_table_collect_next: ##1 }
}
\tl_map_function:nN
- { \cs:w \end \scan_stop: \siunitx_table_print: }
+ { \cs:w \scan_stop: \siunitx_table_print: }
\siunitx_table_collect_not_braced_aux_ii:N
\token_if_eq_meaning:NNT \siunitx_table_collect_next:
\siunitx_table_collect_get:
@@ -5516,7 +5515,14 @@
\cs_set_eq:NN \siunitx_table_collect_next:
\siunitx_table_collect_newline:
}
- { \siunitx_table_collect_token:N #1 }
+ {
+ \token_if_eq_meaning:NNTF #1 \end
+ {
+ \cs_set_eq:NN \siunitx_table_collect_next:
+ \siunitx_table_collect_end:
+ }
+ { \siunitx_table_collect_token:N #1 }
+ }
}
}
\cs_new_protected:Npn \siunitx_table_collect_not_braced_aux_ii:N #1 { }