summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-08-02 23:14:01 +0000
committerKarl Berry <karl@freefriends.org>2008-08-02 23:14:01 +0000
commit4663f9ddbd82f5705ca76b395ef64e97eed16b14 (patch)
treebee0855f6d44a4f7f0e9c9543ae06c07b3405aef /Master/texmf-dist/source/latex/siunitx
parent0e6b09416ade3c53b6f6d8d772b4bd180f6cf5b0 (diff)
siunitx 1.0h (2aug08)
git-svn-id: svn://tug.org/texlive/trunk@10019 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx90
1 files changed, 28 insertions, 62 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index ddff73b2c7a..7dd7a6dba5f 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -225,7 +225,7 @@ dcolumn, rccol and numprint packages.
%</driver>
% \fi
%
-%\CheckSum{9517}
+%\CheckSum{9495}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -290,8 +290,7 @@ dcolumn, rccol and numprint packages.
%\DoNotIndex{\key@ifundefined,\newrobustcmd,\protected,\scriptspace}
%\DoNotIndex{\usebox,\tw@,\ifinner,\usepackage,\texttt,\textsf}
%\DoNotIndex{\NC@do,\loop,\l@ngrel@x,\g@addto@macro,\documentclass}
-%\DoNotIndex{\document\,\begin,\=,\@ehb,\\,\listfiles,\nullfont}
-%\DoNotIndex{\normalsize}
+%\DoNotIndex{\document\,\begin,\=,\@ehb,\\,\listfiles}
%
%\DoNotIndex{\pascalsecond,\amperemetresecond,\ohmmetre}
%\DoNotIndex{\newtonmetre,\newtonmetrenp}
@@ -3178,11 +3177,11 @@ author.
% number, of course.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\newcommand*{\si@svn@ver}{v1.0g}
+\newcommand*{\si@svn@ver}{v1.0h}
\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 113 2008-07-19 05:41:59Z joseph $
+\si@svn@id $Id: siunitx.dtx 118 2008-08-02 06:10:09Z joseph $
\ProvidesPackage{siunitx}
[\si@svn@version A comprehensive (SI) units package]
% \end{macrocode}
@@ -4406,10 +4405,9 @@ author.
\si@opt@proctform{mant}%
\si@opt@proctform{exp}%
% \end{macrocode}
-% The \opt{tabformat} input should really have both an integer and
-% decimal part for the mantissa. If neither are present, an error is
-% raised. If just the one part is missing, an warning seems more
-% suitable.
+%\changes{v1.0h}{2008/08/02}{Simplified warnings for \opt{tabformat}}
+% If both the integer and decimal parts are empty, then something has
+% probably gone wrong.
% \begin{macrocode}
\ifnum\si@tab@mantpostcnt=\z@\relax
\ifnum\si@tab@mantprecnt=\z@\relax
@@ -4417,14 +4415,6 @@ author.
{The argument `#1' contains no valid entry for
a mantissa\MessageBreak It should be of the
form `m.n', where m and n are integers}%
- \else
- \si@log@warn{Argument of tabformat contains\MessageBreak
- no decimal part}%
- \fi
- \else
- \ifnum\si@tab@mantprecnt=\z@\relax
- \si@log@warn{Argument of tabformat contains\MessageBreak
- no integer part}%
\fi
\fi
% \end{macrocode}
@@ -9750,46 +9740,33 @@ author.
found}}}}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\ifsi@outerinput}
-% At various points, the package needs to know if the
-% currently-read configuration file is the
-% outer one.
-% \begin{macrocode}
-\newif\ifsi@outerinput\si@outerinputtrue
-% \end{macrocode}
-%\end{macro}
+%\begin{macro}{\si@inputifexists}
+%\changes{v1.0g}{2008/07/18}{Loading of configuration files
+% improved to kill spaces}
%\begin{macro}{\si@InputIfFileExists}
+%\darg{file}
+%\darg{true}
+%\darg{false}
% To allow reading configuration files after the start of the
-% document, a private copy of \cs{InputIfFileExists} is needed. The
-% main macro here simply checks if the modified version is needed.
+% document, a private copy of \cs{InputIfFileExists} is needed. In
+% the preamble, this is just a straight copy. However, in the
+% document body, |@| is made into a letter and printing is killed,
+% while the file is loaded.
% \begin{macrocode}
+\newcommand{\si@inputifexists}[3]{%
+ \IfFileExists{#1}%
+ {#2\@addtofilelist{#1}\@@input \@filef@und}
+ {#3}%
+ \makeatother
+ \normalsize}
\let\si@InputIfFileExists\InputIfFileExists
\AtBeginDocument{
\renewcommand*{\si@InputIfFileExists}{%
- \ifsi@outerinput
- \expandafter\si@outerinput
- \else
- \expandafter\InputIfFileExists
- \fi}}
+ \makeatletter
+ \nullfont
+ \si@inputifexists}}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\si@outerinput}
-%\darg{file}
-%\darg{true-code}
-%\darg{false-code}
-% The outer call to load a file needs to set |@| to a letter and turn
-% of printing using \cs{nullfont}.
-% \begin{macrocode}
-\newcommand*{\si@outerinput}[3]{%
- \makeatletter
- \nullfont
- \si@outerinputfalse
- \IfFileExists{#1}%
- {#2\@addtofilelist{#1}\@@input \@filef@und\normalsize}
- {#3}%
- \normalsize
- \makeatother}
-% \end{macrocode}
%\end{macro}
%\begin{macro}{\requiresiconfigs}
%\darg{config-file}
@@ -12869,24 +12846,13 @@ author.
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
\end{list}}
-\let\LaTeXcodenoexample\LaTeXcodeexample
-\newcommand*{\LaTeXcodenoexampleend}{%
- \egroup
- \setlength\LaTeXwidth{\wd\lst@samplebox}%
- \begin{list}{}{%
- \setlength\itemindent{0pt}
- \setlength\leftmargin{0pt}
- \setlength\rightmargin{0pt}}%
- \item
- \begin{minipage}[c]{\LaTeXwidth}
- \hbox to\linewidth{\box\lst@samplebox\hss}%
- \end{minipage}%
- \end{list}}
\newcommand*{\LaTeXcodefloat}{%
\setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,
basicstyle=\small\ttfamily,basewidth=0.51em,
keywordstyle=\color{blue}}%
\lst@BeginAlsoWriteFile{\LaTeXexamplefile}}
+\let\LaTeXcodenoexample\LaTeXcodefloat
+\let\LaTeXcodenoexampleend\@empty
\newcommand*{\LaTeXcodefloatend}{%
\MakePercentComment\catcode`\^^M=10\relax
\small