summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/calctab/README33
-rw-r--r--Master/texmf-dist/doc/latex/calctab/calctab_manual.pdfbin470403 -> 434866 bytes
-rw-r--r--Master/texmf-dist/doc/latex/calctab/calctab_manual.tex289
-rw-r--r--Master/texmf-dist/tex/latex/calctab/calctab.sty60
4 files changed, 239 insertions, 143 deletions
diff --git a/Master/texmf-dist/doc/latex/calctab/README b/Master/texmf-dist/doc/latex/calctab/README
index 03c5f9946b0..164ae212a76 100644
--- a/Master/texmf-dist/doc/latex/calctab/README
+++ b/Master/texmf-dist/doc/latex/calctab/README
@@ -1,27 +1,38 @@
calctab package - A language for numeric tables
-version 0.6 2009/03/28
+version 0.6.1 2009/07/12
1 - Introduction
-The calctab package helps the user to typeset a kind of economic table such as invoices, expense notes and liquidation, or other tabular material with a values columns.
-The code computes sum and percentage with floating point numeric method (with the fltpoint package by Eckhart Guthoehrlein) and builds the render table task.
-Economics items may be are independent values or not like sums and percentage on previous values. The language must be expressive concerning together data and its relationships.
+The calctab package helps the user to typeset a kind of economic table such as invoices,
+expense notes and liquidation, or other tabular material with a values columns.
+The code computes sum and percentage with floating point numeric method (with the fltpoint
+package by Eckhart Guthoehrlein) and builds the render table task.
+Economics items may be are independent values or not like sums and percentage on previous
+values. The language must be expressive concerning together data and its relationships.
2 - Calctab and xcalctab environments
-The calctab environment allow you to typesetting a table with only one values column beside a label and a description columns.
-In the xcalctab environment the values of two columns are multiplied and the result is printed in a third column.
+The calctab environment allow you to typesetting a table with only one values column
+beside a label and a description columns.
+In the xcalctab environment the values of two columns are multiplied and the result
+is printed in a third column.
Please read the calctab user manual for more information and example.
3 - Language
-A standard tabular environment works well but force the user to think in a generic LaTeX language without a conceptual relation among the items. In addition a lot of formatting commands takes the same relevance of the main data.
+A standard tabular environment works well but force the user to think in a generic LaTeX
+language without a conceptual relation among the items. In addition a lot of formatting
+commands takes the same relevance of the main data.
4 - Feedback and language enhancements
-This version waiting for the user help and feedback and somehow a powerful implemented language to adjust all the view property such as row numbering, label type, coloring, etc.
-Finally, I hope in a new infrastructure design which allow to building table with an object oriented language (ool).
+This version waiting for the user help and feedback and somehow a powerful implemented
+language to adjust all the view property such as row numbering, label type, coloring, etc.
+Finally, I hope in a new infrastructure design which allow to building table with an
+object oriented language (ool).
5 - Package license
-This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; either version 1 of the License, or any later version.
+This program can be redistributed and/or modified under the terms of the LaTeX Project
+Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt;
+either version 1 of the License, or any later version.
Happy TeXing!
-Copyright (C) 2009 Roberto Giacomelli -- giaconet at tin dot it
+Copyright (C) 2009 Roberto Giacomelli -- giaconet dot mailbox at gmail dot com
diff --git a/Master/texmf-dist/doc/latex/calctab/calctab_manual.pdf b/Master/texmf-dist/doc/latex/calctab/calctab_manual.pdf
index 28897a1323a..8d8e0307732 100644
--- a/Master/texmf-dist/doc/latex/calctab/calctab_manual.pdf
+++ b/Master/texmf-dist/doc/latex/calctab/calctab_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/calctab/calctab_manual.tex b/Master/texmf-dist/doc/latex/calctab/calctab_manual.tex
index 054afcb4277..5e4d9cce0f0 100644
--- a/Master/texmf-dist/doc/latex/calctab/calctab_manual.tex
+++ b/Master/texmf-dist/doc/latex/calctab/calctab_manual.tex
@@ -1,3 +1,4 @@
+% 0.6.1 - 2009/07/12
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
@@ -8,6 +9,7 @@
bottom=28mm]{geometry}
\usepackage[english]{babel}
+\usepackage{inconsolata}
\usepackage{fancyhdr}
\usepackage{calctab}
@@ -29,7 +31,7 @@
\pagestyle{fancy}
% new command definition section
-\newcommand{\ct}{\textsc{calctab}}
+\newcommand{\ct}{\textsc{calctab}} % calctab package
\newcommand{\pkg}[1]{\textsf{#1}}
\newcommand{\env}[1]{\textsf{#1}}
\newcommand{\cmd}[1]{\texttt{\char`\\#1}}
@@ -37,9 +39,10 @@
\newcommand{\curlyp}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
\newcommand{\squarep}[1]{\texttt{[}\meta{#1}\texttt{]}}
-\author{Roberto Giacomelli\\e-mail: \texttt{giaconet at tin dot it}}
-\date{2009/03/28}
-\title{\ct{} package\\version 0.6}
+\author{Roberto Giacomelli\\
+e-mail: \texttt{giaconet dot mailbox at gmail dot com}}
+\date{2009/07/12}
+\title{\ct{} package\\version 0.6.1}
\begin{document}
\maketitle
@@ -64,24 +67,25 @@ is not an user essential data''
%
%
\section{Introduction}
-The \pkg{calctab} package helps user to typeset a kind of economic table such as invoices, expence notes and liquidation, or other tabular material with numeric columns.
+The \ct{} package helps the user to typeset a kind of economic table such as invoices, expence notes and liquidation, or other tabular material with numeric columns.
-A normal \env{tabular} environment works well but force user to \emph{think} in a generic \LaTeX{} language to reference the object of his work and without a conceptual relation among these. In addition a lot of formatting commands takes the same relevance of the main user data.
+A standard \env{tabular} environment works well but forces the author \emph{to think} in a generic \LaTeX{} language to reference economic object and without a conceptual relation among them. In addition a lot of formatting commands takes the same relevance of the main data, values, text description, etc.
-Economic items maybe are independent values or not like sums and percentages on previous values. The language must be expressive concerning together data and its relations. So, the priority is to add a new language element.
+Economic items maybe are independent values or not, like sums and percentages on previous values. The language must be expressive concerning together data and its relations. So, the priority is to add a new language element.
%
%
%
\section{User manual}
-In this section will be explain the use of the two \ct{} environments \env{calctab} and \env{xcalctab}, first through several examples and then showing its formal syntax.
+This section will be explain the use of the two \ct{} environments \env{calctab} and \env{xcalctab}, first through several examples and then showing its formal syntax.
%
%
+%
\subsection{\env{calctab} and \env{xcalctab} by examples}
%
\subsubsection{A simple table}
-Well, starting with a simple case, consider a list of three entries, a 10\% tax apply on it, and the final sum as showed in the next table:
+Well, starting with a simple case of a list of three entries, a 10\% tax apply on it, and the final sum as showed in the next table:
\begin{calctab}
\amount{First cost}{12500,9}
@@ -91,7 +95,7 @@ Well, starting with a simple case, consider a list of three entries, a 10\% tax
\add{Total cost}
\end{calctab}
-The user can typesetting the example table with the followed code (obviously, the directive \verb=\usepackage{calctab}= must be present in the document preamble).
+The user can typesetting the example table with the followed \ct{} code (obviously, the directive \verb=\usepackage{calctab}= must be present in the document preamble).
{\color{blue}
\begin{Verbatim}[numbers=none]
@@ -111,39 +115,52 @@ The user can typesetting the example table with the followed code (obviously, th
\end{calctab}
\end{Verbatim}
+Probably, is better to show the sum on which the 10\% tax is applied. Look this code:
+
+
+\begin{Verbatim}
+\begin{calctab}
+ \amount{First cost}{12500,9}
+ \amount{Second cost}{8560,03}
+ \amount{Third cost}{9200,45}
+ \add{Partial total} % <-- The 'Partial total' row is not
+ \perc{Tax}{10} % considered in the 'Total cost' sum...
+ \add{Total cost}
+\end{calctab}
+\end{Verbatim}
+
+Since the \cmd{add} command not adds new table element in the stack so is easy to insert a subtotal. This is one of the basic rules implicit in the \env{calctab} environment so you are free to add an \cmd{add} row without you worry about following row's computation. In other words, the \cmd{add} command is a \emph{trasparent} math object.
+
The behaviour of the inner commands is based on these main rules:
\begin{itemize}
\item Each command typeset one table row;
- \item the sequence of commands produce the sequence of the table rows;
- \item the \verb=\perc= and the \verb=\add= commands computes all previous values (with exception to the \verb=\add= row);
- \item optional command argument provides a relation row language to select item or groups of items.
+ \item The sequence of commands produce the sequence of the table rows;
+ \item The \verb=\perc= and the \verb=\add= commands computes all previous values (with exception to the \verb=\add= rows);
+ \item Optional command argument provides a relation rows language to select an item or a group of items.
\end{itemize}
-An independent value is not only a numeric data but also it's defined by a description text. This concept is directly express by the \verb=\amount= command which needs two mandatory arguments: the \emph{description text} and the item \emph{economic consistency}.
+An independent item is not only a numeric data but also it's defined by a description text. This concept is directly express by the \verb=\amount= command which needs two mandatory arguments: the \emph{description text} and the item \emph{numeric consistency}.
-No more different is a percentage object structure with its description text and a numeric value this time not an absolute number but a factor multiply by one hundred calculate on some previous data, and still we can easy express this with the \verb=\perc= command.
+No more different is a percentage object structured in a description text and in a numeric value this time not an absolute number but a \emph{factor} multiply by one hundred applied on some previous data, still we can easy express this with the \verb=\perc= command.
-Finally, we encountered a sum that only needs a description text. The \pkg{calctab} language provides the \verb=\add= command to cover this concept.
+Finally, we encountered a sum that only needs a description text. The \ct{} language provides the \verb=\add= command to cover this concept.
These three commands are available in an environment called \env{calctab} that represents the comprehensive structure of a table.
The code implementation of the inner commands computes the numeric results with the floating point algorithm rounded it with a max of two decimal digit (currently the results are truncated at this fixed precision).
The number of the commands mandatory argument can be negative.
-The \env{calctab} environment manages all the table format elements such as the rows color, the rules, the columns header description text, etc.
-Furthermore, the code executes the data numeric formatting, the font family selection and more.
+The \ct{} environments manages all the table format elements such as the rows color, the rules, the columns header description text, etc. Furthermore, the code executes the data numeric formatting, the font family selection and more. For example, to the rows description text the \verb=\add= and \verb=\perc= commands adds a list of uppercase alphabetical character to explicate the computed rows.
-For example, to the rows description text the \verb=\add= and \verb=\perc= commands adds a list of uppercase alphabetical character to explicate the computed rows.
-
-Potentially all of these \emph{visual} property could be adjust by the \pkg{calctab} user.
+Potentially all of these \emph{visual property} could be adjust by the \ct{} user.
%
\subsubsection{Quantity and price columns}
-The \pkg{calctab} package provides another environment called \env{xcalctab} where the \env{x} character suggests a multiply operation and an extension of the base \env{calctab} too.
-The inner commands are the same already discussed except the \verb=\amount= command that accepts the description test and two numbers indeed only one.
+The \ct{} package provides another environment called \env{xcalctab} where the \env{x} character suggests a multiply operation and an extension of the base \env{calctab} too.
+The inner commands are the same already discussed except the \verb=\amount= command that accepts the description test and \emph{two} numbers indeed only one.
-The final table will appears with three columns typesetting with the two numeric arguments and their product. The next table clarify this structure:
+The final table will appears with three columns typesetting with the two numeric arguments and their product. The following table with its corresponding code clarify this structure:
\begin{xcalctab}
\amount{Newspapers}{3}{1,30}
@@ -175,14 +192,11 @@ The help text A+B+C+D+$\cdots$+\meta{LAST}, will be shorted when the items are m
%
%
\subsubsection{Items relations}
-If more complex tables require \emph{relational} information between rows is necessary to assign to it a names and recall these identifier in a list. This simply way can be achieved with the command optional argument.
+If more complex tables require \emph{relational} information between rows is necessary to assign an items names and to recall later these identifiers in a list. This simply way can be achieved with the command optional argument.
-A name can be assign to a table row by using the \texttt{id} key (a significance name improve code clarity).
-The syntax is based to \meta{key} $=$ \meta{value} assignment, where key is fixed \texttt{id} string.
-Later on, compute sum or percentage only on a subset of previous \pkg{calctab} items, can get recall in a comma separated list, the user row name.
+A name can be assign to a table row by using the \texttt{id} key (a significance name of the key improve code clarity). The syntax is based to \meta{key} $=$ \meta{value} assignment, where key is the fixed \texttt{id} string. Later on, compute sum or percentage only on a subset of previous \pkg{calctab} items, can get recall in a comma separated list, the user row names.
-The next example show the command optional argument at work.
-For example, we want to apply a different discount on each expense or on each group of expense.
+The next example explains the language support to the rows relation by naming with commands optional argument at work. For example, we want to apply a different discount on each expense or on each group of expense.
\begin{calctab}
\amount[id=dinner]{Five dinner}{146}
@@ -192,8 +206,7 @@ For example, we want to apply a different discount on each expense or on each gr
\add{Grand total}
\end{calctab}
-The next \LaTeX{} code explains language support to the rows relation by naming :
-
+\medskip
\begin{Verbatim}
\begin{calctab}
\amount[id=dinner] {Five dinner}{146}
@@ -205,7 +218,7 @@ The next \LaTeX{} code explains language support to the rows relation by naming
\end{Verbatim}
\subsubsection{Subtotals}
-To the table of the last example we will add a subtotal as the sum of the discounts row.
+To the table of the last example we will add a subtotal as the sum of the discount rows. These \cmd{perc} rows handling together own identifiers and a list of previous names (one id name list in this case). As the reader can be notice, the optional \emph{table description} is typeset as a paragraph having the same (variable) table width.
\begin{calctab}[Hotel bill:\\
Period from 12 october 2008 to 18 october 2008 (room 456)]
@@ -231,33 +244,30 @@ Period from 12 october 2008 to 18 october 2008 (room 456)]
\end{calctab}
\end{Verbatim}
-As the reader can be notice, the optional \emph{table description} is typeset as a paragraph having the same (variable) table width.
-
%
%
%
\subsubsection{An arithmetic argument}
-The last example silently uses a feature of the \cmd{amount} command (only for \env{calctab} and not for \env{xcalctab}) available from the package version 0.6. The numeric argument can optionally be a binary math expression. The parse algorithm is very simple and the only syntax allowed are show in Tab.~\ref{tabOper} where \meta{a} and \meta{b} are two decimal numbers.
+The last example silently uses a feature of the \cmd{amount} command (only for \env{calctab} and not for \env{xcalctab}) available from the version 0.6. The numeric argument can optionally be a \emph{binary} math expression. The parse algorithm is very simple and the only syntax allowed are show in Tab.~\ref{tabOper} where \meta{a} and \meta{b} are two decimal numbers.
-\begin{table}
+\begin{table}[bh]
\centering
\caption{\env{calctab} \cmd{amount} command optional binary operation}
\label{tabOper}
-\begin{tabular}{lrr}\toprule
- Floating point & \multicolumn1c{Symbolic} & Numeric \\
- operation & \multicolumn1c{description} & example \\\midrule
-% \emph{Addition} & \meta{a} $+$ \meta{b} & $15{,}20 + 41$\\
- \emph{Addition} & $-$\meta{a} $+$ \meta{b} & $-15{,}20 + 41$\\
- \emph{Subtraction} & \meta{a} $-$ \meta{b} & $15{,}20 - 41$\\
- \emph{Subtraction} & $-$\meta{a} $-$ \meta{b} & $-15{,}20 - 41$\\
- \emph{Multiplication} & \meta{a} $\cdot$ \meta{b} & $15{,}20 \cdot 41$\\
- \emph{Multiplication} & $-$\meta{a} $\cdot$ $-$\meta{b} & $-15{,}20 \cdot -41$\\
- \emph{Division} & \meta{a} $/$ \meta{b} & $15{,}20 / 41$\\
- \emph{Division} & $-$\meta{a} $/$ \meta{b} & $-15{,}20 / 41$\\\bottomrule
+\begin{tabular}{lcc}\toprule
+Floating point operation & Symbolic description & Numeric example\\\midrule
+ \emph{Addition} & \meta{a} $+$ \meta{b} & $15{,}20 + 41$\\
+ \emph{Addition} & $-$\meta{a} $+$ \meta{b} & $-15{,}20 + 41$\\
+ \emph{Subtraction} & \meta{a} $-$ \meta{b} & $15{,}20 - 41$\\
+ \emph{Subtraction} & $-$\meta{a} $-$ \meta{b} & $-15{,}20 - 41$\\
+ \emph{Multiplication} & \meta{a} $\cdot$ \meta{b} & $15{,}20 * 41$\\
+ \emph{Multiplication} & $-$\meta{a} $\cdot$ $-$\meta{b} & $-15{,}20 * -41$\\
+ \emph{Division} & \meta{a} $/$ \meta{b} & $15{,}20 / 41$\\
+ \emph{Division} & $-$\meta{a} $/$ \meta{b} & $-15{,}20 / 41$\\\bottomrule
\end{tabular}
\end{table}
-Sometimes the applied round off number must be show in the table. This is possible because the code report the input user operation. Here is an example.
+Sometimes the applied round off number must be show in the table. This is possible because \env{calctab} reports the \cmd{amount} binary operations. Here is an example.
\begin{calctab}
\amount{A rounded cost}{4506-6}
@@ -274,8 +284,8 @@ Sometimes the applied round off number must be show in the table. This is possib
\end{Verbatim}
-\subsubsection{Sum of the sums}
-In this table a 20\% deduction amount must be apply on the total of the first three values. A solution is to assign a name for each rows and write its list in optional argument of \cmd{perc} command. Nevertheless, this sum is just computed in previus row, thus we can assign a name only to this table row \texttt{\cmd{add}[id=total]\{Total amount of the design task\}}, and later recall the result and then apply percentage on it with the line \texttt{\cmd{perc}[total]\{Deduction\}\{-20\}}.
+\subsubsection{Sum of sums}
+The next table a 20\% deduction amount must be apply on the total of the first three values (see the F row). A solution is to assign a name for each rows and to write its list in the optional argument of \cmd{perc} command. Nevertheless, this sum is just computed in previus row, thus we can assign a name only to row \texttt{\cmd{add}[id=total]\{Total amount of the design task\}}, and later recall the result and then apply percentage on it with the line \texttt{\cmd{perc}[total]\{Deduction\}\{-20\}}.
\begin{calctab}[Plant project Fee Note:\\
Italian restaurant and pizzeria ``La Margherita'']
@@ -299,17 +309,19 @@ The complete code is showed here:
\perc{General expence}{8,55}
\add[id=total]{Total amount of design task}
\perc{Tax}{2}
- \perc{TVA}{20}
+ \perc{VAT}{20}
\perc[total]{Deduction}{-20}
\add{Total}
\end{calctab}
\end{Verbatim}
-\subsubsection{Interval rows selection}
-In an independent values list the idea of interval selection is simply an identification of consecutive elements. So we only need to specify the first and the last group delimiters rows of the series.
-If the first element is not an explicit information the element one becames default and, similary, the last element of whole dataset becames the upper limit if this is not available.
+\subsubsection{Interval selection}
+The \emph{interval} selection of a elements list is simply an identification of consecutive elements. So we only need to specify the first and the last elements delimiters of the series. If the first delimeter is not an explicit information, we can give to the first list element this role. Equally, the default last element of the interval can be the last list element, if one is not available.
-The \ct{} commands \cmd{perc} and \cmd{add} supports an interval selection with \texttt{from} and \texttt{until} keys that referenced row name. For example in this follow table the first five items and the last four are two separated groups.
+The \ct{} commands \cmd{perc} and \cmd{add} supports the interval selection with \texttt{from} and \texttt{until} keys that referenced row name. For example in this follow table the first five items and the last four are two separated groups.
+
+Is possible to combine the key \texttt{until} with the key \texttt{from} in the same optional argument to select a completely defined inner interval.
+In case of a selection overlap, a package warning will be throw at compile time.
\begin{calctab}[The interval selection table]
\amount{One} {100000000}
@@ -324,6 +336,7 @@ The \ct{} commands \cmd{perc} and \cmd{add} supports an interval selection with
\amount{Nine} {9}
\add[until=five]{From one to five}
\add[from=six]{From six to nine}
+ \add[from=five,until=six]{From five to six}
\add{As well as total}
\end{calctab}
@@ -341,14 +354,12 @@ The \ct{} commands \cmd{perc} and \cmd{add} supports an interval selection with
\amount {Nine}{9}
\add[until=five]{From one to five}
\add[from=six]{From six to nine}
+ \add[from=five,until=six]{From five to six} % same of [five,six]
\add{As well as total}
\end{calctab}
\end{Verbatim}
-An inner rule is adding \emph{manually} with the command \cmd{inrule} (that just sounds \emph{inner rule}).
-
-Is possible to combine the key \texttt{until} with the key \texttt{from} in the same optional argument to select a whole inner interval, and a row name list too.
-In case of a selection overlap, a package warning will be throws at compile time.
+An inner rule is adding \emph{manually} to the table with command \cmd{inrule} (that just sounds \emph{inner rule}).
\subsection{Environments formal syntax}
\subsubsection{\env{calctab} syntax}
@@ -367,11 +378,11 @@ The \env{calctab} environment syntax will be described in succession:
The \meta{calctab commands list} is a sequence of the internal commands \cmd{amount}, \cmd{perc}, \cmd{add} and \cmd{inrule}.\medskip
-\noindent\fbox{\cmd{amount}\squarep{key-value list}\curlyp{description}\curlyp{value}}\medskip
+\noindent\fbox{\cmd{amount}\squarep{key-value identifier}\curlyp{description}\curlyp{value}}\medskip
-\meta{key-value list} $=$ \texttt{id=}\meta{rowID};\medskip
+\meta{key-value identifier} $=$ \texttt{id=}\meta{rowID};\medskip
-\meta{description} $=$ Text line;\medskip
+\meta{description} $=$ \meta{text line};\medskip
\meta{value} $=$ \meta{decimal value} or \meta{basic binary operation}.\medskip
@@ -379,7 +390,7 @@ The \meta{calctab commands list} is a sequence of the internal commands \cmd{amo
\meta{key-value list} $=$ \texttt{id=}\meta{rowID}\texttt{,} \texttt{from=}\meta{rowID}\texttt{,} \texttt{until=}\meta{rowID}\texttt{,} \meta{rowID~list};\medskip
-\meta{description} $=$ Text line;\medskip
+\meta{description} $=$ \meta{text line};\medskip
\meta{value} $=$ \meta{percentage decimal value}.\medskip
@@ -387,7 +398,7 @@ The \meta{calctab commands list} is a sequence of the internal commands \cmd{amo
\meta{key-value list} $=$ \texttt{id=}\meta{rowID}\texttt{,} \texttt{from=}\meta{rowID}\texttt{,} \texttt{until=}\meta{rowID}\texttt{,} \meta{rowID~list};\medskip
-\meta{description} $=$ Text line.\medskip
+\meta{description} $=$ \meta{text line}.\medskip
\noindent\fbox{\cmd{inrule}}\medskip
@@ -409,11 +420,11 @@ The \pkg{xcalctab} environment syntax will be described in the next paragraph:
The \meta{xcalctab commands list} is a sequence of the internal commands \cmd{amount}, \cmd{perc}, \cmd{add} and \cmd{inrule}.\medskip
-\noindent\fbox{\cmd{amount}\squarep{key-value list}\curlyp{description}\curlyp{value1}\curlyp{value2}}\medskip
+\noindent\fbox{\cmd{amount}\squarep{key-value identifier}\curlyp{description}\curlyp{value1}\curlyp{value2}}\medskip
-\meta{key-value list} $=$ \texttt{id=}\meta{rowID};\medskip
+\meta{key-value identifier} $=$ \texttt{id=}\meta{rowID};\medskip
-\meta{description} $=$ Text line;\medskip
+\meta{description} $=$ \meta{text line};\medskip
\meta{value1} $=$ \meta{decimal value};\medskip
@@ -424,7 +435,7 @@ The \meta{xcalctab commands list} is a sequence of the internal commands \cmd{am
\meta{key-value list} $=$ \texttt{id=}\meta{rowID}\texttt{,} \texttt{from=}\meta{rowID}\texttt{,}
\texttt{until=}\meta{rowID}\texttt{,} \meta{rowID~list};\medskip
-\meta{description} $=$ Text line;\medskip
+\meta{description} $=$ \meta{text line};\medskip
\meta{value} $=$ \meta{percentage decimal value}.\medskip
@@ -432,7 +443,7 @@ The \meta{xcalctab commands list} is a sequence of the internal commands \cmd{am
\meta{key-value list} $=$ \texttt{id=}\meta{rowID}\texttt{,} \texttt{from=}\meta{rowID}\texttt{,} \texttt{until=}\meta{rowID}\texttt{,} \meta{rowID~list};\medskip
-\meta{description} $=$ Text line.\medskip
+\meta{description} $=$ \meta{text line}.\medskip
\noindent\fbox{\cmd{inrule}}\medskip
@@ -470,7 +481,7 @@ A table example show explicit assignment of the description text and currency un
\add{Grand total}
\end{calctab}
-The default english text in percentage row can be changed in the same way with the command \cmd{ctontranslation}
+The default english text in percentage row can be changed in the same way with the command \cmd{ctontranslation}.
\bigskip
\noindent\fbox{\cmd{ctontranslation}\curlyp{on traslation}}
@@ -479,17 +490,98 @@ The default english text in percentage row can be changed in the same way with t
and the headers of the two \env{xcalctab} numeric columns can be setting with
\bigskip
-\noindent\fbox{\cmd{ctheaderone}\curlyp{first col text header}}
-\noindent\fbox{\cmd{ctheadertwo}\curlyp{second col text header}}
+\noindent\fbox{\cmd{ctheaderone}\curlyp{first text header}}
+\noindent\fbox{\cmd{ctheadertwo}\curlyp{second text header}}
%
%
%
-\subsection{Increment the table width}
+\subsection{Incrementing the table width}
The width of the \ct{} table can be adjust via a standard \LaTeX{} length called \cmd{ctsep} (default value is 8mm). The horizontal space will be add to the central column of the table. The next line is an example:
\medskip
\texttt{\cmd{setlength}\{\cmd{ctsep}\}\{28pt\}}
+
+%
+%
+%
+\newcommand{\closetable}[1][10]{
+\add{Subtotal}
+\perc{Tax}{#1}
+\add{Total}
+}
+%
+\newcommand{\billtab}[2][10]{%
+\begin{calctab}[This is my table]
+\amount{Confirmed cost}{#2}
+\perc{Tax}{#1}
+\add{Total}
+\end{calctab}}
+%
+\ctdescription{Description}
+\ctcurrency{\euro}
+%
+%
+%
+\subsection{New command with \ct{} environments}
+Some cases requires repetitive tasks with tables. How \ct{} can help to do these?
+
+\subsubsection{One command, one table}
+A table similar to \env{calctab} basic structure can to be build with a unique command.
+
+\begin{Verbatim}
+\newcommand{\billtab}[2][10]{% two arg command
+\begin{calctab}[This is my table]
+\amount{Confirmed cost}{#2}
+\perc{Tax}{#1}
+\add{Total}
+\end{calctab}}
+\end{Verbatim}
+
+When you write: \verb=\billtab{2800}= you achieved this table:
+
+\billtab{2800}\bigskip
+
+and with the command \verb=\billtab[20]{2000}= you achieved:
+
+\billtab[20]{2000}
+
+%
+%
+%
+\subsubsection{Inner table command}
+
+Sometimes is useful to insert only one command to insert several rows of \ct{} computation. The next code is an example.
+
+\begin{Verbatim}
+\newcommand{\closetable}[1][10]{
+\add{Subtotal}
+\perc{Tax}{#1}
+\add{Total}
+}
+\end{Verbatim}
+
+With this command the user can write shortly:
+
+\begin{Verbatim}
+\begin{calctab}
+ \amount{Cost}{1200}
+ \amount{Save pricing}{-400}
+ \closetable
+\end{calctab}
+\end{Verbatim}
+
+\begin{calctab}
+ \amount{Cost}{1200}
+ \amount{Save pricing}{-400}
+ \closetable
+\end{calctab}
+
+
+
+%
+%
+%
\section{\ct{} idea}
The language efficacy is particularly important for the \LaTeX{} user. The \ct{} underline concept is to build an expressive language for the model -- view paradigm.
@@ -505,7 +597,7 @@ This list report tasks:
\item write in good english the package documentation;
\item internationalization of the fixed text in table and the currency unit;
\item data input and inner commands language development;
- \item new infrastructure to manage the table view property;
+ \item new infrastructure to manage the table view properties;
\item \dots
\end{itemize}
@@ -527,37 +619,40 @@ Thanks GuIT\emph{meeting}2008 people, thanks Norbert.
Thanks a lot to Professor Enrico Gregorio for help me to resolve some code problem: balance the table description paragraph width to the table variable width, save in a tokens registry the material of table so as over the implicit group barrier of the tabular cells, and solve consequent \verb=\expandafter= \emph{jungle}.
-Thanks a lot to the authors of packages used by \pkg{calctab}.
+Thanks a lot to the authors of the packages used by \pkg{calctab}.
And finally, thanks to my family.
-Every comment are welcome as well as any language discussion, so don't esitate to send to the author an e-mail message with your opinion, suggestion or desiderata. Thank you.
+Every comment are welcome as well as any language discussion, so don't esitate to send to me an e-mail message with your opinion, suggestion or desiderata, or to leave a public comment in my site blog\footnote{Blog site address: \url{http://robitex.wordpress.com/calctab-package/}}. Thank you.
+
\section{Change history}
-\begin{tabular}{lcp{257pt}}\toprule
- Number & Date & Improvement description\\\midrule
- 0.5 & 2009/02/23 & first \ct{} CTAN release\\\midrule
- 0.6.1 & 2009/03/03 & New \cmd{inrule} command to manual 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 \env{xcalctab} environment (extended environment
- with the ``quantity'' and ``price'' columns)\\
- 0.6.4 & 2009/03/10 & New feature: automatic short of the description
- string (A+B+C+$\cdots$) if it's long than more five items\\
- 0.6.5 & 2009/03/10 & Substituted the standard \LaTeX{} command \cmd{Alph}
- with \cmd{AlphAlph} by Heiko Oberdiek to eliminate the 26 rows limit in
- label column\\
- 0.6.6 & 2009/03/12 & New feature for \cmd{amount} command: basic binary
- operation with two numbers thanks to \pkg{xstring} package\\
- 0.6.7 & 2009/03/12 & Some minor internal code adjustments\\\bottomrule
+\begin{tabular}{lccp{247pt}}\toprule
+ Ver. & N. & Date & Improvement description\\\midrule
+ 0.5 & & 2009/02/23 & first \ct{} CTAN release\\\midrule
+ & 1 & 2009/03/03 & New \cmd{inrule} command to manual draw a rule
+ among the table rows\\
+ & 2 & 2009/03/03 & Fixed bug: the absense of a rule after an add row\\
+ & 3 & 2009/03/05 & New \env{xcalctab} environment (extended environment
+ with the ``quantity'' and ``price'' columns)\\
+ & 4 & 2009/03/10 & New feature: automatic short of the description
+ string (A+B+C+$\cdots$) if it's long than more five items\\
+ & 5 & 2009/03/10 & Substituted the standard \LaTeX{} command \cmd{Alph}
+ with \cmd{AlphAlph} by Heiko Oberdiek to eliminate
+ the 26 rows limit in label column\\
+ & 6 & 2009/03/12 & New feature for \cmd{amount} command: basic binary
+ operation with two numbers implemented with the \pkg{xstring}
+ package\\
+ & 7 & 2009/03/12 & Some minor internal code adjustments\\\midrule
+ 0.6 & & 2009/03/29 & CTAN upload of the new version\\\midrule
+ & 1 & 2009/06/26 & Fixed parsing of negative numbers in the \cmd{amount}
+ command binary operations\\
+ & 2 & 2009/07/12 & User manual improvement\\\midrule
+ 0.6.1 & & 2009/07/14 & CTAN upload of the maintenance release\\\bottomrule
\end{tabular}
-
-
-
-
\end{document}
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 <giaconet at tin dot it>
+% Copyright (C) 2009 Roberto Giacomelli <giaconet dot mailbox at gmail dot com>
%
% 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