summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/spreadtab
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-11 17:59:11 +0000
committerKarl Berry <karl@freefriends.org>2011-04-11 17:59:11 +0000
commit4fa2b5c160feefbe7bc7c98a9db56ebfb550170e (patch)
tree9f2b372d5b93d3db5281601dbfc7a9d7c55da098 /Master/texmf-dist/doc/latex/spreadtab
parentbb76a9ac936acff10cbcca285f378a397668a069 (diff)
spreadab 0.3c (9apr11)
git-svn-id: svn://tug.org/texlive/trunk@22046 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/spreadtab')
-rw-r--r--Master/texmf-dist/doc/latex/spreadtab/README12
-rw-r--r--Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.pdfbin770610 -> 856956 bytes
-rw-r--r--Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.tex405
-rw-r--r--Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.pdfbin805275 -> 882719 bytes
-rw-r--r--Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.tex398
5 files changed, 450 insertions, 365 deletions
diff --git a/Master/texmf-dist/doc/latex/spreadtab/README b/Master/texmf-dist/doc/latex/spreadtab/README
index d974dae7693..d41f670317f 100644
--- a/Master/texmf-dist/doc/latex/spreadtab/README
+++ b/Master/texmf-dist/doc/latex/spreadtab/README
@@ -1,8 +1,8 @@
_____________________
spreadtab package
- v0.3b
- 2010/06/06
+ v0.3c
+ 2011/04/08
_____________________
This package provides spreadsheet features for LaTeX table environments.
@@ -14,11 +14,11 @@ generate values in other cells.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ce package permet d'imiter le fonctionnement d'un tableur dans les
-environnements tableau de LateX.
+environnements tableau de LaTeX.
-Les cellules d'un tableau ont des coordonnées représentant leur ligne et
-colonne, et par cet intermédiaire, peuvent être insérées dans des formules
-pour générer des valeurs dans d'autres cellules.
+Les cellules d'un tableau ont des coordonnées repr\'esentant leur ligne et
+colonne, et par cet interm\'ediaire, peuvent \^etre ins\'er\'ees dans des
+formules pour g\'en\'erer des valeurs dans d'autres cellules.
Christian Tellechea
<unbonpetit@gmail.com> \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.pdf b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.pdf
index 2cac0295c12..6d33d05d57b 100644
--- a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.pdf
+++ b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.tex b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.tex
index aaa0398f468..54317c5ba9e 100644
--- a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.tex
+++ b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_en.tex
@@ -1,16 +1,16 @@
% ____________________________________________________________________________
% | |
% | |
-% | spreadtab v0.3a |
+% | spreadtab v0.3c |
% | |
-% | May 15, 2010 |
+% | April 8, 2011 |
% | |
% |___________________________________________________________________________|
%
% This file is spreadtab_doc_en.tex, the source code of the english manual of
% the spreadtab package.
%
-% Copyright Christian Tellechea 2009-2010
+% Copyright Christian Tellechea 2009-2011
% email : unbonpetit@gmail.com
%
% -------------------------------------------------------------------
@@ -27,7 +27,9 @@
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-\usepackage{lmodern}
+\usepackage{libertine}
+\renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
+\usepackage[scaled=0.8]{luximono}
\usepackage[a4paper,margin=2.6cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{textcomp}
@@ -37,7 +39,7 @@
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{listings}
-\usepackage{numprint}
+\usepackage[autolanguage]{numprint}
\usepackage{xspace}
\usepackage[bottom]{footmisc}
\usepackage{spreadtab}
@@ -69,7 +71,7 @@
numbersep=1em,classoffset=1,%
morekeywords={% les macros et commandes de spreadtab
spreadtab,SThiderow,SThidecol,STsavecell,STautoround,STmessage,STsetdecimalsep,STtransposecar,STdebug,STdisplaytab,STsetdisplaymarks,%
- STnumericfieldmarker,STtextcell,STcopy,id,fact,ifeq,ifgt,iflt,numtofrshortdate,%
+ STnumericfieldmarker,STprintnum,STtextcell,STcopy,fact,id,ifeq,ifgt,iflt,numtofrshortdate,%
numtoengshortdate,numtofrlongdate,numtoenglongdate,numtofrmonth,%
numtoengmonth,numtofrday,numtoengday,sum,rand,randint,sumprod,%
frshortdatetonum,engshortdatetonum,englongdatetonum,frlongdatetonum,gcd,lcm},%
@@ -163,7 +165,7 @@
\end{titlepage}
\tableofcontents\newpage
-\parskip\medskipamount This manual is a translation of the french manual. I apologize for my poor english but I did my best and I hope that the following is comprehensible! Any help improve this translation will be greatly appreciated.
+\parskip\medskipamount {\bfseries\color{red}This manual is a translation of the french manual. I apologize for my poor english but I did my best and I hope that the following is comprehensible! Any help improve this translation will be greatly appreciated.}
\section{Introduction}
\subsection{Presentation}
This package allows us to construct tables in a manner similar to a spreadsheet. The cells of a table have row and column indices and these can be used in formulas to generate values in other cells.
@@ -454,6 +456,149 @@ X\STcopy{>}{a1+1}Y & @XY & X:={}Y & \textbf{:={}} & & \\\hline
\end{center}
\section{Features for formatting the table}
+\subsection{Decimal seprarator}
+The \verb-fp- return its results with the decimal point separator. After the job of \verb-fp-, \ST can change this decimal separator: everything happens as if the results returned by \verb-fp- were taking this into account. The command \verbinline-\STsetdecimalsep- take a mandatory argument which is the char used as decimal separator:
+\begin{center}
+\verbinline-\STsetdecimalsep-\verb-{<char}-
+\end{center}
+For exemple, french users should write this in the preamble of the document:
+\begin{center}
+\verbinline-\STsetdecimalsep{,}-
+\end{center}
+For numeric field located in math mode, the comma is considered as a math punctuation, which explains why it is followed by a space. To pevent this behaviour, it can be written inside brackets:
+
+\begin{minipage}{0.65\linewidth}
+\begin{lstlisting}[backgroundcolor=\color{ST@codebckgcolor}]
+3,14 is not displayed like $3,14$.\par
+3,14 is displayed like $3{,}14$
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}{0.35\linewidth}
+3,14 is not displayed like $3,14$.\par
+3,14 is displayed like $3{,}14$
+\end{minipage}%
+
+When cells are in math mode, you can\footnote{It is preferable to use the \texttt{numprint} package to format the results. You can also change the math code of the comma: \texttt{\textbackslash mathcode`,="013B\textbackslash relax}. This trick puts the comma in the class 0 of the ordinary signs while its naturally class is 6 (punctuation signs).} use this feature and ask \ST to replace the decimal point by a comma inside braces with the command \verbinline-\STsetdecimalsep{{,}}-. In these tables where each cell is in math mode, the space after the commas are neutralized in the second table:
+
+\begin{minipage}{0.65\linewidth}
+\begin{lstlisting}
+\STsetdecimalsep{,}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Average}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}\par\smallskip
+\STsetdecimalsep{{,}}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Average}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}
+\end{lstlisting}
+\end{minipage}%
+\begin{minipage}{0.35\linewidth}
+\centering
+\STsetdecimalsep{,}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Average}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}\par\smallskip
+\STsetdecimalsep{{,}}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Average}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}
+\end{minipage}
+
+\subsection{Number formatting and the {\ttfamily fp} package}
+All calculations are made by the \verb-\FPeval- macro\footnote{This macro accepts infix or postfix notation. Consequently, both can be used to write formulas in a cell. For example the infix formula '\falseverb{a1+b1}' is equivalent to the postfix ones '\falseverb{a1 b1 add}' or '\falseverb{a1 b1 +}'.} of the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} package. This package provides all necessary along with various scientific and trigonometric functions. Calculations are made with 18 decimal digits of precision, and \falseverb{fp} displays \emph{all} the decimals!
+
+The number of digits displayed can be controlled in various ways:
+\begin{itemize}
+ \item the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} package can be used in order to properly display numbers;
+ \item \verb=fp= can round or truc numbers with \verb-round(number,integer)- or \verb-trunc(number,integer)- but the syntax makes this tedious to write if this is needed for many cells;
+ \item \ST can round \emph{all} the numbers in the table with the macro \verbinline-\STautoround- whose argument is number of digits in the decimal part. If the argument is empty, no rounding is done. If the starred macro \verbinline-\STautoround*- is used, the decimal part is filled with 0 if necessary.
+\end{itemize}
+In this example, floating point numbers are rounded to 6 digits:\par\nobreak
+\begin{lstlisting}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}\medskip
+
+\STautoround*{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}\medskip
+
+\STautoround*{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}
+\end{center}
+
+All the numbers contained in the final table, either typed as is or coming from a calculation are processed by the macro\verbinline-\STprintnum-. By default, this macro has no effect on its argument and is defined this way:
+\begin{center}
+ \verbinline-\newcommand\STprintnum[1]{#1}-
+\end{center}
+It is possible to round all the numbers via the \verbinline-\numprint- command from the \verb-numprint- package. To achive this, the \verbinline-\STprintnum- command must be redefined:\par\nobreak
+\begin{lstlisting}
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\nprounddigits{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 &7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\nprounddigits{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 &7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{center}
+
+Here is another similar example where we test if the number to display is negative with the command \verbinline-\FPifneg- from the \verb-fp- package. If this happens, the number is displayed in red. The command \verbinline-\STautoround- was preferred to \verbinline-\nprounddigits- from the \verb-numprint- package because the latter it adds unnecessary 0's.
+\begin{lstlisting}
+\STsetdecimalsep{.}
+\renewcommand\STprintnum[1]{\FPifneg{#1}\color{red}\fi\numprint{#1}}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & -1 & 2 & -3 & 4 & -5 & 6 & -7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\STsetdecimalsep{.}
+\renewcommand\STprintnum[1]{\FPifneg{#1}\color{red}\fi\numprint{#1}}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & -1 & 2 & -3 & 4 & -5 & 6 & -7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{center}
+
\subsection{End of lines and horizontal rules}
\ST recognizes the usual line breaks and horizontal rules \verb|\\| and \verb|\hline|. It is also possible to specify the optional argument in line break: \verb-\\[<dimension>]-.
@@ -602,7 +747,7 @@ Example in the mixed cell \verb-c1-:
The chars used to delimit the reference are set to "\verb-<<-" and "\verb->>-" by default. They can be modified with the \verbinline-\STsetdisplaymarks- command whose arguments contain the left and right delimiters. For example, if you write \verbinline-\STsetdisplaymarks{|}{|}-, you will write \verb-|reference|- in order to display the content of the numeric field of the cell \verb-reference-.
\subsection{The use of \ttfamily\textbackslash multicolumn}
-\ST is compatible with the syntax \verbinline=\multicolumn{<number>}{<type>}{<content>}= which merges \falseverb{<number>} cells in unique cell whose type and content are specified in the arguments.
+\ST is compatible with the syntax \verbinline=\multicolumn{<n>}{<type>}{<content>}= which merges \falseverb{<n>} cells in a unique cell whose type and content are specified in the arguments.
Even when using \verbinline=\multicolumn=, \ST maintains some consistency in the references. In this table where \verbinline-\multicolumn- is used, the absolute references are displayed:\par\nobreak
\begin{center}
@@ -636,107 +781,6 @@ In this example, every number in the top line is the product of the 2 numbers be
\end{center}
The marker `\falseverb{:=}' is necessary in every cell where the command \verbinline-\multicolumn- is written. Without it, \ST would consider that the whole cell (i.e. \verb-\multicolumn{2}{|c|}{<formula>}-) as the formula, which is impossible to calculate.
-\subsection{Number formatting and the {\ttfamily fp} package}
-All calculations are made by the \verb-\FPeval- macro\footnote{This macro accepts infix or postfix notation. Consequently, both can be used to write formulas in a cell. For example the infix formula '\falseverb{a1+b1}' is equivalent to the postfix ones '\falseverb{a1 b1 add}' or '\falseverb{a1 b1 +}'.} of the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} package. This package provides all necessary along with various scientific and trigonometric functions. Calculations are made with 18 decimal digits of precision, and \falseverb{fp} displays \emph{all} the decimals!
-
-The number of digits displayed can be controlled in various ways:
-\begin{itemize}
- \item the \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} package can be used in order to properly display numbers;
- \item \verb=fp= can round or truc numbers with \verb-round(number,integer)- or \verb-trunc(number,integer)- but the syntax makes this tedious to write if this is needed for many cells;
- \item \ST can round \emph{all} the numbers in the table with the macro \verbinline-\STautoround- whose argument is number of digits in the decimal part. If the argument is empty, no rounding is done. If the starred macro \verbinline-\STautoround*- is used, the decimal part is filled with 0 if necessary.
-\end{itemize}
-In this example, floating point numbers are rounded to 6 digits:\par\nobreak
-\begin{lstlisting}
-\STautoround{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}\medskip
-
-\STautoround*{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}
-\end{lstlisting}
-\begin{center}
-\STautoround{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}\medskip
-
-\STautoround*{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}
-\end{center}
-
-\subsection{Decimal seprarator}
-The \verb-fp- return its results with the decimal point separator. After the job of \verb-fp-, \ST can change this decimal separator: everything happens as if the results returned by \verb-fp- were taking this into account. The command \verbinline-\STsetdecimalsep- take a mandatory argument which is the char used as decimal separator:
-\begin{center}
-\verbinline-\STsetdecimalsep-\verb-{<char}-
-\end{center}
-For exemple, french users should write this in the preamble of the document:
-\begin{center}
-\verbinline-\STsetdecimalsep{,}-
-\end{center}
-For numeric field located in math mode, the comma is considered as a math punctuation, which explains why it is followed by a space. To pevent this behaviour, it can be written inside brackets:
-
-\begin{minipage}{0.65\linewidth}
-\begin{lstlisting}[backgroundcolor=\color{ST@codebckgcolor}]
-3,14 is not displayed like $3,14$.\par
-3,14 is displayed like $3{,}14$
-\end{lstlisting}
-\end{minipage}\hfill
-\begin{minipage}{0.35\linewidth}
-3,14 is not displayed like $3,14$.\par
-3,14 is displayed like $3{,}14$
-\end{minipage}%
-
-When cells are in math mode, you can\footnote{It is preferable to use the \texttt{numprint} package to format the results. You can also change the math code of the comma: \texttt{\textbackslash mathcode`,="013B\textbackslash relax}. This trick puts the comma in the class 0 of the ordinary signs while its naturally class is 6 (punctuation signs).} use this feature and ask \ST to replace the decimal point by a comma inside braces with the command \verbinline-\STsetdecimalsep{{,}}-. In these tables where each cell is in math mode, the space after the commas are neutralized in the second table:
-
-\begin{minipage}{0.65\linewidth}
-\begin{lstlisting}
-\STsetdecimalsep{,}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Average}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}\par\smallskip
-\STsetdecimalsep{{,}}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Average}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}
-\end{lstlisting}
-\end{minipage}%
-\begin{minipage}{0.35\linewidth}
-\centering
-\STsetdecimalsep{,}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Average}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}\par\smallskip
-\STsetdecimalsep{{,}}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Average}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}
-\end{minipage}
-
\section{Macro-functions}
The \falseverb{fp} package provides a limited set of operations and functions. If these are not sufficient then \ST allows the advanced programmer to write macros using the operations and functions of \falseverb{fp}. This section presents the macro-functions currently available\footnote{Many others should be written soon and be available in future versions of the package.}. There will be more details on how to program macro functions in the next version of this manual.
@@ -880,7 +924,7 @@ The macro function "scitodec" enables to convert a number written in scientific
\item a sequence of characters with the syntax \verb-<mantissa>EE<exponent>- where \verb-<mantissa>- is a decimal number and the \verb-<exponent>- is an integer. The "E" may be written uppercase or lowercase.
\verb-<mantissa>EE<exponent>- means the number $\text{\ttfamily <mantissa>}\times10^{\text{\ttfamily <exponent>}}$
- \item a reference to the \emph{textual} field of a cell which must contain characters written with the syntax \verb-<mantissa>EE<exponent>-
+ \item a reference to the \emph{textual} field of a cell which containing \verb-<mantissa>EE<exponent>-
\end{itemize}
Example :
\begin{lstlisting}
@@ -910,6 +954,7 @@ Example :
The simplest macro functions is "\verbinline=id(<number>)=". It returns the number in its argument. Mathematically, it is not very usefull, but with \ST, it makes possible to write mathematical expressions in arguments of macro function where they are not allowed. In the argument of \verbinline=sum= for example.
In the code below, the \verbinline-id- macro function is used to compute the range of cell to add with \verbinline-sum-. In this example, the numeric field of the cell "a2" contains 8. Therefore, "\verbinline=sum([0,-1]:[id(a2-1),-1])/a2=" is equivalent to \verbinline=sum([0,-1]:[7,-1])/8=:
+
\begin{lstlisting}
\begin{spreadtab}{{tabular}{r*{10}c}}
@Integers & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10\\
@@ -1251,7 +1296,7 @@ In the debugging tables, cells containing the coordinates are grayed if the pack
\section{Examples}
In the examples of this section, the numbers entered by the user are in \textcolor{black}{red} and the calculated numbers are in \textcolor{black}{black}
-In these tables, lots of tricks (struts, \verbinline-\multicolumn- commands) and packages (including the numprint package and its columns 'N`, which aligns the decimal points) were used to obtain a satisfactory result. The code is sometimes cumbersome and difficult to read, but these tables are not basic but well-groomed examples! For readability, the command \verbinline-\STcopy- is not used.
+In these tables, lots of tricks (struts, \verbinline-\multicolumn- commands) and packages (including the numprint package and its columns 'N`, which aligns the decimal points) were used to obtain a satisfactory result. The code is sometimes cumbersome and difficult to read, but these tables are not basic but well-groomed examples!
\subsection{The Pascal's triangle again!}
\begin{lstlisting}
@@ -1283,36 +1328,38 @@ For people familiar with maths, here is the series of the exponential. Indeed,
and this table shows the speed of convergence for $x=0.5$
\begin{lstlisting}
\STautoround{15}
-\begin{spreadtab}[\STsavecell\xvalue{a1}]{{tabular}{cN{2}{15}}}
-\multicolumn{2}{c}{Convergence for $x=\color{red}{\numprint{:={0.5}}}$}\\[1.5ex]
-@$n$ & e^a1\SThidecol & \hfill{@ $\displaystyle e^{\numprint\xvalue}-\sum_{k=0}^n\frac{\numprint\xvalue^k}{k!}$}\hfill\\[3ex]\hline
-\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\\hline
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\begin{spreadtab}{{tabular}{cc}}
+\multicolumn{2}{c}{Convergence at $x=\color{red}:={0.5}$}\\[1.5ex]
+@$n$ & e^a1\SThidecol & @ $\displaystyle e^{\numprint{<<a1>>}}-\sum_{k=0}^n\frac{\numprint{<<a1>>}^k}{k!}$\\[3ex]\hline
+\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & \STcopy{v}{b!2-b3}\\
+\STcopy{v}{a3+1}& \STcopy{v}{a!1^a4/fact(a4)+b3}& \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\\hline
\end{spreadtab}
\end{lstlisting}
\begin{center}
\STautoround{15}
-\begin{spreadtab}[\STsavecell\xvalue{a1}]{{tabular}{cN{2}{15}}}
-\multicolumn{2}{c}{Convergence for $x=\color{red}{\numprint{:={0.5}}}$}\\[1.5ex]
-@$n$ & e^a1\SThidecol & \hfill{@ $\displaystyle e^{\numprint\xvalue}-\sum_{k=0}^n\frac{\numprint\xvalue^k}{k!}$}\hfill\\[3ex]\hline
-\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\\hline
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\begin{spreadtab}{{tabular}{cc}}
+\multicolumn{2}{c}{Convergence at $x=\color{red}:={0.5}$}\\[1.5ex]
+@$n$ & e^a1\SThidecol & @ $\displaystyle e^{\numprint{<<a1>>}}-\sum_{k=0}^n\frac{\numprint{<<a1>>}^k}{k!}$\\[3ex]\hline
+\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & \STcopy{v}{b!2-b3}\\
+\STcopy{v}{a3+1}& \STcopy{v}{a!1^a4/fact(a4)+b3}& \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\\hline
\end{spreadtab}
\end{center}
@@ -1322,53 +1369,49 @@ In mathematical terms, the sequence $F_n$ of Fibonacci numbers is defined by the
The golden ratio is the limit of the ratios of successive terms of the Fibonacci sequence. We show here that the quotients $F_{n+1}/F_n$ approximate the golden ration $\varphi=\frac{1+\sqrt{5}}{2}$ alternately lower and higher than $\varphi$.\par\nobreak
\begin{lstlisting}
\STautoround{9}
-$
-\begin{spreadtab}{{matrix}{}}
-@n & @F_n & @\dfrac{F_n}{F_{n-1}} & @\varphi-\dfrac{F_n}{F_{n-1}}\\[2ex]\hline
-\color{red}:=1 & \color{red}:=1 & & \\
-[0,-1]+1 & \color{red}:=1 & [-1,0]/[-1,-1] & (1+5^0.5)/2-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\\hline
-\end{spreadtab}
-$
+$\begin{spreadtab}{{array}{ccN39N{3}{9}}}
+@n & @F_n & @\hfill{\dfrac{F_n}{F_{n-1}}}\hfill\null& @\hfill{\varphi-\dfrac{F_n}{F_{n-1}}}\hfill\null\\[2ex]\hline
+\color{red}:=1 & \color{red}:=1 & & \\
+\STcopy{v}{a2+1} & \color{red}:=1 & \STcopy{v}{b3/b2} & (1+5^0.5)/2-[-1,0] \\
+ & \STcopy{v}{b2+b3} & & \STcopy{v}{d!3+1-c4} \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\\hline
+\end{spreadtab}$
\end{lstlisting}
\begin{center}
\STautoround{9}
-$
-\begin{spreadtab}{{matrix}{}}
-@n & @F_n & @\dfrac{F_n}{F_{n-1}} & @\varphi-\dfrac{F_n}{F_{n-1}}\\[2ex]\hline
-\color{red}:=1 & \color{red}:=1 & & \\
-[0,-1]+1 & \color{red}:=1 & [-1,0]/[-1,-1] & (1+5^0.5)/2-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\\hline
-\end{spreadtab}
-$
+$\begin{spreadtab}{{array}{ccN39N{3}{9}}}
+@n & @F_n & @\hfill{\dfrac{F_n}{F_{n-1}}}\hfill\null& @\hfill{\varphi-\dfrac{F_n}{F_{n-1}}}\hfill\null\\[2ex]\hline
+\color{red}:=1 & \color{red}:=1 & & \\
+\STcopy{v}{a2+1} & \color{red}:=1 & \STcopy{v}{b3/b2} & (1+5^0.5)/2-[-1,0] \\
+ & \STcopy{v}{b2+b3} & & \STcopy{v}{d!3+1-c4} \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\\hline
+\end{spreadtab}$
\end{center}
\subsection{A billing table}
diff --git a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.pdf b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.pdf
index 4da9abbdcd0..66f4838f5d5 100644
--- a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.pdf
+++ b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.tex b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.tex
index ec155119bd1..7436cc0a385 100644
--- a/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.tex
+++ b/Master/texmf-dist/doc/latex/spreadtab/spreadtab_doc_fr.tex
@@ -1,9 +1,9 @@
% ____________________________________________________________________________
% | |
% | |
-% | spreadtab v0.3a |
+% | spreadtab v0.3c |
% | |
-% | May 15, 2010 |
+% | 8 avril 2011 |
% | |
% |___________________________________________________________________________|
%
@@ -27,7 +27,9 @@
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-\usepackage{lmodern}
+\usepackage{libertine}
+\renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
+\usepackage[scaled=0.8]{luximono}
\usepackage[a4paper,margin=2.6cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{textcomp}
@@ -70,7 +72,7 @@
numbersep=1em,classoffset=1,%
morekeywords={% les macros et commandes de spreadtab
spreadtab,SThiderow,SThidecol,STsavecell,STautoround,STmessage,STsetdecimalsep,STtransposecar,STdebug,STdisplaytab,STsetdisplaymarks,%
- STnumericfieldmarker,STtextcell,STcopy,fact,id,ifeq,ifgt,iflt,numtofrshortdate,%
+ STnumericfieldmarker,STprintnum,STtextcell,STcopy,fact,id,ifeq,ifgt,iflt,numtofrshortdate,%
numtoengshortdate,numtofrlongdate,numtoenglongdate,numtofrmonth,%
numtoengmonth,numtofrday,numtoengday,sum,rand,randint,sumprod,%
frshortdatetonum,engshortdatetonum,englongdatetonum,frlongdatetonum,gcd,lcm},%
@@ -454,6 +456,149 @@ X\STcopy{>}{a1+1}Y & @XY & X:={}Y & \textbf{:={}} & & \\\hline
\end{center}
\section{Mise en forme du tableau}
+\subsection{Séparateur décimal}
+Le package \verb-fp- renvoie ses résultats décimaux avec le point comme séparateur décimal. Il est possible de changer ce séparateur décimal de telle sorte que tout se passe comme si les résultats retournés par \verb-fp- en tenaient compte. L'instruction \verbinline-\STsetdecimalsep- permet de changer le séparateur décimal en n'importe quel caractère en utilisant la syntaxe :
+\begin{center}
+\verbinline-\STsetdecimalsep-\verb-{<caractère>}-
+\end{center}
+Pour une utilisation en langue française, il faut donc inclure dans le préambule cette ligne :
+\begin{center}
+\verbinline-\STsetdecimalsep{,}-
+\end{center}
+Pour les champs numériques se trouvant en mode math, il faut noter que la virgule n'est pas neutre dans ce mode. En effet, elle est considérée comme une ponctuation ce qui explique qu'elle est suivie d'une espace. Pour neutraliser cet espace, on peut mettre cette virgule entre accolades comme on le voit dans ce code :
+
+\begin{minipage}{0.65\linewidth}
+\begin{lstlisting}[escapechar=Z,backgroundcolor=\color{ST@codebckgcolor}]
+3,14 n'est pas affichZéZ comme $3,14$.\par
+3,14 est affichZéZ comme $3{,}14$
+\end{lstlisting}
+\end{minipage}\hfill
+\begin{minipage}{0.35\linewidth}
+3,14 n'est pas affiché comme $3,14$.\par
+3,14 est affiché comme $3{,}14$
+\end{minipage}%
+
+Lorsque des cellules sont en mode math, on peut\footnote{Il est cependant préférable d'utiliser le package \texttt{numprint} pour formatter les résultats. On peut aussi modifier le code mathématique de la virgule : \texttt{\textbackslash mathcode`,="013B\textbackslash relax}. Cette modification, réservée aux utilisateurs avertis, fait entrer la virgule dans la classe 0 des signes ordinaires alors qu'elle est naturellement dans la classe 6 des signes de ponctuation.} s'inspirer de cette propriété et demander à \ST de remplacer le point décimal par une virgule entre accolades avec la commande \verbinline-\STsetdecimalsep{{,}}-. Dans ces deux tableaux où chaque cellule est en mode math, on constate que l'espacement après la virgule est neutralisé pour le second :
+
+\begin{minipage}{0.65\linewidth}
+\begin{lstlisting}
+\STsetdecimalsep{,}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Moyenne}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}\par\smallskip
+\STsetdecimalsep{{,}}
+\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
+@x & @y & @\text{Moyenne}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}
+\end{lstlisting}
+\end{minipage}%
+\begin{minipage}{0.35\linewidth}
+\centering
+\STsetdecimalsep{,}
+\begin{spreadtab}{{tabular}{|*3{>$r<$}|}}\hline
+@x & @y & @\text{Moyenne}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}\par\smallskip
+\STsetdecimalsep{{,}}
+\begin{spreadtab}{{tabular}{|*3{>$r<$}|}}\hline
+@x & @y & @\text{Moyenne}\\\hline
+5 & -4 & (a2+b2)/2\\
+-6.1 & -8 & (a3+b3)/2\\
+9.85 & 3.7 & (a4+b4)/2\\\hline
+\end{spreadtab}
+\end{minipage}
+
+\subsection{Mise en forme des nombres}
+Comme cela a été précisé, tous les calculs sont faits par le package \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} et sa macro \falseverb{\FPeval}\footnote{À ce propos, les notations infixe ou postfixe sont acceptées par {\ttfamily\string\FPeval} ce qui signifie que les formules dans \ST peuvent être indifféremment sous forme infixe ou postfixe. Par exemple, la formule infixe \og\falseverb{a1+b1}\fg{} est équivalente aux formules postfixes \og\falseverb{a1 b1 add}\fg{} ou \og\falseverb{a1 b1 +}\fg.}. Ce package fournit d'extraordinaires possibilités de calcul pour \TeX{} et dispose de toutes les fonctions arithmétiques, scientifiques et trigonométriques usuelles. Les calculs sont faits avec une précision de $10^{-18}$, et les 18 décimales sont affichées lorsqu'un calcul ne tombe pas juste ! Sans prendre des précautions, on peut se retrouver avec beaucoup de chiffres dans les parties décimales de certains résultats.
+
+Pour se prémunir de ce problème, plusieurs solutions existent :
+\begin{itemize}
+ \item on peut utiliser le package \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} qui est ce qui se fait de mieux dans l'affichage des nombres;
+ \item on peut demander à \verb=fp= d'arrondir un résultat avec sa fonction \verb-round(nombre,entier)- qui arrondit \verb=nombre= avec \verb=entier= chiffres après la virgule;
+ \item on peut également demander à \ST d'arrondir \emph{tous} les nombres placés dans le tableau à une certaine précision avec la macro \verbinline-\STautoround- dont l'argument est le nombre de chiffres demandés après la virgule. Si l'argument est vide, aucun arrondi n'est fait. Si on utilise la macro étoilée \verbinline-\STautoround*-, la partie décimale est remplie si besoin avec des 0 inutiles.
+\end{itemize}
+Voici un exemple simple des nombres de 1 à 7 et leurs inverses, arrondis à $10^{-6}$ :\par\nobreak
+\begin{lstlisting}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}\medskip
+
+\STautoround*{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}\medskip
+
+\STautoround*{6}
+\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
+\hline
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
+@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
+\end{spreadtab}
+\end{center}
+
+Tous les nombres contenus dans le tableau final, qu'ils aient été saisis tels quels ou qu'ils proviennent du résultat d'un calcul sont traités par la macro \verbinline-\STprintnum-. Par défaut, cette macro n'a aucun effet et est programmée de la façon suivante :
+\begin{center}
+ \verbinline-\newcommand\STprintnum[1]{#1}-
+\end{center}
+Il est possible d'arrondir tous les nombres via la commande \verbinline-\numprint- du package \verb-\numprint-. Pour ce faire, il faut redéfinir la macro \verbinline-\STprintnum- de cette façon :\par\nobreak
+\begin{lstlisting}
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\nprounddigits{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 &7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\nprounddigits{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & 1 & 2 & 3 & 4 & 5 & 6 &7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{center}
+
+Voici un autre exemple similaire où l'on teste si le nombre à afficher est négatif avec la commande \verbinline-\FPifneg- du package \verb-fp-. Si tel est le cas, le nombre est affiché en rouge. La commande \verbinline-\STautoround- a été préférée à \verbinline-\nprounddigits- du package \verb-numprint- puisque cette dernière ajoute des 0 inutiles. On a également remis le point décimal par défaut puisque \verbinline-\numprint- est en charge de l'affichage des nombres.
+\begin{lstlisting}
+\STsetdecimalsep{.}
+\renewcommand\STprintnum[1]{\FPifneg{#1}\color{red}\fi\numprint{#1}}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & -1 & 2 & -3 & 4 & -5 & 6 & -7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{lstlisting}
+\begin{center}
+\STsetdecimalsep{.}
+\renewcommand\STprintnum[1]{\FPifneg{#1}\color{red}\fi\numprint{#1}}
+\STautoround{6}
+\begin{spreadtab}{{tabular}{cccccccc}}
+@$x$ & -1 & 2 & -3 & 4 & -5 & 6 & -7 \\\hline
+@$1/x$ &1/b1&1/c1&1/d1&1/e1&1/f1&1/g1&1/h1
+\end{spreadtab}
+\end{center}
+
\subsection{Retours à la ligne et filets horizontaux}
Pour bien délimiter la fin d'une ligne, \ST est contraint de reconnaître les retours à la ligne et les filets horizontaux. Ce package permet d'utiliser dans le tableau l'argument optionnel de \verb-\\- de cette façon : \verb-\\[<dimension>]-.
@@ -634,108 +779,7 @@ Voici un exemple où chaque nombre de la ligne du haut est le produit des 2 nomb
\multicolumn{2}{|K{1}}{:=8}&\multicolumn{2}{|K{1}}{:=7}&\multicolumn{2}{|K{1}|}{:=6}\\\hline
\end{spreadtab}
\end{center}
-On remarque que le marqueur de champ numérique \og\falseverb{:=}\fg{} est nécessaire dans chaque cellule où se trouve la commande \verbinline-\multicolumn-. En effet, si ce marquer n'existait pas la totalite de la cellule, c'est-à-dire \verb-\multicolumn{2}{|c|}{<formule>}- serait considérée comme étant une formule.
-
-\subsection{Package \ttfamily fp}
-Comme cela a été précisé, tous les calculs sont faits par le package \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fp/}{\texttt{\textbf{fp}}} et sa macro \falseverb{\FPeval}\footnote{À ce propos, les notations infixe ou postfixe sont acceptées par {\ttfamily\string\FPeval} ce qui signifie que les formules dans \ST peuvent être indifféremment sous forme infixe ou postfixe. Par exemple, la formule infixe \og\falseverb{a1+b1}\fg{} est équivalente aux formules postfixes \og\falseverb{a1 b1 add}\fg{} ou \og\falseverb{a1 b1 +}\fg.}. Ce package fournit d'extraordinaires possibilités de calcul pour \TeX{} et dispose de toutes les fonctions arithmétiques, scientifiques et trigonométriques usuelles. Les calculs sont faits avec une précision de $10^{-18}$, et les 18 décimales sont affichées lorsqu'un calcul ne tombe pas juste ! Sans prendre des précautions, on peut se retrouver avec beaucoup de chiffres dans les parties décimales de certains résultats.
-
-Pour se prémunir de ce problème, plusieurs solutions existent :
-\begin{itemize}
- \item on peut utiliser le package \href{http://www.ctan.org/tex-archive/macros/latex/contrib/numprint/}{\texttt{\textbf{numprint}}} qui est ce qui se fait de mieux dans l'affichage des nombres;
- \item on peut demander à \verb=fp= d'arrondir un résultat avec sa fonction \verb-round(nombre,entier)- qui arrondit \verb=nombre= avec \verb=entier= chiffres après la virgule;
- \item on peut également demander à \ST d'arrondir \emph{tous} les nombres placés dans le tableau à une certaine précision avec la macro \verbinline-\STautoround- dont l'argument est le nombre de chiffres demandés après la virgule. Si l'argument est vide, aucun arrondi n'est fait. Si on utilise la macro étoilée \verbinline-\STautoround*-, la partie décimale est remplie si besoin avec des 0 inutiles.
-\end{itemize}
-Voici un exemple simple des nombres de 1 à 7 et leurs inverses, arrondis à $10^{-6}$ :\par\nobreak
-\begin{lstlisting}
-\STautoround{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}\medskip
-
-\STautoround*{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}
-\end{lstlisting}
-\begin{center}
-\STautoround{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}\medskip
-
-\STautoround*{6}
-\begin{spreadtab}{{tabular}{|l|*7{>{\centering\arraybackslash}m{1.35cm}|}}}
-\hline
-@$x$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\\hline
-@$x^{-1}$& 1/b1 & 1/c1 & 1/d1 & 1/e1 & 1/f1 & 1/g1 & 1/h1\\\hline
-\end{spreadtab}
-\end{center}
-
-\subsection{Séparateur décimal}
-Le package \verb-fp- renvoie ses résultats décimaux avec le point comme séparateur décimal. Il est possible de changer ce séparateur décimal de telle sorte que tout se passe comme si les résultats retournés par \verb-fp- en tenaient compte. L'instruction \verbinline-\STsetdecimalsep- permet de changer le séparateur décimal en n'importe quel caractère en utilisant la syntaxe :
-\begin{center}
-\verbinline-\STsetdecimalsep-\verb-{<caractère>}-
-\end{center}
-Pour une utilisation en langue française, il faut donc inclure dans le préambule cette ligne :
-\begin{center}
-\verbinline-\STsetdecimalsep{,}-
-\end{center}
-Pour les champs numériques se trouvant en mode math, il faut noter que la virgule n'est pas neutre dans ce mode. En effet, elle est considérée comme une ponctuation ce qui explique qu'elle est suivie d'une espace. Pour neutraliser cet espace, on peut mettre cette virgule entre accolades comme on le voit dans ce code :
-
-\begin{minipage}{0.65\linewidth}
-\begin{lstlisting}[escapechar=Z,backgroundcolor=\color{ST@codebckgcolor}]
-3,14 n'est pas affichZéZ comme $3,14$.\par
-3,14 est affichZéZ comme $3{,}14$
-\end{lstlisting}
-\end{minipage}\hfill
-\begin{minipage}{0.35\linewidth}
-3,14 n'est pas affiché comme $3,14$.\par
-3,14 est affiché comme $3{,}14$
-\end{minipage}%
-
-Lorsque des cellules sont en mode math, on peut\footnote{Il est cependant préférable d'utiliser le package \texttt{numprint} pour formatter les résultats. On peut aussi modifier le code mathématique de la virgule : \texttt{\textbackslash mathcode`,="013B\textbackslash relax}. Cette modification, réservée aux utilisateurs avertis, fait entrer la virgule dans la classe 0 des signes ordinaires alors qu'elle est naturellement dans la classe 6 des signes de ponctuation.} s'inspirer de cette propriété et demander à \ST de remplacer le point décimal par une virgule entre accolades avec la commande \verbinline-\STsetdecimalsep{{,}}-. Dans ces deux tableaux où chaque cellule est en mode math, on constate que l'espacement après la virgule est neutralisé pour le second :
-
-\begin{minipage}{0.65\linewidth}
-\begin{lstlisting}
-\STsetdecimalsep{,}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Moyenne}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}\par\smallskip
-\STsetdecimalsep{{,}}
-\begin{spreadtab}{{tabular}{|*3{>{$}r<{$}}|}}\hline
-@x & @y & @\text{Moyenne}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}
-\end{lstlisting}
-\end{minipage}%
-\begin{minipage}{0.35\linewidth}
-\centering
-\STsetdecimalsep{,}
-\begin{spreadtab}{{tabular}{|*3{>$r<$}|}}\hline
-@x & @y & @\text{Moyenne}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}\par\smallskip
-\STsetdecimalsep{{,}}
-\begin{spreadtab}{{tabular}{|*3{>$r<$}|}}\hline
-@x & @y & @\text{Moyenne}\\\hline
-5 & -4 & (a2+b2)/2\\
--6.1 & -8 & (a3+b3)/2\\
-9.85 & 3.7 & (a4+b4)/2\\\hline
-\end{spreadtab}
-\end{minipage}
+On remarque que le marqueur de champ numérique \og\falseverb{:=}\fg{} est nécessaire dans chaque cellule où se trouve la commande \verbinline-\multicolumn-. On comprend en effet que si ce marqueur n'existait pas, la totalite de la cellule, c'est-à-dire \verb-\multicolumn{2}{|c|}{<formule>}- serait considérée comme étant une formule.
\section{Macro-fonctions}
L'extension \falseverb{fp} fournit un nombre conséquent d'opérations et de fonctions. Malgré tout, dans le cadre d'un package comme \ST, celles-ci peuvent être insuffisantes et il est possible au programmeur averti d'écrire des macro-fonctions supplémentaires en utilisant celles fournies par \falseverb{fp}. Cette section présente les macro-fonctions pour l'instant disponibles\footnote{Bien d'autres restent à écrire ! Elles seront disponibles dans des versions futures de \ST.}. Il y aura plus de précisions sur la méthode pour programmer des macro-fonctions dans la prochaine version de ce manuel.
@@ -909,7 +953,7 @@ Exemple :
\subsubsection{Identité}
La plus simple des macros fonctions est \og\verbinline=id(<nombre>)=\fg. Celle-ci renvoie le nombre qui se trouve entre parenthèses. Mathématiquement, elle ne sert pas à grand chose, mais avec \ST, elle permet de passer des expressions mathématiques à des macros qui n'en admettent pas. On peut ainsi s'en servir dans les plages de cellules de \verbinline=sum= par exemple.
-Dans le code ci dessous, la macro \verbinline=id= est utilisée pour déterminer la plage de cellules à additionner avec \verbinline-sum-. Dans cet exemple, la valeur du champ numérique de la cellule a2 vaut 8. Par conséquent, "\verbinline=sum([0,-1]:[id(a2-1),-1])/a2=" est équivalent à \verbinline=sum([0,-1]:[7,-1])/8= :
+Dans le code ci dessous, la macro \verbinline=id= est utilisée pour déterminer la plage de cellules à additionner avec \verbinline-sum-. Dans cet exemple, la valeur du champ numérique de la cellule a2 vaut 8. Et donc, "\verbinline=sum([0,-1]:[id(a2-1),-1])/a2=" est équivalent à \verbinline=sum([0,-1]:[7,-1])/8= :
\begin{lstlisting}
\begin{spreadtab}{{tabular}{r*{10}c}}
@@ -1253,7 +1297,7 @@ Dans les tableaux ci-dessus, les cellules contenant les coordonnées ne sont gri
\section{Exemples}
Voici quelques tableaux pour finir !
-Afin que l'on sache quels nombres sont calculés, seuls les nombres non calculés sont en \textcolor{red}{rouge}. Dans ces tableaux, beaucoup d'artifices (des struts, des multicolumn) et des packages (notamment numprint et ses colonnes \og N\fg{} qui alignent les séparateurs décimaux) ont été utilisés pour obtenir un résultat satisfaisant. Le code est parfois lourd et peu lisible, mais il ne s'agit pas ici d'exemples basiques mais de tableaux peaufinés ! Par souci de lisibilité, la commande \verbinline-\STcopy- n'a pas été utilisée.
+Afin que l'on sache quels nombres sont calculés, seuls les nombres non calculés sont en \textcolor{red}{rouge}. Dans ces tableaux, beaucoup d'artifices (des struts, des multicolumn) et des packages (notamment numprint et ses colonnes \og N\fg{} qui alignent les séparateurs décimaux) ont été utilisés pour obtenir un résultat satisfaisant. Le code est parfois lourd et peu lisible, mais il ne s'agit pas ici d'exemples basiques mais de tableaux peaufinés !
\subsection{Encore un triangle de Pascal}
\begin{lstlisting}
@@ -1285,36 +1329,38 @@ Pour les matheux, il s'agit du développement limité de la fonction exponentiel
et le tableau illustre la rapidité de la convergence au fur et à mesure de l'ordre du développement limité.\par\nobreak
\begin{lstlisting}
\STautoround{15}
-\begin{spreadtab}[\STsavecell\xvalue{a1}]{{tabular}{cN{2}{15}}}
-\multicolumn{2}{c}{Convergence en $x=\color{red}{\numprint{:={0.5}}}$}\\[1.5ex]
-@$n$ & e^a1\SThidecol & \hfill{@ $\displaystyle e^{\numprint\xvalue}-\sum_{k=0}^n\frac{\numprint\xvalue^k}{k!}$}\hfill\\[3ex]\hline
-\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\\hline
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\begin{spreadtab}{{tabular}{cc}}
+\multicolumn{2}{c}{Convergence en $x=\color{red}:={0.5}$}\\[1.5ex]
+@$n$ & e^a1\SThidecol & @ $\displaystyle e^{\numprint{<<a1>>}}-\sum_{k=0}^n\frac{\numprint{<<a1>>}^k}{k!}$\\[3ex]\hline
+\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & \STcopy{v}{b!2-b3}\\
+\STcopy{v}{a3+1}& \STcopy{v}{a!1^a4/fact(a4)+b3}& \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\\hline
\end{spreadtab}
\end{lstlisting}
\begin{center}
\STautoround{15}
-\begin{spreadtab}[\STsavecell\xvalue{a1}]{{tabular}{cN{2}{15}}}
-\multicolumn{2}{c}{Convergence en $x=\color{red}{\numprint{:={0.5}}}$}\\[1.5ex]
-@$n$ & e^a1\SThidecol & \hfill{@ $\displaystyle e^{\numprint\xvalue}-\sum_{k=0}^n\frac{\numprint\xvalue^k}{k!}$}\hfill\\[3ex]\hline
-\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\
- [0,-1]+1 & a1^[-1,0]/fact([-1,0])+[0,-1] & b2-[-1,0] \\\hline
+\renewcommand\STprintnum[1]{\numprint{#1}}
+\begin{spreadtab}{{tabular}{cc}}
+\multicolumn{2}{c}{Convergence en $x=\color{red}:={0.5}$}\\[1.5ex]
+@$n$ & e^a1\SThidecol & @ $\displaystyle e^{\numprint{<<a1>>}}-\sum_{k=0}^n\frac{\numprint{<<a1>>}^k}{k!}$\\[3ex]\hline
+\color{red}:={0}& a1^[-1,0]/fact([-1,0]) & \STcopy{v}{b!2-b3}\\
+\STcopy{v}{a3+1}& \STcopy{v}{a!1^a4/fact(a4)+b3}& \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\
+ & & \\\hline
\end{spreadtab}
\end{center}
@@ -1324,53 +1370,49 @@ Voici la définition des nombres de Fibonacci : $F_0=1\qquad F_1=1\qquad F_{n+2}
On va mettre ici en évidence que le quotient de 2 nombres de Fibonacci consécutifs $F_n$ et $F_{n-1}$ tend vers le nombre d'or $\varphi=\frac{1+\sqrt{5}}{2}$ de telle sorte que la suite $u_n=\varphi-\frac{F_n}{F_{n-1}}$ soit alternativement positive et négative.\par\nobreak
\begin{lstlisting}
\STautoround{9}
-$
-\begin{spreadtab}{{matrix}{}}
-@n & @F_n & @\dfrac{F_n}{F_{n-1}} & @\varphi-\dfrac{F_n}{F_{n-1}}\\[2ex]\hline
-\color{red}:=1 & \color{red}:=1 & & \\
-[0,-1]+1 & \color{red}:=1 & [-1,0]/[-1,-1] & (1+5^0.5)/2-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\\hline
-\end{spreadtab}
-$
+$\begin{spreadtab}{{array}{ccN39N{3}{9}}}
+@n & @F_n & @\hfill{\dfrac{F_n}{F_{n-1}}}\hfill\null& @\hfill{\varphi-\dfrac{F_n}{F_{n-1}}}\hfill\null\\[2ex]\hline
+\color{red}:=1 & \color{red}:=1 & & \\
+\STcopy{v}{a2+1} & \color{red}:=1 & \STcopy{v}{b3/b2} & (1+5^0.5)/2-[-1,0] \\
+ & \STcopy{v}{b2+b3} & & \STcopy{v}{d!3+1-c4} \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\\hline
+\end{spreadtab}$
\end{lstlisting}
\begin{center}
\STautoround{9}
-$
-\begin{spreadtab}{{matrix}{}}
-@n & @F_n & @\dfrac{F_n}{F_{n-1}} & @\varphi-\dfrac{F_n}{F_{n-1}}\\[2ex]\hline
-\color{red}:=1 & \color{red}:=1 & & \\
-[0,-1]+1 & \color{red}:=1 & [-1,0]/[-1,-1] & (1+5^0.5)/2-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\
-[0,-1]+1 & [0,-1]+[0,-2] & [-1,0]/[-1,-1] & d3+1-[-1,0] \\\hline
-\end{spreadtab}
-$
+$\begin{spreadtab}{{array}{ccN39N{3}{9}}}
+@n & @F_n & @\hfill{\dfrac{F_n}{F_{n-1}}}\hfill\null& @\hfill{\varphi-\dfrac{F_n}{F_{n-1}}}\hfill\null\\[2ex]\hline
+\color{red}:=1 & \color{red}:=1 & & \\
+\STcopy{v}{a2+1} & \color{red}:=1 & \STcopy{v}{b3/b2} & (1+5^0.5)/2-[-1,0] \\
+ & \STcopy{v}{b2+b3} & & \STcopy{v}{d!3+1-c4} \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\
+ & & & \\\hline
+\end{spreadtab}$
\end{center}
\subsection{Tableau de facturation}