summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-03-21 01:00:42 +0000
committerKarl Berry <karl@freefriends.org>2009-03-21 01:00:42 +0000
commit00f237a3453838bbf26f9e9588a8689216c10a6b (patch)
tree78d4d608ace2a162d6e81c55ae26b175ca745780
parentccda74df68c8c59e050534aff356bb3bd9f95755 (diff)
new latex package tabularcalc 0.1 (19mar09)
git-svn-id: svn://tug.org/texlive/trunk@12476 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tabularcalc/README37
-rw-r--r--Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.pdfbin0 -> 158426 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.tex716
-rw-r--r--Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.pdfbin0 -> 160898 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.tex708
-rw-r--r--Master/texmf-dist/tex/latex/tabularcalc/tabularcalc.sty316
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/tabularcalc.tlpsrc2
9 files changed, 1782 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/tabularcalc/README b/Master/texmf-dist/doc/latex/tabularcalc/README
new file mode 100644
index 00000000000..e7041fc558c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabularcalc/README
@@ -0,0 +1,37 @@
+ _________________
+
+ tabularcalc package
+ v0.1
+ _________________
+
+Given a list of numbers and one (or more) formulas, this package allows
+with an easy syntax to build a table of values, i.e a tables in which
+the first row contains the list of numbers, and the other rows contain
+the calculated values of the formulas for each number of the list.
+
+The table can be built either horizontally or vertically, and it is
+fully customizable (height of rows, columns and lines types). Moreover,
+the content of any cell can be easily hidden.
+
+Other local effects are possible since a command allows to execute any
+code in any particular cell.
+
+#######################################################################
+
+Étant donné une liste de nombres et une ou plusieurs formules à une
+variable, cette extention, à l'aide d'une syntaxe simple, construit un
+tableau de valeurs, c'est-à-dire un tableau dont la première ligne
+contient les nombres les autres lignes les résultats pris par la (ou
+les) formules pour chacun des nombres de la liste.
+
+Le tableau peut être construit horizontalement ou verticalement, et il
+est entièrement personnalisable, autant du point de vue des filets,
+que de la hauteur des lignes ou que des types de colonnes. De plus, le
+contenu de n'importe quelle cellule du tableau peut être masqué.
+
+Des effets encore plus précis sont possibles puisqu'une commande permet
+de faire exécuter n'importe quel code dans une cellule particulière.
+
+
+ C Tellechea
+ <unbonpetit@gmail.com> \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.pdf b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.pdf
new file mode 100644
index 00000000000..b9946dc23c1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.tex b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.tex
new file mode 100644
index 00000000000..3c80ac6e3d0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_en.tex
@@ -0,0 +1,716 @@
+% Ceci est tabularcalc_doc_fr.tex, le manuel en français de tabularcalc
+% This is tabularcalc_doc_fr.tex, the french manual of tabularcalc
+%
+% Christian Tellechea 2009
+%
+% email : unbonpetit@gmail.com
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper,10pt]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[a4paper,dvips,colorlinks=true,hyperfootnotes=false,filecolor=black,linkcolor=blue,urlcolor=magenta,bookmarks=false,pdfauthor={Christian TELLECHEA},pdftitle={tabularcalc},pdfsubject={package for tables of values},pdfkeywords={tabularcalc},pdfcreator={LaTeX}]{hyperref}
+\usepackage[a4paper,dvips,margin=2.75cm]{geometry}
+\usepackage{amsmath}
+\usepackage[autolanguage]{numprint}
+\usepackage{colortbl}
+\usepackage{xcolor}
+\usepackage{lmodern}
+\usepackage{xspace}
+\usepackage{listings}
+\usepackage{fp}
+\usepackage{pgfmath}
+\usepackage{tabularcalc}
+\usepackage[frenchb,english]{babel}
+\makeatletter
+\definecolor{tc@bckgcolor}{rgb}{1,1,0.875}
+\definecolor{tc@keywordstc}{rgb}{0.7,0,0}
+\definecolor{tc@keywordslatex}{rgb}{0,0,1}
+\definecolor{tc@arguments}{rgb}{0,0,0}
+\definecolor{tc@comments}{rgb}{0.5,0.5,0.5}
+\lstset{%
+ language=[AlLaTeX]TeX,%
+ morekeywords={numexpr},%
+ float=hbp,%
+ basicstyle=\small\ttfamily,%
+ identifierstyle=\color{tc@arguments},%
+ keywordstyle=\color{tc@keywordslatex},%
+ commentstyle=\itshape\color{tc@comments},%
+ columns=fixed,%
+ tabsize=4,%
+ frame=single,%
+ extendedchars=true,%
+ showspaces=false,%
+ showstringspaces=false,%
+ numbers=left,%
+ numberstyle=\tiny\ttfamily,%
+ breaklines=true,%
+ breakindent=3em,%
+ backgroundcolor=\color{tc@bckgcolor},%
+ breakautoindent=true,%
+ captionpos=t,%
+ xleftmargin=1em,%
+ xrightmargin=1em,%
+ lineskip=0pt,%
+ numbersep=1em,
+ classoffset=1,%
+ morekeywords={% les macros et commandes de tabularcalc
+ tccol,tclin,%
+ htablecalc,vtablecalc,%
+ noshowmark,startline,resetcellcode,edefcellcode,defcellcode,%
+ sethrule,resethrule,setcoltype,resetcoltype,%
+ printvalue,printresult,numberletter,listsep,%
+ tc@evalexpr,tc@currentresult},%
+ keywordstyle=\color{tc@keywordstc},%
+ classoffset=0}
+\makeatother
+
+\newcommand\guill[1]{\og{}#1\fg{}}
+\newcommand\argu[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand\ARGU[1]{\texttt{\color{black}\{}\argu{#1}\texttt{\color{black}\}}}
+\newcommand\arguC[1]{\texttt{\color{black}[}\argu{#1}\texttt{\color{black}]}}
+
+\newcommand\tbcalc{\textsf{tabularcalc}\xspace}
+\newcommand\verbinline{\lstinline[breaklines=false,basicstyle=\normalsize\ttfamily]}
+\newcommand\mywidth{0.75\linewidth}
+
+\begin{document}
+\selectlanguage{english}
+\npthousandthpartsep{\;}
+\setlength{\parindent}{0pt}
+\begin{titlepage}
+ \null\par\vfill
+ \begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{center}
+ \Huge\bfseries \tbcalc\par\vspace{5pt}
+ \small v\tabularcalcversion\par\vspace{25pt}
+ \normalsize User's manual
+ \end{center}
+ \end{minipage}
+ \end{center}
+ \vspace{1cm}
+ \begin{center}
+ Christian {\sc Tellechea}\par\small
+ \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{unbonpetit@gmail.com}}}\par\vspace{5pt}
+ \tabularcalcenglishdate
+ \end{center}
+ \vfill\hrulefill
+ \begin{center}
+ \begin{minipage}{0.85\linewidth}
+ \noindent
+ \hfill\textbf{\textit{Abstract}}\hfill{}\medskip\par
+ Given a list of numbers and one (or more) formulas, this package allows with an easy syntax to build a table of values, i.e a tables in which the first row contains the list of numbers, and the other rows contain the \emph{calculated} values of the formulas for each number of the list:
+ \begin{center}
+ \sethrule{\hline}{\hline\hline}{\hline}
+ \def\printvalue#1{\IfInteger{#1}{\nprounddigits{0}}{}\numprint{#1}}
+ \def\printresult#1#2{\IfInteger{#1}{\nprounddigits{0}}{}\numprint{#1}}
+ \setcoltype{|c|}{>{\centering\arraybackslash}m{1.25cm}|}
+ \htablecalc[3]{$x$}{-4,-2,0,2.25,7}{$f(x)=2x-3$}{2*x-3}{$x^2$}{x*x}{$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+ \end{center}
+ The table can be built either horizontally or vertically, and it is fully customizable (height of rows, columns and lines types). Moreover, the content of any cell can be easily hidden.\smallskip
+
+ Other local effects are possible since a command allows to execute any code in any particular cell.
+ \end{minipage}
+ \end{center}
+ \hrulefill\vfill{}
+\end{titlepage}
+
+\tableofcontents
+\bigskip
+
+\textbf{Attention}: this manual is the laboured\footnote{Indeed, I \textbf{do not speak english}, and I did my best to achieve this translation. Please, be indulgent, and try to take my place and imagine what it would be for you if you had to translate a manual into french, with some old poor school knowledge!} translation of the french manual.
+
+\section{Introduction}
+This package needs \LaTeX$2\varepsilon$, and if it has not been done before, loads the following packages: \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/math/}{\texttt{\textbf{pgfmath}}}, \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xstring/}{\texttt{\textbf{xstring}}} and \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}}. It makes easily possible to build tables of calculated results coming from formulas for a given list of values. Tables are displayed using the standard \verb|tabular|\footnote{For the moment, the \texttt{tabular} environment is hard coded, but it will probably be possible in the next version to let the user choose another table environment: \texttt{tabularx}, \texttt{tabulary}, \texttt{supertabular}, etc.} environment.
+
+The package is called with the usual command \verbinline|\usepackage{tabularcalc}|\smallskip
+
+This package is not intended to compete with the excellent \href{http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/}{\texttt{\textbf{pgfplotstable}}} package of Christian \textsc{Feuers\"anger} which has much more extended features, but in compensation, has a difficult to learn syntax. \tbcalc is meant to be more modest and gives priority to customization and easy syntax.\medskip
+
+For calculation, the computation of an arithmetic expression such as \verb|2*x*x-5*x+7| when \hbox{\verb|x = 2.7|} is with \TeX{}, a very complex thing that \tbcalc does not make. It leaves this task to a computation engine: "pgfmath" by default. This is why \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/math/}{\texttt{\textbf{pgfmath}}} is loaded. It is possible to choose an other computation engine, see page~\pageref{changemoteurcalcul}.\smallskip
+
+To display decimal numbers, in my view, nothing is better than the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} package. This is why it is loaded. The engine used to display decimal numbers can be changed or customized, see page~\pageref{persoaffichage}.\medskip
+
+To define vocabulary for later use, in the simple tables below, red numbers are the "{\color{red}values}", blue numbers are the "{\color{blue}results}" and brown texts are the "{\color{brown}labels}". The cell on the up-left corner is the "cell(0,0)":
+
+\begin{minipage}{0.5\linewidth}
+\begin{center}
+{\scriptsize Horizontal table}\par\nobreak\smallskip
+\def\printvalue#1{\color{red}$#1$}
+\def\printresult#1#2{\color{blue}\IfInteger{#1}{$\number\integerpart$}{$#1$}}
+\htablecalc[3]{cell (0,0)}{-5,-1,0,3,10}{\color{brown}$x$}{x}{\color{brown}$2x$}{2*x}{\color{brown}$3x$}{3*x}
+\end{center}
+\end{minipage}%
+\begin{minipage}{0.5\linewidth}
+\begin{center}
+{\scriptsize Vertical table}\par\nobreak\smallskip
+\def\printvalue#1{\color{red}$#1$}
+\def\printresult#1#2{\color{blue}\IfInteger{#1}{$\number\integerpart$}{$#1$}}
+\vtablecalc[3]{cell (0,0)}{-5,-1,0,3,10}{\color{brown}$x$}{x}{\color{brown}$2x$}{2*x}{\color{brown}$3x$}{3*x}
+\end{center}
+\end{minipage}
+
+\section{Basic features}
+\subsection{Horizontal tables}
+The macro \verbinline|\htablecalc| builds horizontal table whose first row contains the "values" and the other rows the "results". The syntax is:\smallskip
+
+\setbox0=\hbox{\verbinline|\htablecalc|\arguC{number}}
+\verbinline|\htablecalc|\arguC{number}\ARGU{cell (0,0)}\ARGU{value list}\par
+\hskip\wd0\ARGU{label 1}\ARGU{formula 1}\par
+\hskip\wd0\ARGU{label 2}\ARGU{formula 2}\par
+\hskip\wd0\ldots\par
+\hskip\wd0\ARGU{label n}\ARGU{formula n}\medskip
+
+where :\parindent1.5em
+\begin{itemize}
+ \item \argu{number} is the number of formulas (1 by default);
+ \item \argu{cell (0,0)} is the content of the cell (0,0);
+ \item \argu{value list} is the list of values, separated with a comma. Two consecutive commas make an empty column;
+ \item \argu{label i} is the i${}^\text{th}$ label;
+ \item \argu{formula i} is the $i^\text{th}$ formula, used to calculate the reults of the $i^\text{th}$ row. In formulas, \verb|x| is the variable.
+\end{itemize}\parindent0em
+\medskip
+
+
+The variable "\verb|x|" is the expansion of \verbinline|\numberletter|, and at any moment, it is possible to redefine it to another letter, "\verb|y|" for example with a \verbinline|\def\numberletter{y}|.\smallskip
+
+In the list of values, a comma separate values by default. This comma is the expansion of \verbinline|\listsep|, and can be changed to "|" for example with \verbinline=\def\listsep{|}=\medskip
+
+For a first example, here is a try to obtain the table of the first page:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\smallskip
+\end{minipage}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+This table is not strictly the same than the table of the first page: integer results have a "0" as decimal part, columns containing results do not have the same width and the line at the bottom of the first row is different.
+
+\subsection{Vertical tables}
+The macro \verbinline|\vtablecalc| builds vertical table whose first column contains the "values" and the other rows the "results". The syntax is:\smallskip
+
+
+\setbox0=\hbox{\verbinline|\vtablecalc|\arguC{number}}
+\verbinline|\vtablecalc|\arguC{number}\ARGU{cell (0,0)}\ARGU{value list}\par
+\hskip\wd0\ARGU{label 1}\ARGU{formula 1}\par
+\hskip\wd0\ARGU{label 2}\ARGU{formula 2}\par
+\hskip\wd0\ldots\par
+\hskip\wd0\ARGU{label n}\ARGU{formula n}\medskip
+
+where :\parindent1.5em
+\begin{itemize}
+ \item \argu{number} is the number of formulas (1 by default);
+ \item \argu{value list} is the list of values, separated with a comma;
+ \item \argu{label i} is the $i^\text{th}$ label;
+ \item \argu{formula i} is the $i^\text{th}$ formula, used to calculate the reults of the $i^\text{th}$ column.
+\end{itemize}\parindent0em
+\medskip
+
+Here is the previous table, but vertically built:\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\vtablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\vtablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+
+\subsection{How to hide numbers}
+The content of any cell can be hidden, as well as in a horizontal or vertical table.
+
+\subsubsection{Hide a value}
+In the list of values, a "\verb|@|" before a value hides it. In the following example, the second and fifth values are hidden:\smallskip
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4,@-2,0,2.25,@7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\htablecalc[3]{$x$}{-4,@-2,0,2.25,@7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+\medskip
+
+Behind the scene, the "\verb|@|" token is the expansion of \verbinline|\noshowmark|. To change this token to "=", this simple code does the job: \verbinline|\def\noshowmark{=}|
+
+\subsubsection{Hide a result}
+If a value is followed by $[a_1][a_2]\ldots[a_n]$ where the numbers $a_i$ are increasing, the results number $a_1,a_2,\ldots,a_n$ will be hidden. If a number $a_j=0$, all the others $a_k$ where $k>j$ will be ignored and the results following the previous hidden result will be hidden.\medskip
+
+In the example, with the list of values "\verb|-4[2],-2,0[1][3],2.25[0],7[2][0]|", we are going to:\parindent1.5em
+\begin{itemize}
+ \item hide the second result of the first value with "\verb|-4[2]|"
+ \item let all the results visible for the second value with "\verb|-2|"
+ \item hide the results number 1 and 3 of the third value with "\verb|0[1][3]|"
+ \item hide all the results of the fourth value with "\verb|2.25[0]|"
+ \item for the fifth value, hide all the results from the second with "\verb|7[2][0]|"
+\end{itemize}\parindent0em
+
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4[2],-2,0[1][3],2.25[0],7[2][0]}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\htablecalc[3]{$x$}{-4[2],-2,0[1][3],2.25[0],7[2][0]}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+This feature can be mixed with "\verb|@|" to hide a value and results.
+
+\subsection{Height of rows}
+At the begining of a row, when it is displayed, the macro \verbinline|\startline| runs.
+
+By default, this command is defined by: \verbinline|\def\startline{\rule[-1.2ex]{0pt}{4ex}}|. Its expansion is a "strut" which adjusts the height of the row. Here is this strut, made visible before the lettre "a": \rule[-1.2ex]{2pt}{4ex}a\medskip
+
+Any other action, or another strut can be defined:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\startline{%
+ {\bfseries\number\tclin)\ }%
+}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\startline{%
+ {\bfseries\number\tclin)\ }%
+}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+Here, no strut is defined (the lines recover their natural height), and at line 2 of the code, the number of the row (contained in the counter \verbinline|\tclin|) is displayed with bold chars.
+
+\subsection{Horizontal lines}
+\tbcalc allows to define 3 types of horizontal lines. The macro \verbinline|\sethrule| has 3 arguments:
+
+\parindent1.5em
+\begin{itemize}
+ \item the first that we call "line 0" is displayed on the top and bottom of the table;
+ \item the second, "line 1", is displayed at the bottom of the first row;
+ \item the third, "other lines", is displayed at the bottom of the other rows, excepted the last one which is the bottom of the table.
+\end{itemize}\parindent0em
+Here is the syntax:
+
+\verbinline|\sethrule|\ARGU{line 0}\ARGU{line 1}\ARGU{other lines}
+\medskip
+
+By default, the three arguments contain \verbinline|\hline|.\medskip
+
+This is an example in which the "line 1" is a double line, and the "other lines" are not drawn:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\sethrule{\hline}{\hline\hline}{}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\sethrule{\hline}{\hline\hline}{}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+The command \verbinline|\resethrule| resets the defined lines and restores the default lines.
+
+\subsection{Customizing columns}
+\subsubsection{Vertical lines}
+2 types of column can be defined: the type of the left one and the type of others columns. The command \verbinline|\setcoltype| has an optionnal argument and 2 mandatory arguments:
+\begin{itemize}
+ \item the optional argument, empty by default, defines the vertical lines at the right of the table;
+ \item the "type 1" of the first column, set to "\verb-|c|-" by default;
+ \item the "type 2" of the other colunms, set to "\verb-c|-" by default.
+\end{itemize}\medskip
+
+The syntax of the command is:\par\nobreak
+\verbinline|\setcoltype|\arguC{right lines}\ARGU{type 1}\ARGU{type 2}\medskip
+
+In this example, a double line is displayed at the right of the table (\verb=[||]=), and on the edges of the first column (\verb=||c||=). The other columns do not have vertical lines (\verb|c|):
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\setcoltype[||]{||c||}{c}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\setcoltype[||]{||c||}{c}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+\verbinline|\resetcoltype| restores the default vertical lines.
+
+\subsubsection{Width of columns}
+Instead of the usual column type "\verb|c|" used until now, other types of column can be specified: for example, the "\verb|m|" type of the \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/basiclayer/}{\texttt{\textbf{array}}} package allows to set the width of columns this way: \verb|m{1.5cm}|.\medskip
+
+In this example, the first column is right aligned, and the other columns are centered and \numprint[cm]{1.5} width:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{array}
+\setcoltype{|r|}{>{\centering\arraybackslash}m{1.5cm}|}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\setcoltype{|r|}{>{\centering\arraybackslash}m{1.5cm}|}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+
+\section{Advanced customization}
+\subsection{How to execute a code in a cell}
+The command \verbinline|\defcellcode| allows to execute any code in a unique cell, or in every cells of a row or in every cells of a column. Cells have the following coordinates:
+
+\begin{center}
+ \def\printvalue#1{}\def\printresult#1#2{}
+ \edefcellcode{}{}{(\number\tclin,\number\tccol)}
+ \htablecalc[3]{}{1,2,3,4,5}{}{}{}{}{}{}
+\end{center}
+\medskip
+
+Here is the syntax:
+
+\verbinline|\defcellcode|\ARGU{number 1}\ARGU{number 2}\ARGU{code}
+\smallskip
+
+where :\parindent1.5em
+\begin{itemize}
+ \item \argu{number 1} is the first coordinate (row number);
+ \item \argu{nombre 2} is the second coordinate (column number);
+ \item \argu{code} is the code executed \emph{when the specified cell is displayed};
+ \item if \argu{number 1} is empty, all the rows are concerned;
+ \item if \argu{nombre 2} is empty, all the columns are concerned;
+\end{itemize}\parindent0em
+\smallskip
+
+Behind the scene, the first coordinate --~the row number~-- is the counter \verbinline{\tclin}, and the number of the column is the counter \verbinline{\tccol}.\smallskip
+
+Notice that the code is expanded when the cell is displayed, and at that moment, the counter \verbinline|\tccol| does not contain anymore the column number of the cell: you should \textbf{not} use \verbinline|\tccol| in the code definied with the macro \verbinline|\defcellcode|. On the other hand, the counter \verbinline|\tclin| does contain the reliable number of the current line.
+
+If codes are defined with \verbinline|\defcellcode| and several of them are runned in the same cell, they will be executed in the same order of their definition.\medskip
+
+In this example, with the package \verb|xcolor|, the cell (2~,~3) is colored in blue, the row 1 in red and the column 4 in brown:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\defcellcode{2}{3}{\color{blue}}
+\defcellcode{1}{}{\color{red}}
+\defcellcode{}{4}{\color{brown}}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\defcellcode{2}{3}{\color{blue}}
+\defcellcode{1}{}{\color{red}}
+\defcellcode{}{4}{\color{brown}}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+Notice that the cell (1~,~4) whose content is {\color{brown}\numprint{2.0}} has been colored in red (line 3 of the code) \emph{and then} in brown (line 4 of the code).\bigskip
+
+Another similar command is provided to execute code in a cell: \verbinline|\edefcellcode|. With this command, the code is expanded a first time with an \verbinline|\edef|\footnote{If a command must not be expanded at this time, a \texttt{\string\noexpand} must be put before it.} when cell is built: at this time, the counter \verbinline|\tccol| does contain the number of the column. Then, the expansion obtained is runned a second time when cell is displayed.\medskip
+
+In this example, text is blue if the column number is greater than 2:
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\edefcellcode{}{}{%
+ \ifnum\tccol>2 \noexpand\color{blue}\fi}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\edefcellcode{}{}{%
+ \ifnum\tccol>2 \noexpand\color{blue}\fi}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+\subsection{Customizing the number display}
+\subsubsection{Macros {\ttfamily\textbackslash printvalue} and {\ttfamily\textbackslash printresult}}\label{persoaffichage}
+To display a value, the macro \verbinline|\printvalue| is called. It requires one argument: the number to display which comes from \verb|pgfcalc|. This argument has a raw format: \verb|12345.6789| for "\numprint{12345.6789}".
+
+By default, \verbinline|\printvalue| is defined with this code:\par\nobreak\smallskip
+\hfill\verbinline|\def\printvalue#1{\numprint{#1}}|\hfill{}
+\smallskip
+
+Notice that the macro \verb|\numprint| is called to print the number.\bigskip
+
+To display a result, the macro \verbinline|\printresult| is called. It requires \textbf{two} arguments: the first is the number to display in raw format coming from \verb|pgfcalc| and the second is the value used to compute the result.
+
+By default, \verbinline|\printresult| is defined with this code:\par\nobreak\smallskip
+\hfill\verbinline|\def\printresult#1#2{\numprint{#1}}|\hfill{}
+\smallskip
+
+Notice that the argument \verb|#2| (the value) is ignored by \verbinline|\printresult|. But it is easy to imagine an example in which it would not be. In this example, a red "\verb|X|" is printed if the lenght of the square (which is argument \verb|#2|) is negative. If not, the result with the unit is printed. For the pleasure of customization, any result less than 10 is printed in blue:\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\def\printresult#1#2{%
+ \ifdim#1pt<10pt\color{blue}\fi
+ \ifdim#2pt<0pt
+ \color{red}\texttt{X}%
+ \else
+ \numprint[cm^2]{#1}%
+ \fi}
+\htablecalc{length}{0.7,-10,3,-2,5,12}
+ {Area of square}{x*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\printresult#1#2{%
+ \ifdim#1pt<10pt\color{blue}\fi
+ \ifdim#2pt<0pt
+ \color{red}\texttt{X}%
+ \else
+ \numprint[cm^2]{#1}%
+ \fi}
+\htablecalc{length}{0.7,-10,3,-2,5,12}{Area of square}{x*x}
+\end{center}
+
+A remark: when the length is \numprint[cm]{0.7}, the result is slightly wrong. It should be \numprint[cm^2]{0.49} instead of \numprint[cm^2]{0.48999}! The \verb|pgfmath| package is not suitable for scientific computation as it is inteded to compute coordinates for drawing purposes. This is why its precision is $\frac{1}{\numprint{100000}}$ and sometimes leads to results including rounding errors such as this one.
+
+\subsubsection{How to control the rounding of numbers}
+With integer results, the \verb|pgfmath| package, though excellent, has a annoying drawback: when the result of the computation is an integer, the returned number has a decimal part "\verb|0|" (see table above). To avoid this, the result can be tested with \verb|\IfInteger| of \verb|xstring| package, and if it is an integer, give to \verb|\numprint| the value of the \verb|\integerpart| counter (see xtring donumentation):
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\printresult#1#2{%
+ \IfInteger{#1}%
+ {\numprint{\number\integerpart}}%
+ {\numprint{#1}}%
+}
+\htablecalc{$x$}{-3,1.56,2.5,3.608}{$2x$}{2*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\printresult#1#2{%
+ \IfInteger{#1}%
+ {\numprint{\number\integerpart}}%
+ {\numprint{#1}}%
+}
+\htablecalc{$x$}{-3,1.56,2.5,3.608}{$2x$}{2*x}
+\end{center}
+It is also possible to force \verb|numprint| to round its argument with the command \verb|\nprounddigits| whose argument is the number of figures of the decimal part. Unfortunately, if needed, unnecessary \verb|0| are added to fill the decimal part to match the number of figures.
+
+\subsubsection{For the fun}
+Other uses of this package can be designed, such as the drawing of a chess board which squares are \numprint[cm]{0.5} long:\par\nobreak\parindent1.5em
+\begin{itemize}
+ \item on line 2, the separators of the table are initialzes at \verb|0pt| to obtain the length of \numprint[cm]{0.5};
+ \item the display of values and results is cancelled at line 3;
+ \item horizontal lines of the top and bottom of the table are drawn (line 4), and vertical lines of the left and right (line 5);
+ \item a strut \numprint[cm]{0.5} height is defined to be displayed at the begining of every row (line 6);
+ \item finally, if the sum of the row number and the column number is odd, the square is filled of gray (line 8 and 9).
+\end{itemize}\parindent0em
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{colortbl,xcolor}
+\arraycolsep=0pt\tabcolsep=0pt
+\def\printvalue#1{}\def\printresult#1#2{}
+\sethrule{\hline}{}{}
+\setcoltype[|]{|m{0.5cm}}{m{0.5cm}}
+\def\startline{\rule[-0.2cm]{0pt}{0.3cm}}
+\edefcellcode{}{}{%
+ \ifodd\numexpr\tccol+\tclin\relax
+ \noexpand\cellcolor{lightgray}\fi
+}
+\htablecalc[7]{}{ , , , , , , }
+ {}{}{}{}{}{}{}{}{}{}{}{}{}{}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\arraycolsep=0pt\tabcolsep=0pt
+\def\printvalue#1{}\def\printresult#1#2{}
+\sethrule{\hline}{}{}
+\setcoltype[|]{|m{0.5cm}}{m{0.5cm}}
+\def\startline{\rule[-0.2cm]{0pt}{0.3cm}}
+\edefcellcode{}{}{%
+ \ifodd\numexpr\tccol+\tclin\relax
+ \noexpand\cellcolor{lightgray}\fi
+}
+\htablecalc[7]{}{ , , , , , , }
+ {}{}{}{}{}{}{}{}{}{}{}{}{}{}
+\end{center}
+
+\section{How to change the computation engine}\label{changemoteurcalcul}
+\verb|pgfmath| is the computation engine used by default, but it can be changed though there is not many other choices: as far as I know, \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} and \href{http://www.ctan.org/tex-archive/macros/generic/xlop/}{\texttt{\textbf{xlop}}} are able to compute math expression under \LaTeX. Both have drawbacks, this is why they are not used by default:\par\nobreak\parindent1.5em
+\begin{itemize}
+ \item "\verb|fp|" uses the Reverse Polish Notation (RPN). It is possible to use the infix notation but the opposite sign "${}-{}$" before a number is not accepted: very annoying for negative values!
+ \item "\verb|xlop|" is not really a computation package as it also prints its results. And unfortunately, only arithmetic calculation is possible.
+\end{itemize}\parindent0em
+\medskip
+
+The macro \verbinline|\tc@evalexpr| is in charge of computation. It has no argument and it works like this: it expands \verbinline|\tc@currentresult| whose expansion is the math expression to compute (for example "\verb|4*2.5*2.5-3*2.5-7|"). It calls the computation engine to achieve the calculation (in this example, it would be \verb|10.5|), and finally it assigns this result to \verbinline|\tc@currentresult|.
+
+By default, the macro \verbinline|\tc@evalexpr| is defined with this code:\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\tc@evalexpr{%
+ \expandafter\pgfmathparse
+ \expandafter{\tc@currentresult}%
+ \let\tc@currentresult\pgfmathresult}
+\end{lstlisting}
+\end{minipage}
+\end{center}
+
+Let us suppose we want to to use the \verb|fp| package for the computation. Let us redefine \verbinline|\tc@evalexpr|:\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPeval\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\end{lstlisting}
+\end{minipage}
+\end{center}
+
+The command \verb|\FPclip| removes unnecessary \verb|0| from the result (see \verb|fp| documentation).
+
+We have done it: the computation engine of \tbcalc is now \verb|fp|:\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{fp}
+\htablecalc{$x$}{0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{2*x*x-0.5}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPeval\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\htablecalc{$x$}{0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{2*x*x-0.5}
+\end{center}
+
+An issue remains: as \verb|fp| does not understand the opposite "${}-{}$" sign before numbers, and a value like "\verb|-3|" would have provoked an error! To circumvent this, the RPN can be used, but \verbinline|\tc@evalexpr| must be modified to tell it that the computation has to be done using the RPN (this is why \verb|\FPupn| is used). Also, \verbinline|\printvalue| must be modified to make it compute with \verb|\FPupn| the values also written in RPN (\verb|3 neg| in the list of values instead of \verb|-3|):\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{fp}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPupn\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\def\printvalue#1{%
+ \FPupn\tempval{#1}%
+ \FPclip\tempval\tempval
+ \numprint\tempval
+}
+\htablecalc{$x$}{3 neg,0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{x x mul 2 mul 0.5 sub}
+\end{lstlisting}
+\end{minipage}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPupn\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\def\printvalue#1{%
+ \FPupn\tempval{#1}%
+ \FPclip\tempval\tempval
+ \numprint\tempval
+}
+\htablecalc{$x$}{3 neg,0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{x x mul 2 mul 0.5 sub}
+\end{center}
+
+\bigskip\bigskip
+\begin{center}
+$\star$\par
+$\star$\quad$\star$
+\end{center}
+\bigskip\bigskip
+
+That's all, I hope you will find this package useful!\par\nobreak
+Please, send me an \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} if you find a bug or if you have any idea of improvement\ldots\par\nobreak\medskip
+Christian \textsc{Tellechea}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.pdf b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.pdf
new file mode 100644
index 00000000000..7f0dad6d9b4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.tex b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.tex
new file mode 100644
index 00000000000..e0f695812db
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tabularcalc/tabularcalc_doc_fr.tex
@@ -0,0 +1,708 @@
+% Ceci est tabularcalc_doc_fr.tex, le manuel en français de tabularcalc
+% This is tabularcalc_doc_fr.tex, the french manual of tabularcalc
+%
+% Christian Tellechea 2009
+%
+% email : unbonpetit@gmail.com
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper,10pt]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[a4paper,dvips,colorlinks=true,hyperfootnotes=false,filecolor=black,linkcolor=blue,urlcolor=magenta,bookmarks=false,pdfauthor={Christian TELLECHEA},pdftitle={tabularcalc},pdfsubject={package pour construction d'un tableau de valeurs},pdfkeywords={tabularcalc},pdfcreator={LaTeX}]{hyperref}
+\usepackage[a4paper,dvips,margin=2.75cm]{geometry}
+\usepackage[autolanguage]{numprint}
+\usepackage{colortbl}
+\usepackage{xcolor}
+\usepackage{lmodern}
+\usepackage{xspace}
+\usepackage{listings}
+\usepackage{fp}
+\usepackage{pgfmath}
+\usepackage{tabularcalc}
+\usepackage[frenchb]{babel}
+\makeatletter
+\definecolor{tc@bckgcolor}{rgb}{1,1,0.875}
+\definecolor{tc@keywordstc}{rgb}{0.7,0,0}
+\definecolor{tc@keywordslatex}{rgb}{0,0,1}
+\definecolor{tc@arguments}{rgb}{0,0,0}
+\definecolor{tc@comments}{rgb}{0.5,0.5,0.5}
+\lstset{%
+ language=[AlLaTeX]TeX,%
+ morekeywords={numexpr},%
+ float=hbp,%
+ basicstyle=\small\ttfamily,%
+ identifierstyle=\color{tc@arguments},%
+ keywordstyle=\color{tc@keywordslatex},%
+ commentstyle=\itshape\color{tc@comments},%
+ columns=fixed,%
+ tabsize=4,%
+ frame=single,%
+ extendedchars=true,%
+ showspaces=false,%
+ showstringspaces=false,%
+ numbers=left,%
+ numberstyle=\tiny\ttfamily,%
+ breaklines=true,%
+ breakindent=3em,%
+ backgroundcolor=\color{tc@bckgcolor},%
+ breakautoindent=true,%
+ captionpos=t,%
+ xleftmargin=1em,%
+ xrightmargin=1em,%
+ lineskip=0pt,%
+ numbersep=1em,
+ classoffset=1,%
+ morekeywords={% les macros et commandes de tabularcalc
+ tccol,tclin,%
+ htablecalc,vtablecalc,%
+ noshowmark,startline,resetcellcode,edefcellcode,defcellcode,%
+ sethrule,resethrule,setcoltype,resetcoltype,%
+ printvalue,printresult,numberletter,listsep,%
+ tc@evalexpr,tc@currentresult},%
+ keywordstyle=\color{tc@keywordstc},%
+ classoffset=0}
+\makeatother
+
+\newcommand\guill[1]{\og{}#1\fg{}}
+\newcommand\argu[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand\ARGU[1]{\texttt{\color{black}\{}\argu{#1}\texttt{\color{black}\}}}
+\newcommand\arguC[1]{\texttt{\color{black}[}\argu{#1}\texttt{\color{black}]}}
+
+\newcommand\tbcalc{\textsf{tabularcalc}\xspace}
+\newcommand\verbinline{\lstinline[breaklines=false,basicstyle=\normalsize\ttfamily]}
+\newcommand\mywidth{0.75\linewidth}
+
+\begin{document}
+\setlength{\parindent}{0pt}
+\begin{titlepage}
+ \null\par\vfill
+ \begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{center}
+ \Huge\bfseries \tbcalc\par\vspace{5pt}
+ \small v\tabularcalcversion\par\vspace{25pt}
+ \normalsize Manuel de l'utilisateur
+ \end{center}
+ \end{minipage}
+ \end{center}
+ \vspace{1cm}
+ \begin{center}
+ Christian {\sc Tellechea}\par\small
+ \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{unbonpetit@gmail.com}}}\par\vspace{5pt}
+ \tabularcalcfrenchdate
+ \end{center}
+ \vfill\hrulefill
+ \begin{center}
+ \begin{minipage}{0.85\linewidth}
+ \noindent
+ \hfill\textbf{\textit{Résumé}}\hfill{}\medskip\par
+ Étant donné une liste de nombres et une ou plusieurs formules à une variable, cette extention, à l'aide d'une syntaxe simple, construit un tableau de valeurs, c'est-à-dire un tableau dont la première ligne contient les nombres les autres lignes les résultats pris par la (ou les) formules pour chacun des nombres de la liste :
+ \begin{center}
+ \sethrule{\hline}{\hline\hline}{\hline}
+ \def\printvalue#1{\IfInteger{#1}{\nprounddigits{0}}{}\numprint{#1}}
+ \def\printresult#1#2{\IfInteger{#1}{\nprounddigits{0}}{}\numprint{#1}}
+ \setcoltype{|c|}{>{\centering\arraybackslash}m{1.25cm}|}
+ \htablecalc[3]{$x$}{-4,-2,0,2.25,7}{$f(x)=2x-3$}{2*x-3}{$x^2$}{x*x}{$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+ \end{center}
+ Le tableau peut être construit horizontalement ou verticalement, et il est entièrement personnalisable, autant du point de vue des filets, que de la hauteur des lignes ou que des types de colonnes. De plus, le contenu de n'importe quelle cellule du tableau peut être masqué.\smallskip
+
+ Des effets encore plus précis sont possibles puisqu'une commande permet de faire exécuter n'importe quel code dans une cellule particulière.
+ \end{minipage}
+ \end{center}
+ \hrulefill\vfill{}
+\end{titlepage}
+
+\tableofcontents
+
+\section{Présentation}
+Ce package \tbcalc nécessite \LaTeX, et charge les packages \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/math/}{\texttt{\textbf{pgfmath}}}, \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xstring/}{\texttt{\textbf{xstring}}} et \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} si ce n'a pas été le cas. Il permet de construire facilement des tableaux de résultats en évaluant des formules dont la variable prend une liste donnée de valeurs. Les tableaux sont affichés avec l'environement standard \verb|tabular|\footnote{Pour l'instant, l'environement \texttt{tabular} est codé en dur dans le package. Rien n'empêchera par la suite de laisser le choix de l'environnement à l'utilisateur \texttt{tabularx}, \texttt{tabulary}, \texttt{supertabular}, etc.}. L'affichage des résultats se fait sous forme décimale.
+
+Le package est appelé avec la traditionnelle instruction \verbinline|\usepackage{tabularcalc}|\smallskip
+
+Ce package n'est pas du tout destiné à entrer en concurrence avec \href{http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/}{\texttt{\textbf{pgfplotstable}}}, l'excellent package de Christian~\textsc{Feuers\"anger}. Ce dernier est en effet bien plus personnalisable que \tbcalc et ses possibilités sont largement plus étendues, au prix cependant d'une syntaxe et d'une difficulté d'utilisation plus grande. \tbcalc se veut plus modeste et privilégie la facilité d'utilisation combinée à des possibilités de personnalisation aisément accessibles (du moins pour les personnalisations cosmétiques).\medskip
+
+Du côté des calculs, l'évaluation d'une expression numérique comme \verb|2*x*x-5*x+7| lorsque \hbox{\verb|x = 2.7|} est, avec \TeX{}, une chose complexe que le package \tbcalc ne réalise pas. Pour cette tâche, il fait appel à un moteur de calcul qui est \og pgfmath\fg par défaut. C'est pourquoi \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/math/}{\texttt{\textbf{pgfmath}}} est chargé s'il ne l'a pas été auparavant. On peut cependant changer de moteur de calcul, voir page~\pageref{changemoteurcalcul}.\smallskip
+
+En ce qui concerne l'affichage des nombres décimaux dans le tableau, de l'avis de l'auteur, rien ne le fait mieux que le package \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}}, ce package est donc également requis. On peut changer le moteur d'affichage des nombres décimaux et/ou entièrement personnaliser l'affichage des nombres (voir page~\pageref{persoaffichage}).\medskip
+
+Pour que des points de vocabulaire soient clairs par la suite, dans les tableaux triviaux ci-dessous, les nombres en rouge sont les \og{\color{red}valeurs}\fg{}, les nombres en bleu sont les \og{\color{blue}résultats}\fg{}, et les textes en brun sont les \og{\color{brown}labels}\fg{}. La cellule en haut à gauche est la \guill{cellule (0,0)}. Ce vocabulaire sera employé ensuite.
+
+\begin{minipage}{0.5\linewidth}
+\begin{center}
+{\scriptsize Tableau horizontal}\par\nobreak\smallskip
+\def\printvalue#1{\color{red}$#1$}
+\def\printresult#1#2{\color{blue}\IfInteger{#1}{$\number\integerpart$}{$#1$}}
+\htablecalc[3]{cellule (0,0)}{-5,-1,0,3,10}{\color{brown}$x$}{x}{\color{brown}$2x$}{2*x}{\color{brown}$3x$}{3*x}
+\end{center}
+\end{minipage}%
+\begin{minipage}{0.5\linewidth}
+\begin{center}
+{\scriptsize Tableau vertical}\par\nobreak\smallskip
+\def\printvalue#1{\color{red}$#1$}
+\def\printresult#1#2{\color{blue}\IfInteger{#1}{$\number\integerpart$}{$#1$}}
+\vtablecalc[3]{cellule (0,0)}{-5,-1,0,3,10}{\color{brown}$x$}{x}{\color{brown}$2x$}{2*x}{\color{brown}$3x$}{3*x}
+\end{center}
+\end{minipage}
+
+\section{Fonctions basiques}
+\subsection{Tableaux horizontaux}
+La commande \verbinline|\htablecalc| permet de construire un tableau de valeur horizontal, dont la 1\iere{} ligne contiendra les valeurs, et les lignes suivantes les résultats. La syntaxe est :\smallskip
+
+\setbox0=\hbox{\verbinline|\htablecalc|\arguC{nombre}}
+\verbinline|\htablecalc|\arguC{nombre}\ARGU{cellule (0,0)}\ARGU{liste val}\par
+\hskip\wd0\ARGU{label 1}\ARGU{formule 1}\par
+\hskip\wd0\ARGU{label 2}\ARGU{formule 2}\par
+\hskip\wd0\ldots\par
+\hskip\wd0\ARGU{label n}\ARGU{formule n}\medskip
+
+où :\parindent1.5em
+\begin{itemize}
+ \item \argu{nombre} est le nombre de formules à évaluer. Ce nombre vaut 1 par défaut;
+ \item \argu{cell(0,0)} est le contenu de la cellule (0,0);
+ \item \argu{liste val} est la liste des valeurs, séparées par une virgule. Noter que les valeurs décimales doivent avoir le point comme séparateur décimal. Si deux virgules se suivent, une colonne vide est affiché;
+ \item \argu{label i} est le i\ieme{} label;
+ \item \argu{formule i} est la i\ieme{} formule qui servira à évaluer les résultats de la i\ieme{} ligne. Dans les formules, \verb|x| est la variable.
+\end{itemize}\parindent0em
+\medskip
+
+La lettre \verb|x| qui représente la variable dans les formules est le développement de \verbinline|\numberletter| et pour changer la variable dans les formules en \verb|y|, il suffit d'écrire : \verbinline|\def\numberletter{y}|.\smallskip
+
+Dans la liste de valeurs, le séparateur par défaut est la virgule qui est le développement de \verbinline|\listsep|, et pour changer ce séparateur en \guill{|} par exemple, il faut écrire : \verbinline=\def\listsep{|}=\medskip
+
+À titre d'exemple, voici un premier essai pour obtenir le tableau de la première page :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\smallskip
+\end{minipage}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+On peut observer que le tableau n'est pas strictement identique à celui de la permière page : les résultats entiers comportent une décimale nulle, les colonnes contenant les résultats ne sont pas toutes de la même largeur et le filet sous la 1\iere{} ligne est différent. Nous verrons comment personnaliser tout cela plus loin.
+
+\subsection{Tableaux verticaux}
+La commande \verbinline|\vtablecalc| permet de construire un tableau de valeur vertical, dont la 1\iere{} colonne contiendra les valeurs, et les colonnes suivantes les résultats. La syntaxe est :\smallskip
+
+\setbox0=\hbox{\verbinline|\vtablecalc|\arguC{nombre}}
+\verbinline|\vtablecalc|\arguC{nombre}\ARGU{cellule (0,0)}\ARGU{liste val}\par
+\hskip\wd0\ARGU{label 1}\ARGU{formule 1}\par
+\hskip\wd0\ARGU{label 2}\ARGU{formule 2}\par
+\hskip\wd0\ldots\par
+\hskip\wd0\ARGU{label n}\ARGU{formule n}\medskip
+
+où :\parindent1.5em
+\begin{itemize}
+ \item \argu{nombre} est le nombre de formules à évaluer. Ce nombre vaut 1 par défaut;
+ \item \argu{liste val} est la liste des valeurs, séparées par une virgule. Noter que les valeurs décimales doivent avoir le point comme séparateur décimal;
+ \item \argu{label i} est le i\ieme{} label;
+ \item \argu{formule i} est la i\ieme{} formule qui servira à évaluer les résultats de la i\ieme{} colonne. Dans les formules, \verb|x| est la variable.
+\end{itemize}\parindent0em
+\medskip
+
+À titre d'exemple, voici le tableau précédent présenté verticalement :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\vtablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\vtablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+
+\subsection{Masquer des cellules}
+On peut masquer le contenu de n'importe quelle celule, aussi bien dans un tableau horizontal que vertical.
+
+\subsubsection{Masquer une valeur}
+Si on veut masquer une valeur, il suffit de la faire précéder d'un \og\verb|@|\fg dans la liste. Dans l'exemple suivant, on masque la 2\ieme{} et la 5\ieme{} valeur :\smallskip
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4,@-2,0,2.25,@7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\htablecalc[3]{$x$}{-4,@-2,0,2.25,@7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+\medskip
+
+Le token \og\verb|@|\fg est en réalité le développement de la commande \verbinline|\noshowmark|. Pour changer le token qui masque une valeur, il suffit de redéfinir cette macro. Par exemple, pour faire tenir ce rôle au signe \og=\fg : \verbinline|\def\noshowmark{=}|
+
+\subsubsection{Masquer un résultat}
+Pour une valeur donnée, si on veut masquer les résultats numéro $a_1,a_2,\ldots,a_n$, il suffit de faire suivre cette valeur par $[a_1][a_2]\ldots[a_n]$ où les nombres $a_i$ sont dans l'ordre croissant. Si un des nombres $a_j$ vaut 0, tous les autres $a_k$ où $k>j$ sont ignorés et tous les résultats qui suivront le précédent résultat masqué seront masqués.\medskip
+
+Dans l'exemple qui suit, on va :\parindent1.5em
+\begin{itemize}
+ \item masquer le 2\ieme{} résultat de la première valeur avec \og\verb|-4[2]|\fg
+ \item laisser tous les résultats de la 2\ieme{} valeur avec \og\verb|-2|\fg
+ \item masquer les résultats \no{} 1 et 3 de la troisième valeur avec \og\verb|0[1][3]|\fg
+ \item masquer tous les résultats de la 4\ieme{} valeur avec \og\verb|2.25[0]|\fg
+ \item masquer tous les résultats à partir du 2\ieme{} pour la 5\ieme{} valeur avec \og\verb|7[2][0]|\fg
+\end{itemize}\parindent0em
+
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\htablecalc[3]{$x$}{-4[2],-2,0[1][3],2.25[0],7[2][0]}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\htablecalc[3]{$x$}{-4[2],-2,0[1][3],2.25[0],7[2][0]}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+On peut combiner cette syntaxe avec \verb|@| pour masquer à la fois la valeur et certains résultats.
+
+\subsection{Hauteur des lignes}
+Au début de chaque ligne, lors de son affichage, la commande \verbinline|\startline| est exécutée.
+
+Par défaut, cette commande est définie par : \verbinline|\def\startline{\rule[-1.2ex]{0pt}{4ex}}|. Cette commande se développe donc par défaut en un \guill{strut} qui fixe la hauteur de la ligne. Voici ce strut, rendu visible devant la lettre a : \rule[-1.2ex]{2pt}{4ex}a\medskip
+
+On peut donc faire exécuter un autre strut ou tout autre action au début d'une ligne :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\startline{%
+ {\bfseries\number\tclin)\ }%
+}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\startline{%
+ {\bfseries\number\tclin)\ }%
+}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+Ici, on supprime le strut (on donne aux lignes leur hauteur naturelles) et on affiche en gras le numéro de la ligne en cours (qui est contenue dans le compteur \verbinline|\tclin|) à la ligne 2 du code.
+
+\subsection{Filets horizontaux}
+\tbcalc permet de définir 3 types de filets horizontaux. Pour cela, la commande \verbinline|\sethrule| admet 3 arguments :
+
+\parindent1.5em
+\begin{itemize}
+ \item le \guill{filet 0} affiché en haut et en bas du tableau;
+ \item le \guill{filet 1} affiché sous la première ligne;
+ \item les \guill{autres filets} affichés sous les lignes de résultats (sauf la dernière qui reçoit le filet de bas de tableau).
+\end{itemize}\parindent0em
+Voici la syntaxe :
+
+\verbinline|\sethrule|\ARGU{filet 1}\ARGU{filet 2}\ARGU{autres filets}
+\medskip
+
+Par défaut, les 3 arguments valent \verbinline|\hline|.\medskip
+
+Voici un exemple où le filet sous la premiere ligne est double et les autres filets sont supprimés :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\sethrule{\hline}{\hline\hline}{}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\sethrule{\hline}{\hline\hline}{}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+La commande \verbinline|\resethrule| permet de revenir aux filets horizontaux définis par défaut.
+
+\subsection{Personnalisation des colonnes}
+\subsubsection{Filets verticaux}
+\tbcalc permet de définir 2 types de colonnes : le type de la colonne de gauche et le type des autres colonnes. La commande \verbinline|setcoltype| admet un argument optionnel et 2 arguments obligatoires :
+\begin{itemize}
+ \item l'argument optionnel, vide par défaut, définit les filets verticaux \guill{|} affichés à la droite du tableau;
+ \item le type 1 de la première colonne qui est prédéfini à \guill{|c|};
+ \item le type 2 des autres colonnes qui est prédéfini à \guill{c|}
+\end{itemize}\medskip
+
+La syntaxe est :\par\nobreak
+\verbinline|\setcoltype|\arguC{filets de droite}\ARGU{type 1}\ARGU{type 2}\medskip
+
+Voici un exemple :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\setcoltype[||]{||c||}{c}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\setcoltype[||]{||c||}{c}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+La commande \verbinline|\resetcoltype| permet de revenir aux types de colonne définis par défaut.
+
+\subsubsection{Largeur des colonnes}
+Au lieu de l'habituel spécificateur de colonne \guill{c} que nous avons utilisé jusqu'à présent, on peut spécifier la largeur des colonnes avec le spécificateur \guill{m} du package \href{http://www.ctan.org/tex-archive/graphics/pgf/base/latex/pgf/basiclayer/}{\texttt{\textbf{array}}} de cette façon : \og\verb|m{1.5cm}|\fg{}.\medskip
+
+Voici un exemple où la 1\iere{} colonne est centrée à droite, les colonnes de résultats sont centrées et mesurent \numprint[cm]{1.5} de large :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{array}
+\setcoltype{|r|}{>{\centering\arraybackslash}m{1.5cm}|}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\setcoltype{|r|}{>{\centering\arraybackslash}m{1.5cm}|}
+\htablecalc[3]{$x$}{-4,-2,0,2.25,7}
+ {$f(x)=2x-3$}{2*x-3}
+ {$x^2$}{x*x}
+ {$h(x)=\sqrt{x^2+1}$}{sqrt(x*x+1)}
+\end{center}
+
+\section{Personnalisation avancée}
+\subsection{Exécution d'un code dans une cellule}
+La macro \verbinline|\defcellcode| permet d'exécuter un code donné dans une cellule, une colonne entière ou une ligne entière de son choix. Pour cela, les cellules du tableau sont repérées avec des coordonnées que voici :\smallskip
+
+\begin{center}
+ \def\printvalue#1{}\def\printresult#1#2{}
+ \edefcellcode{}{}{(\number\tclin,\number\tccol)}
+ \htablecalc[3]{}{1,2,3,4,5}{}{}{}{}{}{}
+\end{center}
+\medskip
+
+En interne, la 1\iere{} coordonnée ---~le numéro de la ligne~--- est contenu dans le compteur \verbinline{\tclin}, tandisque le numéro de la colonne est contenu dans le compteur \verbinline{\tccol}.\smallskip
+
+Voici la syntaxe de cette commande :
+
+\verbinline|\defcellcode|\ARGU{nombre 1}\ARGU{nombre 2}\ARGU{code}
+\smallskip
+
+où :\parindent1.5em
+\begin{itemize}
+ \item \ARGU{nombre 1} est la première coordonnées, le numéro de la ligne;
+ \item \ARGU{nombre 2} est la deuxième coordonnées, le numéro de la colonne;
+ \item \ARGU{code} est le code qui sera exécuté lorsque la cellule choisie sera affichée : ce code ne sera développé qu'à ce moment là;
+ \item Si \ARGU{nombre 1} est vide, toutes les lignes sont concernées;
+ \item Si \ARGU{nombre 2} est vide, toutes les colonnes sont concernées;
+\end{itemize}\parindent0em
+\smallskip
+
+Il faut noter que le code ainsi défini est exécuté \emph{lors de l'affichage de la cellule}, et à ce moment là, la valeur du compteur \verbinline|\tccol| ne contient plus le numéro de la colonne de la cellule : il n'est donc pas question d'impliquer \verbinline|\tccol| dans le code défini par la commande \verbinline|\defcellcode|. Par contre, le compteur \verbinline|\tclin| contient bien le numéro de la ligne en cours d'affichage.
+
+Si la commande \verbinline|\defcellcode| est appelée plusieurs fois pour définir des codes différents, et si plusieurs codes concernent une même cellule, les codes seront exécutés dans l'ordre où ils ont été définis.\medskip
+
+Voici un exemple où, à l'aide du package \verb|xcolor|, on choisit d'écrire en bleu le contenu de la cellule (2~,~3), d'écrire en rouge le contenu de la ligne 1, et en brun le contenu de la colonne 4.
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\defcellcode{2}{3}{\color{blue}}
+\defcellcode{1}{}{\color{red}}
+\defcellcode{}{4}{\color{brown}}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\defcellcode{2}{3}{\color{blue}}
+\defcellcode{1}{}{\color{red}}
+\defcellcode{}{4}{\color{brown}}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+On peut observer que la cellule (1 , 4) qui contient {\color{brown}\numprint{2.0}} a été colorée en brun. En effet, elle a d'abord été colorée en rouge (ligne 3 du code) \emph{puis} colorée en brun (ligne 4 du code).\bigskip
+
+Il existe une autre commande similaire qui exécute du code qui est \verbinline|\edefcellcode| : cette fois-ci, le code est exécuté une première fois lors de la construction de la cellule, alors que le compteur \verbinline|\tccol| contient bien le numéro de la colonne de la cellule. Lors de cette première exécution, le code est développé au maximum avec un \verbinline|\edef|\footnote{Il convient de mettre un \texttt{\string\noexpand} devant les commandes que l'on ne veut pas développer à ce moment là.}. Le développement obtenu est exécuté une seconde fois lors de l'affichage de la cellule.\medskip
+
+Voici un exemple où le texte dans toutes les colonnes supérieures à la colonne \no{}2 est coloré en bleu :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\edefcellcode{}{}{%
+ \ifnum\tccol>2 \noexpand\color{blue}\fi}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\edefcellcode{}{}{%
+ \ifnum\tccol>2 \noexpand\color{blue}\fi}
+\htablecalc[3]{$x$}{-2,-1,0,1,2,3}
+ {$2x$}{2*x}
+ {$3x$}{3*x}
+ {$4x$}{4*x}
+\end{center}
+
+\subsection{Personnaliser l'affichage}
+\subsubsection{Les macros {\ttfamily\textbackslash printvalue} et {\ttfamily\textbackslash printresult}}\label{persoaffichage}
+Pour afficher une valeur, la commande \verbinline|\printvalue| est appelée. Elle admet un argument qui est le nombre décimal à afficher qui provient de \verb|pgfcalc| et se présente sous forme brute c'est-à-dire \verb|12345.6789| par exemple pour \numprint{12345.6789}.
+
+Par défaut, \verbinline|\printvalue| est définie par le code suivant :\par\nobreak\smallskip
+\hfill\verbinline|\def\printvalue#1{\numprint{#1}}|\hfill{}
+\smallskip
+
+On voit que la commande \verb|\numprint| est appelée pour donner un affichage soigné.\bigskip
+
+Pour afficher un résultat, la commande \verbinline|\printresult| est appelée. Elle admet \textbf{deux} arguments; le premier est le résultat provenant de \verb|pgfcalc| et le deuxième est la valeur qui a servi à calculer le résultat, telle qu'elle a été saisie dans la liste de valeurs.
+
+Par défaut, \verbinline|\printresult| est définie par le code suivant :\par\nobreak\smallskip
+\hfill\verbinline|\def\printresult#1#2{\numprint{#1}}|\hfill{}
+\smallskip
+
+On peut observer que l'argument \verb|#2| (la valeur) n'est pas exploitée par \verbinline|\printresult|. On peut cependant imaginer un exemple où elle le serait. Sur cet exemple, on affiche un \verb|X| rouge lorsque la dimension du côté du carré (qui est l'argument \verb|#2|) est négative. Sinon, on affiche le résultat avec l'unité. En plus, on affiche en bleu tout résultat inférieur à 10 :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{color}
+\def\printresult#1#2{%
+ \ifdim#1pt<10pt\color{blue}\fi
+ \ifdim#2pt<0pt
+ \color{red}\texttt{X}%
+ \else
+ \numprint[cm^2]{#1}%
+ \fi}
+\htablecalc{longueur}{0.7,-10,3,-2,5,12}
+ {aire du carr\'e}{x*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\printresult#1#2{%
+ \ifdim#1pt<10pt\color{blue}\fi
+ \ifdim#2pt<0pt
+ \color{red}\texttt{X}%
+ \else
+ \numprint[cm^2]{#1}%
+ \fi}
+\htablecalc{longueur}{0.7,-10,3,-2,5,12}{aire du carr\'e}{x*x}
+\end{center}
+
+Une remarque : l'aire du carré de \numprint[cm]{0.7} de côté est légèrement fausse et devrait être \numprint[cm^2]{0.49} au lieu de \numprint[cm^2]{0.48999}! Le package \verb|pgfmath| n'est pas destiné à faire du calcul scientifique mais du dessin ce qui explique pourquoi la précision est des résultats est limitée au $\frac{1}{\numprint{100000}}$, et les résultats sont souvent entâchés d'erreurs d'arrondis comme celui-ci.
+
+\subsubsection{Gérer les arrondis}
+En ce qui concerne l'affichage des nombres entiers, le package \verb|pgfmath| quoiqu'excellent, mais il a un défaut irritant : lorsque le résultat du calcul est un entier, il renvoie un nombre brut ayant 1 décimale nulle, comme on le voit dans le tableau ci-dessus. On peut donc tester si le résultat est un entier dans \verbinline|\printresult|. Pour cela, on peut par exemple se servir de la commande \verb|\IfInteger| du package \verb|xstring| et ne transmettre à \verb|\numprint| la valeur du compteur \verb|\integerpart| qui est la partie entière du nombre testé :
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\printresult#1#2{%
+ \IfInteger{#1}%
+ {\numprint{\number\integerpart}}%
+ {\numprint{#1}}%
+}
+\htablecalc{$x$}{-3,1.56,2.5,3.608}{$2x$}{2*x}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\def\printresult#1#2{%
+ \IfInteger{#1}%
+ {\numprint{\number\integerpart}}%
+ {\numprint{#1}}%
+}
+\htablecalc{$x$}{-3,1.56,2.5,3.608}{$2x$}{2*x}
+\end{center}
+
+On peut toujours demander à \verb|numprint| d'afficher un certain nombre de chiffres après la virgule avec la commande \verb|\nprounddigits| dont l'argument est le nombre de chiffres de la partie décimale. Mais des 0 inutiles sont rajoutés si nécessaire.
+\subsubsection{Pour le fun}
+On peut imaginer des détournements de ce package, comme par exemple afficher un échiquier dont les cases mesurent \numprint[cm]{0.5} de côté :\par\nobreak\parindent1.5em
+\begin{itemize}
+ \item on initailise à \verb|0pt| les séparateurs du tableau à la ligne 2 pour ne pas fausser la dimension voulue de \numprint[cm]{0.5};
+ \item l'affichage de toutes les valeurs et résultats est neutralisé à la ligne 3;
+ \item ensuite on ne dessine que les filets horizontaux du haut et du bas du tableau (ligne 4), et les filets de gauche et droite (ligne 5);
+ \item on définit un strut de hauteur \numprint[cm]{0.5} au début de chaque ligne (ligne 6);
+ \item et on teste si la somme de la ligne et de la colonne en cours est impaire (ligne 8) auquel cas, on colore la case en gris (ligne 9).
+\end{itemize}\parindent0em
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{colortbl,xcolor}
+\arraycolsep=0pt\tabcolsep=0pt
+\def\printvalue#1{}\def\printresult#1#2{}
+\sethrule{\hline}{}{}
+\setcoltype[|]{|m{0.5cm}}{m{0.5cm}}
+\def\startline{\rule[-0.2cm]{0pt}{0.3cm}}
+\edefcellcode{}{}{%
+ \ifodd\numexpr\tccol+\tclin\relax
+ \noexpand\cellcolor{lightgray}\fi
+}
+\htablecalc[7]{}{ , , , , , , }
+ {}{}{}{}{}{}{}{}{}{}{}{}{}{}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\arraycolsep=0pt\tabcolsep=0pt
+\def\printvalue#1{}\def\printresult#1#2{}
+\sethrule{\hline}{}{}
+\setcoltype[|]{|m{0.5cm}}{m{0.5cm}}
+\def\startline{\rule[-0.2cm]{0pt}{0.3cm}}
+\edefcellcode{}{}{%
+ \ifodd\numexpr\tccol+\tclin\relax
+ \noexpand\cellcolor{lightgray}\fi
+}
+\htablecalc[7]{}{ , , , , , , }
+ {}{}{}{}{}{}{}{}{}{}{}{}{}{}
+\end{center}
+
+\section{Changer de moteur de calcul}\label{changemoteurcalcul}
+\verb|pgfmath|, le moteur de calcul mathématique de \verb|pgf| est utilisé par défaut, mais on peut en choisir un autre, bien qu'il n'y ait pas grand choix : à ma connaissance, il existe les packages \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} et \href{http://www.ctan.org/tex-archive/macros/generic/xlop/}{\texttt{\textbf{xlop}}} qui effectuent des calculs mathématiques sous \LaTeX{}. Ils ont chacun des inconvénients, c'est pour cela qu'ils ne sont pas sélectionnés par défaut :\par\nobreak\parindent1.5em
+\begin{itemize}
+ \item \og\verb|fp|\fg{} utilise la notation polonaise inverse ce qui est peu habituel. On peut cependant utiliser la notation infixe mais le signe d'opposé \og${}-{}$\fg{} devant un nombre n'est pas géré : très embêtant pour les valeurs négatives;
+ \item \og\verb|xlop|\fg{} n'est pas seulement un package de calcul, il affiche aussi les résultats. De plus, il ne dispose pour l'instant que des opérations arithmétiques.
+\end{itemize}\parindent0em
+\medskip
+
+La macro \verbinline|\tc@evalexpr| est chargé d'effectuer les calculs. Elle n'admet pas d'argument et son fonctionnement est très simple : elle prend \verbinline|\tc@currentresult| dont le développement est une expression numérique à évaluer, par exemple \og\verb|4*2.5*2.5-3*2.5-7|\fg{}. Elle fait appel à un moteur de calcul qui évalue cette expression (ici, cela donnerait \verb|10.5|), et enfin, elle assigne ce résultat à \verbinline|\tc@currentresult|.
+
+Par défaut, la macro \verbinline|\tc@evalexpr| est définie par le code suivant :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\def\tc@evalexpr{%
+ \expandafter\pgfmathparse
+ \expandafter{\tc@currentresult}%
+ \let\tc@currentresult\pgfmathresult}
+\end{lstlisting}
+\end{minipage}
+\end{center}
+
+Mettons que l'on choisisse le package \verb|fp| pour exécuter nos calculs: redéfinissons \verbinline|\tc@evalexpr| :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPeval\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\end{lstlisting}
+\end{minipage}
+\end{center}
+
+On a utilisé la commande \verb|\FPclip| pour enlever tous les zéros inutiles du résultat (voir la documentation de \verb|fp|).
+
+Ça y est, le moteur de calcul de \tbcalc est maintenant \verb|fp| :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{fp}
+\htablecalc{$x$}{0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{2*x*x-0.5}
+\end{lstlisting}
+\end{minipage}
+\smallskip
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPeval\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\htablecalc{$x$}{0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{2*x*x-0.5}
+\end{center}
+
+Le gros problème est que \verb|fp| ne gère pas les signes ${}-{}$ devant les nombres comme étant un signe d'opposé, et une valeur de \og\verb|-3|\fg{} aurait fait planter \verb|fp| ! On peut éviter cette limitation en utilisant la notation polonaise inverse mais il faut à nouveau modifier \verbinline|\tc@evalexpr| pour lui dire de faire le calcul en notation polonaise inverse (d'où l'utilisation de \verb|\FPupn|), et faire quelques adaptations dans \verbinline|\printvalue| évaluer les valeurs qui sont aussi écrites en notation polonaise inverse (on écrit \verb|3 neg|) pour \verb|-3|) :\par\nobreak
+\begin{center}
+\begin{minipage}{\mywidth}
+\begin{lstlisting}
+\usepackage{fp}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPupn\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\def\printvalue#1{%
+ \FPupn\tempval{#1}%
+ \FPclip\tempval\tempval
+ \numprint\tempval
+}
+\htablecalc{$x$}{3 neg,0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{x x mul 2 mul 0.5 sub}
+\end{lstlisting}
+\end{minipage}
+\makeatletter
+\def\tc@evalexpr{%
+ \expandafter\FPupn\expandafter
+ \tc@currentresult\expandafter{\tc@currentresult}%
+ \FPclip\tc@currentresult\tc@currentresult
+}
+\makeatother
+\def\printvalue#1{%
+ \FPupn\tempval{#1}%
+ \FPclip\tempval\tempval
+ \numprint\tempval
+}
+\htablecalc{$x$}{3 neg,0.5,1,2.5,10}
+ {$2x^2-\frac{1}{2}$}{x x mul 2 mul 0.5 sub}
+\end{center}
+
+\bigskip\bigskip
+\begin{center}
+$\star$\par
+$\star$\quad$\star$
+\end{center}
+\bigskip\bigskip
+
+C'est tout, j'espère que ce package vous sera utile !\par\nobreak
+Merci de me signaler par \href{mailto:unbonpetit@gmail.com}{\texttt{\textbf{email}}} tout bug ou toute proposition d'amélioration\ldots\par\nobreak\bigskip
+Christian \textsc{Tellechea}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/tabularcalc/tabularcalc.sty b/Master/texmf-dist/tex/latex/tabularcalc/tabularcalc.sty
new file mode 100644
index 00000000000..268d26d0049
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tabularcalc/tabularcalc.sty
@@ -0,0 +1,316 @@
+% __________________________________________________
+% | |
+% | |
+% | tabularcalc v0.1 |
+% | |
+% | March 19 2009 |
+% | |
+% |__________________________________________________|
+%
+% This is tabularcalc.sty
+%
+% "tabularcalc" package consists of the 6 following files:
+% tabularcalc.sty (this file)
+% README
+% tabularcalc_doc_fr.tex, tabularcalc_doc_fr.pdf (manual in french)
+% tabularcalc_doc_en.tex, tabularcalc_doc_en.pdf (manual in english)
+%
+% Christian Tellechea 2009
+% email : unbonpetit@gmail.com
+% -------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+% -------------------------------------------------------------------
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Christian Tellechea
+% -------------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tabularcalc}%
+ [2009/02/15 v0.1 Compute formulas in tables]
+\RequirePackage{xstring}
+\RequirePackage{numprint}
+\RequirePackage{pgf,pgfmath}
+
+\newcommand\tabularcalcversion {0.1}
+\newcommand\tabularcalcdate {2009/03/19}
+\newcommand\tabularcalcfrenchdate {19 mars 2009}
+\newcommand\tabularcalcenglishdate {March $19^{\mathrm{th}}$ 2009}
+\newcount\tccol\newcount\tclin
+\newif\iftc@showval
+
+\newcommand\tc@checkdefine[2]{\@ifdefinable#1{\def#1{#2}}{}}
+
+\newcommand\tc@addtomacro[2]{\expandafter\def\expandafter#1\expandafter{#1#2}}
+\newcommand\tc@expaddtomacro[2]{%
+ \expandafter\tc@addtomacro\expandafter#1\expandafter{#2}}
+
+% choisit le moteur pour calculer l'expression contenue dans \tc@currentresult
+% puis assigne le r\'esultat dans \tc@currentresult
+\tc@checkdefine\tc@evalexpr{%
+ \expandafter\pgfmathparse\expandafter{\tc@currentresult}%
+ \let\tc@currentresult\pgfmathresult}
+
+\tc@checkdefine\noshowmark{}
+\makeatother\def\noshowmark{@}\makeatletter
+
+\tc@checkdefine\startline{\rule[-1.2ex]{0pt}{4ex}}
+\tc@checkdefine\tc@cellcode{}
+\tc@checkdefine\tc@currentcellcode{}
+\newcommand\resetcellcode{\let\tc@cellcode\@empty}
+
+\tc@checkdefine\numberletter{x}
+\tc@checkdefine\listsep{,}
+
+% d\'efinit la routine d'affichage des valeurs
+\tc@checkdefine\printvalue{}
+\def\printvalue#1{\numprint{#1}}
+% d\'efinit la routine d'affichage des r\'esultats
+\tc@checkdefine\printresult{}
+\def\printresult#1#2{\numprint{#1}}
+
+\newcommand\edefcellcode[3]{%
+ \ifx\@empty#1\@empty
+ \ifx\@empty#2\@empty
+ \tc@addtomacro\tc@cellcode{#3}%
+ \else
+ \tc@addtomacro\tc@cellcode{\ifnum\tccol=#2\relax#3\fi}%
+ \fi
+ \else
+ \ifx\@empty#2\@empty
+ \tc@addtomacro\tc@cellcode{\ifnum\tclin=#1\relax#3\fi}%
+ \else
+ \tc@addtomacro\tc@cellcode{%
+ \ifnum\tclin=#1\relax\ifnum\tccol=#2\relax#3\fi\fi}%
+ \fi
+ \fi}
+
+\newcommand\defcellcode[3]{\edefcellcode{#1}{#2}{\unexpanded{#3}}}
+
+\tc@checkdefine\tc@firstrule\hline
+\tc@checkdefine\tc@interrule\hline
+\tc@checkdefine\tc@updwnrule\hline
+
+% d\'efinit les 3 types de lignes
+\newcommand\sethrule[3]{%
+ \def\tc@updwnrule{#1}\def\tc@firstrule{#2}\def\tc@interrule{#3}}
+
+\newcommand\resethrule{\sethrule\hline\hline\hline}
+
+\tc@checkdefine\tc@lastvline{}
+\tc@checkdefine\tc@firstcoltype{|c|}
+\tc@checkdefine\tc@othercoltype{c|}
+
+% d\'efinit les 3 types de colonnes
+\newcommand\setcoltype[3][]{%
+ \def\tc@firstcoltype{#2}\def\tc@othercoltype{#3}\def\tc@lastvline{#1}}
+
+\newcommand\resetcoltype{\setcoltype{|c|}{c|}}
+
+\newcommand\htablecalc{\def\tc@orientation{h}\tc@deftablestart}
+\newcommand\vtablecalc{\def\tc@orientation{v}\tc@deftablestart}
+
+\newcommand\tc@deftablestart[3][1]{%
+ \begingroup
+ \expandarg
+ \def\tc@nbformulas{#1}%
+ \StrCount{\listsep#3}\listsep[\tc@nbval]% \tc@nbval = nombre de valeurs
+ \let\tc@coltype\@empty
+ \tc@expaddtomacro\tc@coltype{\tc@firstcoltype*}% construit \tc@coltype
+ \expandafter\tc@addtomacro\expandafter\tc@coltype\expandafter
+ {\expandafter{\tc@nbval}}% qui contiendra par exemple |c|*{4}{c|}
+ \expandafter\tc@addtomacro\expandafter\tc@coltype\expandafter
+ {\expandafter{\tc@othercoltype}}%
+ \tc@expaddtomacro\tc@coltype\tc@lastvline
+ \let\tc@firstline\tc@updwnrule% 1ere ligne
+ \tclin\z@\tccol\z@
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtomacro\tc@firstline\tc@currentcellcode
+ \tc@expaddtomacro\tc@firstline{\startline#2&}%
+ \def\tc@valuelist{#3}%
+ \tc@expaddtomacro\tc@valuelist\listsep
+ \tclin\@ne\tccol\@ne
+ \csname tc@\tc@orientation readarg\endcsname}
+
+% lit tous les arguments {nom ligne}{formule} et les assigne dans les sc
+% \tcline@i et \tc@formula@i et ainsi de suite, puis va \`a \tc@hbuildlines
+\newcommand\tc@hreadarg[2]{%
+ \tccol\z@
+ \@namedef{tc@line@\romannumeral\tclin}{}%
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtocurrentline\tc@currentcellcode
+ \tc@expaddtocurrentline{\startline#1&}%
+ \@namedef{tc@formula@\romannumeral\tclin}{#2}%
+ \ifnum\tclin<\tc@nbformulas
+ \advance\tclin\@ne
+ \expandafter\tc@hreadarg
+ \else
+ \tccol\@ne
+ \expandafter\tc@hbuildlines
+ \fi}%
+
+\newcommand\tc@vreadarg[2]{%
+ \tclin\z@
+ \edef\tc@currentcellcode{\tc@cellcode}% construit la 1\`ere ligne
+ \tc@expaddtomacro\tc@firstline{\tc@currentcellcode#1}%
+ \@namedef{tc@formula@\romannumeral\tccol}{#2}%
+ \ifnum\tccol<\tc@nbformulas
+ \tc@addtomacro\tc@firstline&%
+ \advance\tccol\@ne
+ \expandafter\tc@vreadarg
+ \else
+ \tclin\@ne\tccol\z@
+ \loop% initialise les lignes \`a "\tc@currentcellcode\startline"
+ \@namedef{tc@line@\romannumeral\tclin}{}%
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtocurrentline\tc@currentcellcode
+ \tc@expaddtocurrentline\startline
+ \ifnum\tclin<\tc@nbval
+ \advance\tclin\@ne
+ \repeat
+ \tclin\@ne
+ \expandafter\tc@vbuildlines
+ \fi}%
+
+\newcommand\tc@findskiplist{%
+ \IfBeginWith\tc@currentvalue\noshowmark
+ {\tc@showvalfalse% si le signe \noshowmark est pr\'esent...
+ \StrGobbleLeft\tc@currentvalue1[\tc@currentvalue]}% ...efface-le
+ {\tc@showvaltrue}%
+ \IfSubStr\tc@currentvalue[% s'il y a une skiplist...
+ {\let\tc@skiplist\tc@currentvalue
+ \StrBefore\tc@currentvalue[[\tc@currentvalue]% ce qui est avant "["
+ \StrBehind\tc@skiplist\tc@currentvalue[\tc@skiplist]}% d\'efinit-la
+ {\let\tc@skiplist\@empty}}
+
+\newcommand\tc@addtocurrentline[1]{%
+ \expandafter\tc@addtomacro\csname tc@line@\romannumeral\tclin\endcsname
+ {#1}}
+
+\newcommand\tc@expaddtocurrentline[1]{%
+ \expandafter\tc@addtocurrentline\expandafter{#1}}
+
+% construit toutes les lignes du tableau par r\'ecursivit\'e principale sur
+% le nombre de colonnes
+\newcommand\tc@hbuildlines{%
+ \tclin\z@
+ \StrBefore\tc@valuelist\listsep[\tc@currentvalue]% prend \tc@currentvalue
+ \StrBehind\tc@valuelist\listsep[\tc@valuelist]% purge \tc@valuelist
+ \ifx\@empty\tc@currentvalue
+ \else
+ \tc@findskiplist
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtomacro\tc@firstline\tc@currentcellcode
+ \iftc@showval% pas de noshowmark : ajoute affichage valeur courante
+ \expandafter\tc@expaddtomacro\expandafter\tc@firstline
+ \expandafter{\expandafter\printvalue\expandafter
+ {\tc@currentvalue}}%
+ \fi
+ \tclin\@ne
+ \loop
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtocurrentline\tc@currentcellcode
+ \tc@displaycurrentresult\tclin
+ \ifnum\tclin<\tc@nbformulas
+ \advance\tclin\@ne
+ \repeat% recommence pour toutes les lignes
+ \fi
+ \ifnum\tccol<\tc@nbval% s'il reste des colonnes
+ \tc@addtomacro\tc@firstline&% ajoute "&" \`a la 1\`ere ligne
+ \tclin\@ne
+ \loop% et ajoute "&" aux autres lignes
+ \tc@addtocurrentline&%
+ \ifnum\tclin<\tc@nbformulas
+ \advance\tclin\@ne
+ \repeat
+ \advance\tccol\@ne
+ \expandafter\tc@hbuildlines% recommence tout le processus
+ \else
+ \let\tc@nblines\tc@nbformulas
+ \expandafter\tc@printtabular% sinon, va afficher la table
+ \fi}
+
+% construit les lignes du tableau par r\'ecursivit\'e principale sur \tclin
+\newcommand\tc@vbuildlines{%
+ \StrBefore\tc@valuelist\listsep[\tc@currentvalue]% prend \tc@currentvalue
+ \StrBehind\tc@valuelist\listsep[\tc@valuelist]% purge \tc@valuelist
+ \ifx\@empty\tc@currentvalue
+ \else
+ \tc@findskiplist
+ \iftc@showval% pas de noshowmark : ajoute affichage valeur courante
+ \expandafter\tc@expaddtocurrentline\expandafter
+ {\expandafter\printvalue\expandafter{\tc@currentvalue}}%
+ \fi
+ \tccol\@ne
+ \loop
+ \tc@addtocurrentline&% change de cellule dans la ligne en cours
+ \edef\tc@currentcellcode{\tc@cellcode}%
+ \tc@expaddtocurrentline\tc@currentcellcode
+ \tc@displaycurrentresult\tccol% ajoute le r\'esultat courant ou pas
+ \ifnum\tccol<\tc@nbformulas
+ \advance\tccol\@ne
+ \repeat% s'il reste des colonnes, recommence
+ \fi
+ \ifnum\tclin<\tc@nbval
+ \advance\tclin\@ne
+ \expandafter\tc@vbuildlines% s'il reste des lignes, recommence
+ \else
+ \let\tc@nblines\tc@nbval
+ \expandafter\tc@printtabular% sinon, va afficher la table
+ \fi}
+
+\newcommand\tc@displaycurrentresult[1]{%
+ \StrBetween\tc@skiplist[][\tc@nexttoskip]%
+ \ifx\@empty\tc@skiplist% pas de skiplist -> ajoute l'affichage de resultat
+ \tc@addcurrentresult#1
+ \else
+ \ifnum\tc@nexttoskip=\z@% si 0, n'affiche rien
+ \else
+ \ifnum\tc@nexttoskip=#1% si le numero correspond
+ \StrBehind\tc@skiplist][\tc@skiplist]% purge la skiplist
+ \else% sinon, ajoute l'affichage de resultat
+ \tc@addcurrentresult#1%
+ \fi
+ \fi
+ \fi}
+
+\newcommand\tc@addcurrentresult[1]{% #1 : compteur courant
+ \expandafter\StrSubstitute% remplace "x" par la valeur courante
+ \csname tc@formula@\romannumeral#1\endcsname
+ \numberletter\tc@currentvalue[\tc@currentresult]%
+ \tc@evalexpr% \'evalue l'expression
+ \edef\tc@currentresult{{\tc@currentresult}{\tc@currentvalue}}%
+ \expandafter\tc@expaddtocurrentline\expandafter
+ {\expandafter\printresult\tc@currentresult}}
+
+\newcommand\tc@printcalclines{%
+ \csname tc@line@\romannumeral\tclin\endcsname% affiche la ni\`eme ligne
+ \ifnum\tclin<\tc@nblines% et s'il en reste encore \`a afficher
+ \\\tc@interrule% va \`a la ligne, met le filet
+ \global\advance\tclin\@ne
+ \expandafter\tc@printcalclines% et recommence
+ \fi}%
+
+\newcommand\tc@printtabular{%
+ \global\tclin\z@
+ \def\tc@currentvalue{\begin{tabular}}%
+ \expandafter\tc@currentvalue\expandafter{\tc@coltype}%
+ \tc@firstline\\\tc@firstrule% 1\`ere ligne + 1er filet
+ \global\tclin\@ne
+ \tc@printcalclines% affichage des autres lignes
+ \\\tc@updwnrule% filet du bas
+ \end{tabular}% fin du tableau
+ \endgroup}
+%
+% Historique
+%------------------------------------------------------------------------------
+%% v0.1 19/03/2009 : - Premi\`ere version
+%------------------------------------------------------------------------------ \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 0134134dc73..a5b15865cf1 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -213,7 +213,8 @@ my @WorkingTLP = qw(
subfig subfigure subfloat substr sudoku sudokubundle sugconf
supertabular susy svgcolor svn svn-multi svninfo
swebib syllogism syntax synproof syntrace synttree
- t-angles t2 Tabbing tableaux tablists tablor tabulary tabvar talk
+ t-angles t2 Tabbing
+ tableaux tablists tablor tabularcalc tabulary tabvar talk
tamethebeast tdclock tdsfrmath
ted templates-fenn templates-sommer tengwarscript
tensor termcal termlist teubner tex-ewd tex-gyre texcount
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 0dccc230b51..b546c6859fc 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -507,6 +507,7 @@ depend synttree
depend tableaux
depend tablists
depend tabto-ltx
+depend tabularcalc
depend tabulary
depend talk
depend taupin
diff --git a/Master/tlpkg/tlpsrc/tabularcalc.tlpsrc b/Master/tlpkg/tlpsrc/tabularcalc.tlpsrc
new file mode 100644
index 00000000000..bcfc6b4c605
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/tabularcalc.tlpsrc
@@ -0,0 +1,2 @@
+name tabularcalc
+category Package