diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/numprint/numprint.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/numprint/numprint.sty | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/numprint/numprint.sty b/Master/texmf-dist/tex/latex/numprint/numprint.sty index e80c0a74b50..6cafa201ece 100644 --- a/Master/texmf-dist/tex/latex/numprint/numprint.sty +++ b/Master/texmf-dist/tex/latex/numprint/numprint.sty @@ -8,7 +8,7 @@ %% %% numprint package %% -%% Copyright 2000--2005, 2007 Harald Harders +%% Copyright 2000--2005, 2007, 2008 Harald Harders %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{numprint} - [2007/01/08 v1.37 Print numbers (HH)] + [2008/02/17 v1.38 Print numbers (HH)] \RequirePackage{array} \newif\ifnprt@numsepfour \newif\ifnprt@errormessage @@ -230,10 +230,10 @@ }{% \csname ifnprt@#1@decimalfound\endcsname \expandafter\g@addto@macro\csname nprt@#1@after\endcsname{#2}% - \stepcounter{nprt@#1@digitsafter}% + \advance\csname c@nprt@#1@digitsafter\endcsname by 1\relax \else \expandafter\g@addto@macro\csname nprt@#1@before\endcsname{#2}% - \stepcounter{nprt@#1@digitsbefore}% + \advance\csname c@nprt@#1@digitsbefore\endcsname by 1\relax \fi }% \ifx\nprt@argthree\@empty @@ -332,7 +332,7 @@ \setlength{\nprt@blockwidth}{% \csname nprt@#1@fixeddigits@#2\endcsname\nprt@digitwidth}% \setcounter{nprt@blockcnt}{\csname nprt@#1@fixeddigits@#2\endcsname}% - \addtocounter{nprt@blockcnt}{-1}% + \advance\c@nprt@blockcnt by -1\relax \divide\c@nprt@blockcnt 3% \ifnprt@numsepfour \else @@ -509,9 +509,10 @@ \NC@find } \else - \newcolumntype{n}[2]{>{\npdigits{#1}{#2}$}l<{$}} - \newcolumntype{N}[3]{% - >{\npdigits{#1}{#2}\npexponentdigits{#3}$}l<{$}} + \newcolumntype{n}[2]{>{\npdigits{#1}{#2}$}l<{$}} + \newcolumntype{N}[3]{% + >{\npdigits{#1}{#2}\npexponentdigits{#3}$}l<{$}% + } \fi \newif\ifnprt@roundup \newcount\nprt@thisdigit @@ -565,12 +566,14 @@ \fi \ifx\nprt@argone\@empty \xdef\nprt@newnum{\the\nprt@thisdigit}% - \stepcounter{nprt@\nprt@numname @digitsbefore}% + \advance\csname c@nprt@\nprt@numname @digitsbefore\endcsname 1\relax \else \expandafter\xdef\expandafter\nprt@newnum{% \the\nprt@thisdigit\nprt@newnum}% \fi } +\newcount\nprt@curpos +\newcount\nprt@rndpos \newcommand*\nprt@round[2]{% \begingroup \edef\nprt@numname{#1}% @@ -580,8 +583,6 @@ \setcounter{nprt@#1@digitsafter}{#2}% \expandafter\g@addto@macro\csname nprt@#1@after\endcsname{% \nprt@roundnull}% - \newcount\nprt@curpos - \newcount\nprt@rndpos \nprt@rndpos=#2 \nprt@roundupfalse \edef\nprt@tmpnum{\csname nprt@#1@after\endcsname}% @@ -594,7 +595,7 @@ \expandafter\nprt@round@before\nprt@tmpnum\@empty\@empty \ifnprt@roundup \expandafter\xdef\expandafter\nprt@newnum{1\nprt@newnum}% - \stepcounter{nprt@#1@digitsbefore}% + \advance\csname c@nprt@#1@digitsbefore\endcsname by 1\relax \fi \expandafter\xdef\csname nprt@#1@before\endcsname{\nprt@newnum}% \fi @@ -616,7 +617,7 @@ \ifnum\csname thenprt@#1@digitsbefore\endcsname<#2 \expandafter\xdef\csname nprt@#1@before\endcsname{% #3\csname nprt@#1@before\endcsname}% - \stepcounter{nprt@#1@digitsbefore}% + \advance\csname c@nprt@#1@digitsbefore\endcsname by 1\relax \nprt@lpad{#1}{#2}{#3}% \fi \fi @@ -650,7 +651,7 @@ \ifnprt@addmissingzero \ifnum\csname thenprt@#1@digitsbefore\endcsname=0 \expandafter\edef\csname nprt@#1@before\endcsname{0}% - \stepcounter{nprt@#1@digitsbefore}% + \advance\csname c@nprt@#1@digitsbefore\endcsname by 1\relax \fi \fi \begingroup @@ -669,13 +670,13 @@ % ganze Bloecke \setcounter{nprt@blockcnt}{% \csname thenprt@#1@digitsbefore\endcsname}% - \addtocounter{nprt@blockcnt}{-1}% + \advance\c@nprt@blockcnt by -1\relax \divide\c@nprt@blockcnt 3% \setcounter{nprt@digitsfirstblock}{% \csname thenprt@#1@digitsbefore\endcsname}% \setcounter{nprt@cntprint}{\thenprt@blockcnt}% \multiply \c@nprt@cntprint 3% - \addtocounter{nprt@digitsfirstblock}{-\thenprt@cntprint}% + \advance\c@nprt@digitsfirstblock by -\thenprt@cntprint\relax \ifnum\thenprt@digitsfirstblock=1 \expandafter\nprt@printone\nprt@numbertoprint\@empty \else @@ -696,8 +697,8 @@ \endgroup } \def\nprt@printthree#1#2#3#4\@empty{% - #1#2#3% \def\nprt@tmp{#4}% + #1#2#3% \ifx\nprt@tmp\empty \else \nprt@separator@before% @@ -705,8 +706,8 @@ \fi } \def\nprt@printtwo#1#2#3\@empty{% - #1#2% \def\nprt@tmp{#3}% + #1#2% \ifx\nprt@tmp\empty \else \nprt@separator@before% @@ -714,8 +715,8 @@ \fi } \def\nprt@printone#1#2\@empty{% - #1% \def\nprt@tmp{#2}% + #1% \ifx\nprt@tmp\empty \else \nprt@separator@before% @@ -727,14 +728,14 @@ \ifnprt@addmissingzero \ifnum\csname thenprt@#1@digitsafter\endcsname=0 \expandafter\edef\csname nprt@#1@after\endcsname{0}% - \stepcounter{nprt@#1@digitsafter}% + \advance\csname c@nprt@#1@digitsafter\endcsname by 1\relax \fi \fi \ifx\nprt@replacenull\@empty \else \ifnum\csname thenprt@#1@digitsafter\endcsname=0 \expandafter\edef\csname nprt@#1@after\endcsname{0}% - \stepcounter{nprt@#1@digitsafter}% + \advance\csname c@nprt@#1@digitsafter\endcsname by 1\relax \fi \fi \fi @@ -767,8 +768,8 @@ \endgroup } \def\nprt@printthree@after#1#2#3#4\@empty{% - #1#2#3% \def\nprt@tmp{#4}% + #1#2#3% \ifx\nprt@tmp\empty \else \nprt@separator@after |