From dca3a8e7463bec4284c1000558e9e31d6d52b469 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 17 Jul 2009 00:52:15 +0000 Subject: calctab 0.6.1 (15jul09) git-svn-id: svn://tug.org/texlive/trunk@14284 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/calctab/calctab.sty | 60 +++++++++++-------------- 1 file changed, 25 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/tex/latex/calctab') diff --git a/Master/texmf-dist/tex/latex/calctab/calctab.sty b/Master/texmf-dist/tex/latex/calctab/calctab.sty index 12109f18540..d4ceb805ff9 100644 --- a/Master/texmf-dist/tex/latex/calctab/calctab.sty +++ b/Master/texmf-dist/tex/latex/calctab/calctab.sty @@ -1,9 +1,9 @@ % calctab.sty % -% Version: 0.6 -% Date: 2009_03_20 +% Version: 0.6.1 +% Date: 2009_07_12 % -% Copyright (C) 2009 Roberto Giacomelli +% Copyright (C) 2009 Roberto Giacomelli % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -24,7 +24,7 @@ % The language syntax can be change. % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{calctab}[2009/03/23 v0.6 Autocalc table environments] +\ProvidesPackage{calctab}[2009/07/12 v0.6.1 Autocalc table environments] % % ''library'' package for the table's visual property \RequirePackage{alphalph} @@ -158,7 +158,7 @@ \nprounddigits{2} % % internal \amount command control flag -\newboolean{ct@isoperation} +\newboolean{ct@isop} % % % main computation loop @@ -290,39 +290,41 @@ } % \toks255=\expandafter{\the\toks255\AlphAlph{\value{ct@RowIndex}}&##2 } - % elementary ``parse'' of the #3 argument + % elementary ``parsing'' of the argument #3 \fpRegSet{ct@unit}{1} % elimination of the space char \StrDel{##3}{ }[\ct@arg] - \IfBeginWith{\ct@arg}{-}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% + \IfBeginWith{\ct@arg}{-}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% \fpRegSet{ct@unit}{-1} \StrBehind{\ct@arg}{-}[\ct@argt] \def\ct@arg{\ct@argt} - }{} - \IfBeginWith{\ct@arg}{+}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% - \StrBehind{\ct@arg}{+}[\ct@argt] - \def\ct@arg{\ct@argt} - }{} + }{ + \IfBeginWith{\ct@arg}{+}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% + \StrBehind{\ct@arg}{+}[\ct@argt] + \def\ct@arg{\ct@argt} + }{} + } % - \IfSubStr{\ct@arg}{*}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% true + \IfSubStr{\ct@arg}{*}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% true \ct@operator{*}{$\, \times \,$} }{% false - \IfSubStr{\ct@arg}{/}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% + \IfSubStr{\ct@arg}{/}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% \ct@operator{/}{$\, / \,$} }{% - \IfSubStr{\ct@arg}{-}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% + \IfSubStr{\ct@arg}{-}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% \ct@operator{-}{$\, - \,$} }{% - \IfSubStr{\ct@arg}{+}{\setboolean{ct@isoperation}{true}}{\setboolean{ct@isoperation}{false}} - \ifthenelse{\boolean{ct@isoperation}}{% + \IfSubStr{\ct@arg}{+}{\setboolean{ct@isop}{true}}{\setboolean{ct@isop}{false}} + \ifthenelse{\boolean{ct@isop}}{% \ct@operator{+}{$\, + \,$} }{% \fpRegSet{ctRowValue\thect@RowIndex}{\ct@arg} + \fpRegMul{ctRowValue\thect@RowIndex}{ct@unit}% add for 0.6 fixed bug } } } @@ -593,18 +595,6 @@ Overlap ignored} % % % -% Version 0.6 Changes history -% -% 0.6.1 - 2009_03_03 - New \inrule command to draw a rule among the table rows -% 0.6.2 - 2009_03_03 - Fixed bug: the absense of a rule after an add row -% 0.6.3 - 2009_03_05 - New xcalctab environment (extended environment with the 'quantity' and 'price' columns) -% 0.6.4 - 2009_03_10 - New feature: automatic trunked of the description string (A+B+C+...) if it is long than more five items -% 0.6.5 - 2009_03_10 - Substituted the standard LaTeX command \Alph with \AlphAlph by Oberdiek to eliminate the 26 rows limit -% 0.6.6 - 2009_03_12 - New feature for \amount command: basic binary operation with two numbers thanks to xstring package -% -% 0.6.7 - 2009_03_xx - New command \calc for basic operation with two numbers. -% 0.6.8 - 2009_03_xx - Minor internal adjustments -% -% +% Version 0.6.1 Changes history see the calctab_manual.pdf documentation % % end of file calctab.sty -- cgit v1.2.3