texlive[57428] Master/texmf-dist: fcolumn (15jan21)

commits+karl at tug.org commits+karl at tug.org
Fri Jan 15 22:50:39 CET 2021


Revision: 57428
          http://tug.org/svn/texlive?view=revision&revision=57428
Author:   karl
Date:     2021-01-15 22:50:38 +0100 (Fri, 15 Jan 2021)
Log Message:
-----------
fcolumn (15jan21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fcolumn/README
    trunk/Master/texmf-dist/doc/latex/fcolumn/fcolumn.pdf
    trunk/Master/texmf-dist/doc/latex/fcolumn/makefile
    trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.dtx
    trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.ins
    trunk/Master/texmf-dist/tex/latex/fcolumn/fcolumn.sty

Modified: trunk/Master/texmf-dist/doc/latex/fcolumn/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fcolumn/README	2021-01-15 21:50:13 UTC (rev 57427)
+++ trunk/Master/texmf-dist/doc/latex/fcolumn/README	2021-01-15 21:50:38 UTC (rev 57428)
@@ -7,15 +7,16 @@
 width), using the specifier ``f''.
 
 The column specifier f itself is rather simple.  It is the predefined
-version of a generic column F.  The generic version expects three 
-arguments: |#1| is the separator, |#2| is the decimal mark, and |#3| 
+version of a generic column F.  The generic version expects four
+arguments: |#1| is the separator, |#2| is the decimal mark, |#3| is
 the coding used for grouping digits of the integer part and decimal
-part.  For example the f-column in the current version of the package
+part, and #4 is anything added before typesetting the contents of a 
+column.  For example the f-column in the current version of the package
 is using 3,2 as #3, meaning that numbers are typeset with 2 decimal 
 digits and grouping is done on 3 digits.  The grouping character is 
 ``.'' and the decimal separator is ``,'', thereby coding for the 
 continental European standard.  People in the Anglo-saxon world would
-rather code |\newcolumntype{f}{F{,}{.}{3,2}}|.
+rather code |\newcolumntype{f}{F{,}{.}{3,2}{}}|.
 
 To show where and how the f-column is used, let's look at a typical
 financial table.
@@ -33,7 +34,7 @@
 \begin{tabular}{lflf}
 house        &  200000    &  equity capital &  50000    \\
 bank account &    -603,23 &  mortgage       & 150000    \\
-savings      &   28000                                  \\
+savings      &   28000    \\
 cash         &     145,85 &  profit         &  27542,62 \\
 \sumline
 \end{tabular}
@@ -44,20 +45,23 @@
 checks whether the two columns are in balance; if not, the user
 is warned via a message.  A special command \resetsumline exists
 which allows one to restart a table, so that multiple tables 
-in one tabular environment are possible.
+that are aligned are possible in one tabular environment.
+   The fcolumn specifier can be used in a tabular environment
+and in the longtable environment.  Specific fcolumn formatting,
+like colour and/or font changes are possible.
 
 To install:
 -----------
 Run the file fcolumn.ins through (La)TeX (in a directory also
 containing fcolumn.dtx) or type ``make install'' and move the 
-file fcolumn.sty to a place searched by TeX.
+resultant file fcolumn.sty to a place searched by TeX.
 
 To produce the documentation:
 -----------------------------
-Run the file fcolumn.dtx through LaTeX.  Update the glossary
-and index by makeindex:
+Type ``make''.  Or run the file fcolumn.dtx through LaTeX,
+update the glossary and index by makeindex:
 
   makeindex -s gglo.ist -o fcolumn.gls fcolumn.glo
   makeindex -s gglo.ist -o fcolumn.ind fcolumn.idx
 
-and then LaTeX again; presto!
+and then LaTeX fcolumn.dtx again; presto!

Modified: trunk/Master/texmf-dist/doc/latex/fcolumn/fcolumn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/fcolumn/makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fcolumn/makefile	2021-01-15 21:50:13 UTC (rev 57427)
+++ trunk/Master/texmf-dist/doc/latex/fcolumn/makefile	2021-01-15 21:50:38 UTC (rev 57428)
@@ -1,4 +1,5 @@
-.SUFFIXES: .pdf .glo .gls .ind .idx .dtx .sty .ins
+.SUFFIXES: .dtx .glo .gls .idx .ind .ins .pdf .sty 
+DIST=fcolumn.dtx fcolumn.ins fcolumn.pdf fcolumn.sty makefile README
 
 .ins.sty:
 	pdflatex $*.ins
@@ -18,23 +19,20 @@
 .dtx.pdf:
 	pdflatex $*.dtx
 
-all: fcolumn.pdf
+all: fcolumn.sty fcolumn.pdf
 
 install: 
 	tex fcolumn.ins
 
-dist: fcolumn.dtx fcolumn.ins fcolumn.sty fcolumn.pdf README makefile
-	mkdir fcolumn; cp fcolumn.dtx fcolumn; cp fcolumn.ins fcolumn; \
- cp fcolumn.sty fcolumn; cp fcolumn.pdf fcolumn; cp README fcolumn; \
- cp makefile fcolumn; tar -czf fcolumn.tgz fcolumn; rm -r fcolumn
+dist: $(DIST)
+	mkdir FCv1.3; cp $(DIST) FCv1.3; tar -czf fcolumn.tgz FCv1.3; rm -r FCv1.3
 
 fcolumn.pdf: fcolumn.dtx fcolumn.gls fcolumn.ind fcolumn.sty
-fcolumn.idx: fcolumn.dtx
+fcolumn.glo fcolumn.idx: fcolumn.dtx
 fcolumn.ind: fcolumn.idx
-fcolumn.glo: fcolumn.dtx
 fcolumn.gls: fcolumn.glo
 
 .PHONY: clean
 clean:
-	-rm fcolumn.pdf fcolumn.sty fcolumn.log fcolumn.glo fcolumn.gls \
-     fcolumn.ind fcolumn.idx fcolumn.aux fcolumn.ilg
+	-rm fcolumn.pdf fcolumn.sty fcolumn.log fcolumn.glo fcolumn.gls fcolumn.ind \
+     fcolumn.idx fcolumn.aux fcolumn.ilg fcolumn.out fcolumn.tgz

Modified: trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.dtx	2021-01-15 21:50:13 UTC (rev 57427)
+++ trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.dtx	2021-01-15 21:50:38 UTC (rev 57428)
@@ -1,5 +1,5 @@
 % \iffalse meta-comment
-% Copyright (C) 2015--2019 by Edgar Olthof
+% Copyright (C) 2015--2021 by Edgar Olthof
 %
 % This file may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -14,11 +14,12 @@
 % \fi
 % \iffalse
 %<package>\ProvidesPackage{fcolumn}
-%<package>          [2019/04/24 v1.2 Automatic Currency Package (EHTO)]
+%<package>          [2021/01/14 v1.3 Automatic Currency Package (EHTO)]
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\RequirePackage{array}[v2.4k]
 %<*driver>
 \documentclass{ltxdoc}
+\usepackage{longtable}        
 \usepackage{fcolumn}          
 \usepackage{booktabs}
 \usepackage[tableposition=top,aboveskip=0pt]{caption}
@@ -30,15 +31,16 @@
 \usepackage{url}
 \usepackage[hyperfootnotes=false,hidelinks]{hyperref}
 \usepackage{eurosym}
+\usepackage{color}
 \EnableCrossrefs
 \CodelineIndex
-\RecordChanges
 \begin{document}
    \DocInput{fcolumn.dtx}
 \end{document}
 %</driver>
 % \fi
-% \CheckSum{1078}
+% \RecordChanges
+% \CheckSum{1287}
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -64,24 +66,32 @@
 %   counts and resetting of column counter done in a nicer way.}
 % \changes{v1.1.1}{2015/09/27}{Installation procedure changed from .ins-in-.dtx to separate
 %   .ins and .dtx after discussion with Karl Berry as well as some minor code improvements.}
-% \changes{v1.1.2}{2015/09/29}{Some inconsistencies between explanatory text 
-%   and actual code removed.}
+% \changes{v1.1.2}{2015/09/29}{Some inconsistencies between explanatory text and actual 
+%   code removed.}
 % \changes{v1.2}{2019/03/06}{Input parsing changed after comment from Frank
 %   Mittelbach.  He (Frank) also gave various suggestions for improving robustness
 %   or user friendlyness of this package.  This version is only backwards compatible
 %   when zero decimal digits were and are specified as modifier.}
+% \changes{v1.3}{2021/01/03}{Christian Hoff requested the possibility to provide extra formatting
+%   information to a column, e.g., colouring.  That was implemented by having an extra parameter
+%   to the generic F-column.  The current solution is not very robust, as font and/or size change
+%   in math environment are very tricky, but providing colour information works, see the example
+%   in the main text.  This version is now compatible with package longtable.  Version~1.3 is 
+%   backwards compatible to~1.2: it only adds functionality.}
 % \GetFileInfo{fcolumn.sty}
-% \DoNotIndex{\@arstrut,\@arstrutbox,\@depth,\@firstampfalse,\@firstamptrue,\@gobble,\@halignto}
-% \DoNotIndex{\@height,\@mkpream,\@ne,\@nextchar,\@preamble,\@sharp,\@tempdima,\@tempswafalse}
-% \DoNotIndex{\@tempswatrue,\@\temptokena,\@tfor,\@whilesw,\@width,\advance,\arraystretch,\baselineskip}
-% \DoNotIndex{\begingroup,\bgroup,\count,\count@,\cr,\csname,\def,\divide,\do,\dp,\edef,\egroup}
-% \DoNotIndex{\else,\endcsname,\endgroup,\expandafter,\extrarowheight,\fi,\gdef,\halignto,\hbox}
-% \DoNotIndex{\hfil,\ht,\if,\if at firstamp,\if at tempswa,\ifcase,\lineskip,\loop,\m at ne,\m at th,\message}
-% \DoNotIndex{\multiply,\or,\par,\prepnext at tok,\protect,\repeat,\setbox,\space,\string,\strutbox}
-% \DoNotIndex{\tabskip,\tabularnewline,\the,\the at toks,\thr@@,\tw@,\unhbox,\vbox,\vcenter,\vrule}
+% \DoNotIndex{\@@endpbox,\@@startpbox,\@acol,\@arstrut,\@arstrutbox,\@classiv,\@classz,\@depth}
+% \DoNotIndex{\@firstampfalse,\@firstamptrue,\@gobble,\@halignto,\@height,\@mkpream,\@ne,\@nextchar}
+% \DoNotIndex{\@preamble,\@sharp,\@tempdima,\@tempswafalse,\@tempswatrue,\@\temptokena,\@tfor}
+% \DoNotIndex{\@whilesw,\@width,\advance,\arraystretch,\baselineskip,\begingroup,\bgroup,\count}
+% \DoNotIndex{\count@,\cr,\csname,\def,\divide,\do,\dp,\edef,\egroup,\hfil,\hline,\ht,\if,\if at firstamp}
+% \DoNotIndex{\if at tempswa,\ifcase,\kill,\lineskip,\LT@@hl,\LT@@tabarray,\LT at bchunk,\LT at caption,\LT at endpbox}
+% \DoNotIndex{\LT at hline,\LT at kill,\LT at LL@FM at cr,\LT at make@row,\LT at mcol,\LT at no@pgbk,\LT at nofcols,\LT at rows}
+% \DoNotIndex{\LT at setprevdepth,\LT at startpbox,\LT at tabularcr,\LTleft,\LTright,\loop,\m at ne,\m at th,\message}
+% \DoNotIndex{\multiply,\or,\par,\prepnext at tok,\protect,\refstepcounter,\repeat,\setbox,\space,\string}
+% \DoNotIndex{\strutbox,\tabskip,\tabularnewline,\the,\the at toks,\thr@@,\tw@,\unhbox,\vbox,\vcenter,\vrule}
 % \DoNotIndex{\vskip,\vtop,\wd,\xdef,\z@,\z at skip}
-% \title{The \textsf{fcolumn} package\thanks{This file has version
-% number \fileversion, last revised \filedate.}}
+% \title{The \textsf{fcolumn} package\thanks{This file has version number \fileversion, last 
+% revised \filedate.}}
 % \author{Edgar Olthof\\
 % \texttt{edgar <dot> olthof <at> inter <dot> nl <dot> net}}
 % \date{Printed \today}
@@ -98,16 +108,16 @@
 % The package |fcolumn| provides the macros for an extra tabular specifier
 % that makes creating financial tables easy.  The column specifier |f| 
 % itself is rather simple; it is the predefined version of a generic 
-% column |F|.  The generic version expects three arguments: 1)~grouping 
+% column |F|.  The generic version expects four arguments: 1)~grouping 
 % character of the integer part on output, 2)~decimal mark used on output,
-% and 3)~compact additional information on input/output characteristics,
-% see below.
+% 3)~compact additional information on input/output characteristics, and
+% 4)~anything, but primarily used for providing formatting information, see below.
 %
 % The f-column in the current version of the package is defined for the 
-% continental European standard: |\newcolumntype{f}{F{.}{,}{3,2}}|.  This
+% continental European standard: |\newcolumntype{f}{F{.}{,}{3,2}{}}|.  This
 % means that a number like 12345,67 will be typeset as $12{.}345{,}67$.  
 % People in the Anglo-saxon world would rather code 
-% |\newcolumntype{f}{F{,}{.}{3,2}}| for the same input, yielding 
+% |\newcolumntype{f}{F{,}{.}{3,2}{}}| for the same input, yielding 
 % $12{,}345{.}67$ as output for the number given above.  The default
 % value for |#3| is |3,2|, indicating
 % that grouping of the integer part is by three digits, that a comma is
@@ -116,7 +126,7 @@
 % If however, in your country or company grouping is done with a thinspace every 
 % four digits, that the separator in the source should be the character |p|,
 % and there are three digits after the decimal mark---that happens to be a 
-% |\cdot|---, then simply specify |\newcolumntype{f}{F{\,}{\cdot}{4p3}}| in 
+% |\cdot|---, then simply specify |\newcolumntype{f}{F{\,}{\cdot}{4p3}{}}| in 
 % that case.  The input could be 12345p678 then, yielding $1{\,}2345{\cdot}678$
 % as output.
 %
@@ -125,6 +135,11 @@
 % mark) you have to explicitly specify |x,0|. If you want no grouping
 % character, specify |0,x|.
 %
+% As the fourth parameter you can insert anything just before the typesetting 
+% of an amount in a column takes place.  Its purpose is to add additional 
+% formatting information, e.g., |\color{red}| to have the contents of a column
+% coloured red, but it can be misused, so use with care. And it can't do all!
+%
 % This package requires and loads the |array| package~\cite{array}.  To
 % show where and how the |F|-column is used, let's look at some typical 
 % financial information as shown in Table~\ref{tab:ex1}
@@ -138,7 +153,7 @@
 % \midrule
 % house &      200000    & equity capital&  50000    \\
 % bank account & -603,23 & mortgage &      150000    \\
-% savings &     28000    & &                         \\
+% savings &     28000    \\
 % cash &          145,85 & profit  &        27542,62 \\
 % \sumline
 % \bottomrule
@@ -146,7 +161,7 @@
 % \end{table}
 % and how this is entered in \LaTeX\ (Table~\ref{tab:ex2}).
 % \begin{table}[htb]
-% \caption{Verbatim version of Example Table.}
+% \caption{Verbatim version of Example Table~\ref{tab:ex1}.}
 % \label{tab:ex2}
 % \begin{verbatim}
 %\begin{table}[htb]
@@ -159,7 +174,7 @@
 %\midrule
 %house &      200000    & equity capital&  50000    \\
 %bank account & -603,23 & mortgage &      150000    \\
-%savings &     28000    & &                         \\
+%savings &     28000    \\
 %cash &          145,85 & profit  &        27542,62 \\
 %\sumline
 %\bottomrule
@@ -176,17 +191,143 @@
 %
 % This package is heavily inspired by the |dcolumn| package by
 % David Carlisle~\cite{dcolumn}, some constructions are more or less 
-% copied from that package.  Version~1.2 (this version) uses a few ideas 
-% from, and incorporates quite some suggestions by, Frank Mittelbach.
+% copied from that package.  Version~1.3 (this version) incorporates the idea
+% of Christian Hoff of providing additional (formatting) information per column.
+% A rather contrived example is given in Table~\ref{tab:ex3}, combining colour and fonts.
+% \newcolumntype{q}[1]{F{.}{,}{3,2}{#1}}
+% \begin{table}[htb]
+% \caption{Example Table with column formatting.}
+% \label{tab:ex3}
+% \begin{tabular}{@{}lq{\color{red}\mathsf,{}\mathbf}lq{\color{green}}@{}}
+% \multicolumn4c{\bfseries Balance sheet}\\
+% \toprule
+% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
+% \midrule
+% house &      200000    & equity capital&  50000    \\
+% bank account & -603,23 & mortgage &      150000    \\
+% savings &     28000    \\
+% cash &          145,85 & profit  &        27542,62 \\
+% \sumline
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% How this is entered in \LaTeX\ is shown in Table~\ref{tab:ex4}.
+% \begin{table}[htb]
+% \caption{Almost verbatim version of Example Table~\ref{tab:ex3}.}
+% \label{tab:ex4}
+% \begin{verbatim}
+%\newcolumntype{q}[1]{F{.}{,}{3,2}{#1}}
+%\begin{table}[htb]
+%\caption{Example Table with column formatting.}
+%\label{tab:ex3}
+%\begin{tabular}{@{}lq{\color{red}\mathsf,{}\mathbf}lq{\color{green}}@{}}
+%\multicolumn4c{\bfseries Balance sheet}\\
+%...
+%...(same financial contents as in Table 1)
+%...
+%\end{tabular}
+%\end{table}
+% \end{verbatim}
+% \end{table}
+% The font changing commands like |\mathsf| and |\mathbf| act on an argument, hence require
+% braces, but these are already provided internally for this purpose.  For that reason this
+% type of commands must be given last, without braces (and if you don't specify a font 
+% changing command, these extra internal braces are just redundant).  The argument to 
+% the new columntype may consist of two parts,
+% separated by a comma.  In that case, the part to the left of the comma is applied to the
+% whole column and the right part is applied in addition to the result.  The example in 
+% Table~\ref{tab:ex3} shows this: the bold font is only used in the |\sumline| and the 
+% effect of |\mathsf| is annulled by the brace pair before |\mathbf|.  You may even change
+% the colour for the |\sumline|, e.g., blue by ``|,{}\color{blue}\mathbf|'', since colour
+% settings do not require braces and the last setting overrides a previous one.  If you want
+% bold font for the whole column, leave out the comma (and the |\mathsf{}|).  
 %
+% Note that changes in font size, e.g., ``|\huge|'' in ``|\huge\color{red}\mathbf|''
+% as parameter to column type |q| are ignored by \LaTeX, since the formatting 
+% information is used in math environment, which has its own way of handling this.
+% This isn't bad, as size changes in one column, without overall changes to the 
+% table look terrible.  If you want something huge, make a |\huge| table.
+% 
+% This package now also works with |longtable|~\cite{longtable}, provided
+% |longtable| is loaded before |fcolumn|; it checks for that.  For a change, 
+% the raw formatting of the multipage table is shown first, in Table~\ref{tab:ex5}.
+% For more information on how to handle |\endhead| and related commands, see the 
+% documentation of |longtable|~\cite{longtable}.
+% \begin{table}[htb]
+% \caption{Almost verbatim version of Example Table~\ref{tab:ex6}.}
+% \label{tab:ex5}
+% \begin{verbatim}
+%\begin{longtable}[l]{@{}lflf@{}}
+%\caption{\label{tab:ex6}Table showing compatibility of fcolumn and 
+%  longtable.}\\
+%\multicolumn4c{\bfseries Balance sheet}\\
+%\toprule
+%properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
+%\midrule
+%\endfirsthead
+%\caption[]{\textit{(continued from previous page)\/}}\\
+%\midrule
+%properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
+%\midrule
+%\endhead
+%\midrule
+%\multicolumn4{r@{}}{\textit{(Table continues on next page)\/}}\\
+%\endfoot
+%\bottomrule
+%\endlastfoot
+%...
+%...(somewhat altered financial contents as in Table 1)
+%...
+%\end{longtable}
+% \end{verbatim}
+% \end{table}
+%
+% \noindent And here is the result (it's ugly, but it had to be that long to 
+% demonstrate the page break).  Not shown here are the new |fcolumn|
+% formatting possibilities (like new fonts and/or colours), but it has been 
+% checked they do work in combination with |longtable|.
+% \begin{longtable}[l]{@{}lflf@{}}
+% \caption{\label{tab:ex6}Table showing compatibility of fcolumn and 
+%   longtable.}\\
+% \multicolumn4c{\bfseries Balance sheet}\\
+% \toprule
+% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
+% \midrule
+% \endfirsthead
+% \caption[]{\textit{(continued from previous page)\/}}\\
+% \midrule
+% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
+% \midrule
+% \endhead
+% \midrule
+% \multicolumn4{r@{}}{\textit{(Table continues on next page)\/}}\\
+% \endfoot
+% \bottomrule
+% \endlastfoot
+% house &      200000    & equity capital&  50000    \\
+% bank account & -603,23 & mortgage &      150000    \\
+% savings 1  &      2800    \\
+% savings 2  &      2800    \\
+% savings 3  &      2800    \\
+% savings 4  &      2800    \\
+% savings 5  &      2800    \\
+% savings 6  &      2800    \\
+% savings 7  &      2800    \\
+% savings 8  &      2800    \\
+% savings 9  &      2800    \\
+% savings 10  &      2800    \\
+% cash       &       145,85 & profit  &        27542,62 \\
+% \sumline
+% \end{longtable}
+
 % \section{Commands}
 % The user only needs to know six commands or constructions.  These six are given here.
 % \begin{macro}{F}
 % In the tabular the column specifier |F| can be given with arguments, or 
-% the predefined version~|f|, where the three arguments of |F| are |{.}|, 
-% |{,}|, and |{3,2}|.  If you want |g| to be your own definition like the 
+% the predefined version~|f|, where the four arguments of |F| are |{.}|, 
+% |{,}|, |{3,2}|, and |{}|.  If you want |g| to be your own definition like the 
 % curious one given in Section~\ref{intro}, then specify 
-% |\newcolumntype{g}{F{\,}{\cdot}{4p3}}| prior to using |g| in a tabular.
+% |\newcolumntype{g}{F{\,}{\cdot}{4p3}{}}| prior to using |g| in a tabular.
 % 
 % Entries in an F-column are, from that moment on, treated as numbers unless
 % explicitly escaped by |\leeg|, see below.  The numbers are typeset 
@@ -196,7 +337,7 @@
 % character is the dot, except when the dot is specified as input decimal
 % mark; in that case the comma is acting as input grouping character.  With 
 % this convention the continental Europe and Anglo-saxon part of the world 
-% is served. 
+% is served.  And using input grouping markers is optional.
 % \end{macro}
 % \begin{macro}{\sumline}
 % The numbers in an |F|-column are typeset as a financial amount, but the real
@@ -207,7 +348,7 @@
 % \item It generates a rule with width calculated in the first item;
 % \item It checks the columns that are supposed to balance whether or not they
 % actually do.  If so, nothing happens.  If not, a |\PackageWarning| is given 
-% that column $i$ and $j$ do not balance, where $i$ and $j$ are the relevant 
+% that column~$i$ and~$j$ do not balance, where $i$ and $j$ are the relevant 
 % columns.  This is only done if the total number of |F|-columns is even, 
 % e.g., if there are six |F|-columns, then~1 is checked against~4, 2 against~5, 
 % and 3 against~6.  If the number of |F|-columns is odd then anything could be
@@ -217,7 +358,10 @@
 % By default the vertical separation between the rule and the total is 
 % 2\thinspace pt, but this can be changed by the optional argument to 
 % |\sumline|. Give, e.g., |\sumline[10pt]|, in case you want this spacing
-% to be 10\thinspace pt.
+% to be 10\thinspace pt.  And you may even give two options, like in 
+% |\sumline[10pt][5pt]|, in which the second option is the extra space below
+% the summary row.  In fact that second option is the option to |\\| that is
+% implicit in |\sumline|.
 % \end{macro}
 % \begin{macro}{\resetsumline}
 % Suppose you want to typeset one tabular with the profit-and-loss of many
@@ -224,11 +368,11 @@
 % projects individually.  The layout of those tabulars is the same and it 
 % were nice if all columns were aligned.  This can be done by making it one
 % big tabular with a fresh start for each project.  The macro 
-% |\resetsumlines| is used for that: it resets all totals and all column 
-% widths, see for example Table~\ref{tab:ex3}.
+% |\resetsumline| is used for that: it resets all totals and all column 
+% widths, see for example Table~\ref{tab:ex7}.
 % \begin{table}[htb]
 % \caption{Example: multiple projects.}
-% \label{tab:ex3}
+% \label{tab:ex7}
 % \begin{tabular}{@{}lfflff@{}}
 % \multicolumn6c{\bfseries Project~1}\\
 % \toprule
@@ -256,10 +400,10 @@
 % Note that the rules in the first and third |F|-columns of project~1 cover
 % $1{.}200{,}00$ whereas in project~2 those rules are narrower since they 
 % only cover $430{,}00$; still the columns are aligned.  The verbatim way
-% of setting up Table~\ref{tab:ex3} is given in Table~\ref{tab:ex4}.
+% of setting up Table~\ref{tab:ex7} is given in Table~\ref{tab:ex6}.
 % \begin{table}[htb]
-% \caption{Verbatim version of Table~\ref{tab:ex3}.}
-% \label{tab:ex4}
+% \caption{Verbatim version of Table~\ref{tab:ex7}.}
+% \label{tab:ex8}
 % \begin{verbatim}
 %\begin{table}[htb]
 %\caption{Example: multiple projects.}
@@ -317,7 +461,9 @@
 % even other ways.  By default (for aesthetic reasons) |fcolumn| typesets
 % it with a minus~sign, but strict accounting prescibes that the number 
 % should be put between parentheses.  The latter can be accomplished by 
-% setting |\strict at ccountingtrue|. 
+% setting |\strict at ccountingtrue|.  But since this contains a non-letter,
+% it is also possible to invoke |fcolumn| with the option |strict|, i.e.,
+% |\usepackage[strict]{fcolumn}|, which sets this flag.
 % \end{macro}
 % \StopEventually{\PrintChanges\PrintIndex}
 % \section{The macros}
@@ -339,8 +485,8 @@
 % column type |f| does not use private macros (no~|@|), so overriding its 
 % definition is easy for a user.
 %    \begin{macrocode}
-\newcolumntype{F}[3]{>{\b at fi{#1}{#2}{#3}}r<{\e at fi}}
-\newcolumntype{f}{F{.}{,}{3,2}}
+\newcolumntype{F}[4]{>{\b at fi{#1}{#2}{#3}{#4}}r<{\e at fi}}
+\newcolumntype{f}{F{.}{,}{3,2}{}}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -374,21 +520,25 @@
 %    \end{macrocode}
 % Actually |\geldm at cro| is only a wrapper around |\g at ldm@cro|.
 %    \begin{macrocode}
-\def\geldm at cro#1#2{\withs at pfalse 
+\def\geldm at cro#1#2{\withs at pfalse
 \afterassignment\g at ldm@cro\count@#1\relax{#2}}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\g at ldm@cro}
-% This macro starts by looking at the sign of |#2|: if it is negative, it prints 
+% After setting the environment for formatting, this macro starts by looking 
+% at the sign of |#2|: if it is negative, it prints 
 % the correct indicator (a parenthesis or a minus sign), assigns the absolute value 
 % of~|#2| to |\count2| and goes on.  Note that |\geldm at cro| and therefore |\g at ldm@cro|
 % are always used within |$|s, so it is really a minus sign that is printed, not a hyphen.
 % All calculations are done with |\count0|, |\count1|, etc.\ i.e., without |F|-column-specific
 % \meta{count}s because it is all done locally.  Leaving the tabular environment will 
-% restore their values.
+% restore their values.  This is also true for the effect of |\FCform at t|, so that formatting
+% information is local to this column.  The reason for inserting the opening brace between 
+% |\FCform at t| and |\ifnum| (and the accompanying closing brace after |\fi|) is to facilitate
+% the possible use of |\mathbf| or any other font changing command as the last item in |\FCform at t|. 
 %    \begin{macrocode}
-\def\g at ldm@cro#1\relax#2{\ifnum#2<0 \ifstrict at ccounting (\else -\fi
-  \count2=-#2 \else\count2=#2 
+\def\g at ldm@cro#1\relax#2{\FCform at t{\ifnum#2<0 \ifstrict at ccounting (\else 
+  -\fi \count2=-#2 \else\count2=#2 
 \fi
 %    \end{macrocode}
 % Calculate the entire currency units: this is the result of $x/a$ as integer
@@ -450,7 +600,7 @@
   \rlap{)~!}\else\rlap{~!}\fi\else\ifstrict at ccounting
   \rlap{\phantom{)}~!}\else\rlap{~!}\fi\fi
 \else \ifnum#2<0 \ifstrict at ccounting\rlap{)}\fi\fi
-\fi}
+\fi}}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\g at ldens}
@@ -470,7 +620,7 @@
 % about 100 times the current world economy~\cite{world_economy}. Yet
 % another method is to used Heiko Oberdiek's package |bigintcalc|:
 % then only memory restrictions apply.  This, however, requires a major
-% rewrite of |fcolumn|. For now, version~1.2 sticks to the moderate amounts.
+% rewrite of |fcolumn|. For now, version~1.3 sticks to the moderate amounts.
 %
 % There is no straightforward interpretation of |#1| being zero or 
 % negative, therefore this is used as an indicator that no grouping
@@ -551,7 +701,7 @@
 % First it checks whether there is a risk of overflow in this step.  If
 % $A$ and $B$ are two \TeX-registers and $B$ is to be added to $A$, 
 % overflow will not occur if one is (or both are) zero or if $A$ and~$B$
-% have different signs.  Otherwise, be careful. Note that \TeX\ does not
+% have different signs.  Otherwise, be careful.  Note that \TeX\ does not
 % check for overflow when performing an |\advance| (done in section~1238
 % of Ref.~\cite{CandTB}), in contrast to |\multiply|, see section~105.
 %    \begin{macrocode}
@@ -568,13 +718,13 @@
 \global\advance\csname FCtot@\romannumeral\FCsc at l\endcsname by \count0
 \ifx\FCs at gn\m at ne 
 %    \end{macrocode}
-% They had the same sign: risk of overflow. Record the sign
+% They had the same sign: risk of overflow.  Record the sign
 % of |\count0| (and of the original total of this column; they were 
-% the same) in |\FCs at gn|. Table~\ref{tab:ex5} 
+% the same) in |\FCs at gn|. Table~\ref{tab:ex9} 
 % \begin{table}[htb]
-% \def\PackageError#1#2#3{\PackageWarning{#1}{#2}}
+% \def\PackageError#1#2#3{\PackageWarning{#1}{#2: #3}}
 % \caption{Examples on overflow.}
-% \label{tab:ex5}
+% \label{tab:ex9}
 % \begin{tabular}{@{}lfff@{}}
 % \multicolumn4c{\bfseries Projects}\\
 % \toprule
@@ -605,7 +755,9 @@
   \ifnum\count0<0 
     \let\FCs at gn=\m at ne
     \PackageError{fcolumn}{Register overflow}{Overflow occurred
-    in fcolumn \number\FCsc at l. Check your table.}%
+    in fcolumn \number\FCsc at l. You can press <enter> now and I'll
+    proceed,\MessageBreak but check your table. The offending entry is 
+    indicated with an exclamation\MessageBreak mark in the output.}%
   \else\let\FCs at gn=\@ne
   \fi
 \fi
@@ -618,22 +770,27 @@
 \fi\unhbox0}
 %    \end{macrocode}
 % \end{macro}
+%
+% The \meta{count}s |\FC at l| captures the part to the left of the decimal 
+% mark, |\FC at r| that to the right.
+%    \begin{macrocode}
+\newcount\FC at l \newcount\FC at r
+%    \end{macrocode}
+% Some auxiliary definitions for capturing compacted information.
+%    \begin{macrocode}
+\def\setucc at de#1#2\relax{\uccode`\~=`#1 }
+\def\assignform at t#1,#2,#3\end{\def\FCform at t{#1}\def\FCform at tt{#1#2}}
+%    \end{macrocode}
 % \def\<#1>{\leavevmode\hbox{$\langle$#1\/$\rangle$}}
 % \begin{macro}{\b at fi}
 % The macro |\b at fi| provides the beginning of the financial column.  It
-% will be inserted in the column to capture the number entered by the user
+% will be inserted in the column to capture the number entered by the user.
 % The separator and decimal mark are within a math environment, so you
 % can indeed specify |\,| instead of |\thinspace|, but there is an extra
 % brace around, so it doesn't affect the spacing between the digits 
 % (trick copied from |dcolumn|, Ref.~\cite{dcolumn}).
-%
-% The \meta{count}s |\FC at l| captures the part to the left of the decimal 
-% marker, |\FC at r| that to the right.
 %    \begin{macrocode}
-\newcount\FC at l \newcount\FC at r
-\def\FC at chklist{}
-\def\setucc at de#1#2\relax{\uccode`\~=`#1 }
-\def\b at fi#1#2#3{%
+\def\b at fi#1#2#3#4{%
 %    \end{macrocode}
 % An intermediate macro |\sep at xt| to extract the first character
 % of |#1|, which in most cases will be the only character.
@@ -640,7 +797,7 @@
 %    \begin{macrocode}
 \def\sep at xt##1##2\end{\def\sep at rator{{##1}}}%
 \sep at xt#1\end\def\decim at lmark{{#2}}%
-\def\sp at l{#3}\global\advance\FCsc at l by \@ne
+\def\sp at l{#3}\assignform at t#4,,\end \global\advance\FCsc at l by \@ne
 \global\FC at l=0 \global\FC at r=1
 %    \end{macrocode}
 % The value specified by the user is then captured by |\FC at l| and 
@@ -651,23 +808,23 @@
 % There are four parts to an |F|-column entry, all parts optional,
 % making 16 combinations.  The sequence is
 % (in the Backus--Naur notation of Ref.~\cite{CandTA}):
-% \<sign> \<integer constant> \<decimal marker>
+% \<sign> \<integer constant> \<decimal mark>
 % \<integer constant>. Here \<sign> is a plus or minus character with 
 % category code~12, \<integer constant> is a sequence of zero
-% or more (decimal) \<digit>s, and \<decimal marker> is the middel 
+% or more (decimal) \<digit>s, and \<decimal mark> is the middel 
 % part of |#3|, i.e., the comma in |3,2| or the period in |3.2|.
-% If the \<decimal marker> is absent with no space characters between 
+% If the \<decimal mark> is absent with no space characters between 
 % the two \<integer constant> terms, these merge, making four redundant
-% entries.  One of the 
-% combinations is \<empty>, a sequence of exactly zero non-space tokens:
-% this is the only combination that doesn't put anything in an |F|-column.
+% entries.  One of the combinations is \<empty>, a sequence of exactly 
+% zero non-space tokens: this is the only combination that doesn't put 
+% anything in an |F|-column---and was the most difficult part to handle.
 %
 % The minus sign must be captured separately, because in an entry like
 % |-0,07| the 7~cents are negative, but this cannot be seen from the
-% integer part, since $-0$ is $0$ in \TeX\ (in fact in most computer
-% languages, but not in~MIX~\cite{TAOCP1}), so |\ifnum-0<0| yields false.
-% |\FCs at gn| is a general purpose flag.  Its first use is to capture
-% the sign.
+% part to the left of the decimal mark, since $-0$ is~$0$ in \TeX\ (in 
+% fact in most computer languages, but not in~MIX~\cite{TAOCP1}), so 
+% |\ifnum-0<0| yields |false|. |\FCs at gn| is a general purpose flag.  Its 
+% first use is to capture the sign.
 %    \begin{macrocode}
 \let\FCs at gn=\@ne\relax \setbox0\hbox\bgroup$%   
 %    \end{macrocode}
@@ -726,7 +883,7 @@
 \ifnum\count@=\mathcode`- \expandafter\global\FC at l=\the\FC at l
 \else \expandafter\global\FC at r=\the\FC at r\fi}%
 %    \end{macrocode}
-% The signs are relatively simply: record the sign, restore |\mathcode|s if
+% The signs are relatively simple: record the sign, restore |\mathcode|s if
 % needed (it should be: a minus sign between digits screws up everything),
 % and start scanning the number.
 %    \begin{macrocode}
@@ -744,7 +901,7 @@
 \mathcode`-="8000 \mathcode`+=\mathcode`- \mathcode`.=\mathcode`- 
 %    \end{macrocode}
 % These three remain active until the |$| in |\e at fi| is encountered.
-% The following ones will, in the general case, have their activeness 
+% The following ones will, except in the \<empty> case, have their activeness 
 % turned off at some time.
 %    \begin{macrocode}
 \def\actdecm at rk##1##2\relax{\ifx##1.\relax \mathcode`,=\mathcode`-
@@ -765,21 +922,24 @@
 % globally to a negative value.  This doesn't harm, because it didn't 
 % contain relevant information anyway.  Outside the group, the sign
 % of |\FC at r| can then be tested.  This is a slight misuse of this
-% |\count|, but now it's documented.
-%
-% If there was no decimal sign or if there was a decimal sign but no 
-% decimal part, |\FC at r| will still be~1, which doesn't parse well with
-% |\secd at xt|, so a zero is appended.
+% |\count|, but now it's documented.  In effect, |\FC at r| can only be~|-1|, 
+% |1|, or at least~|10|, so the comparison |\ifnum\FC at r>0| does not mis~0.
 %    \begin{macrocode}
 \def\e at fi{\ifnum\mathcode`\0=\mathcode`- \global\FC at r=\m at ne\fi$\egroup
 \ifnum\FC at r>0
- \ifnum\FC at r<10 \multiply\FC at r by 10 \fi
 %    \end{macrocode}
-% Next is a loop for bringing the decimal part in the correct way to the 
+% If there was no decimal mark or if there was a decimal mark but no 
+% decimal part, |\FC at r| will still be~1, which doesn't parse well with
+% |\secd at xt|, so a zero is appended, i.e., yielding~|10|.
+%    \begin{macrocode}
+ \ifnum\FC at r<10 \FC at r=10 \fi
+%    \end{macrocode}
+% Next is a loop for bringing the decimal part in the correct way to
 % the integer part.  The loop is performed the number of decimal
 % digits to be printed (the~2 in |3,2| of the default setting).  This also
-% means that if you specified more decimal digits than this, the excess 
-% digit(s) will not be handled and a |\PackageWarning| will be given.
+% means that if you provided more decimal digits than this, the excess 
+% digit(s) will not be handled and a |\PackageWarning| will be given,
+% showing these excess digits.  This is truncation, not rounding!
 %    \begin{macrocode}
  \def\i at ts##1##2{\count0=##2}
  \afterassignment\i at ts\count@\sp at l
@@ -896,22 +1056,23 @@
 \let\@@array=\@array
 %    \end{macrocode}
 % \end{macro}
+% Much of the techniques here are repeated in |\LT at array|.
 % \subsection{The sumline, close to a postamble}
 % \begin{macro}{\@mksumline}
 % The construction of the sumline is much easier than that of the preamble
 % for several reasons.  It may be safely assumed that the preamble specifier
 % is grammatically correct because it has already been screened by |\@mkpream|.
-% Furthermore most entries will simply add nothing to |\s at ml@ne|, e.g., |@|, |!|,
+% Furthermore, most entries will simply add nothing to |\s at ml@ne|, e.g., |@|, |!|,
 % and \verb+|+ can be fully ignored. Ampersands are only inserted by |c|, |l|, |r|,  
 % |p|, |m|, and |b|.  So a specifier like |@{}lflf@{}| will yield the sumline
 % |&\a&&\a\\|, (where |\a| is a macro that prints the desired result of the column, 
-% see later).  Had the specifier been \verb+l|f||@{   }l|f+, then the same sumline must
+% see below).  Had the specifier been \verb+l|f||@{   }l|f+, then the same sumline must
 % be constructed: all difficulties are already picked up and solved in the creation
 % of the preamble.
 %
 % In reality the sumline must be constructed from the expanded form of the
 % specifier, so |@{}lf@{}| will expand as
-% |@{}l>{\b at fi{.}{,}{3,2}}r<{\e at fi}@{}|. The rules for constructing the 
+% |@{}l>{\b at fi{.}{,}{3,2}{}}r<{\e at fi}@{}|. The rules for constructing the 
 % sumline are now very simple:
 % \begin{compactitem}[$\bullet$]
 % \item add an ampersand when |c|, |l|, |r|, |p|, |m|, or |b| is found, 
@@ -925,7 +1086,7 @@
 % be written, but that is not necessary: |\@testpach| can do all the work,
 % although much of it will be discarded.  Here speed is sacrificed for space
 % and this can be afforded because the creation of the sumline is done only 
-% once per |\tabular|.
+% once per |\tabular| or |\longtable|.
 % 
 % The start is copied from |\@mkpream|.
 %    \begin{macrocode}
@@ -939,12 +1100,9 @@
 %    \end{macrocode}
 % Then |\@mkpream| is picked up again.
 %    \begin{macrocode}
-\@temptokena{#1}
-\@tempswatrue
+\@temptokena{#1}\@tempswatrue
 \@whilesw\if at tempswa\fi{\@tempswafalse\the\NC at list}%
-\count0\m at ne
-\let\the at toks\relax
-\prepnext at tok
+\count0\m at ne\let\the at toks\relax\prepnext at tok
 %    \end{macrocode}
 % Next is the loop over all tokens in the expanded form of the specifier.  The change
 % with respect to |\@mkpream| is that the body of the loop is now only dealing
@@ -955,10 +1113,8 @@
 \expandafter \@tfor \expandafter \@nextchar
  \expandafter :\expandafter =\the\@temptokena \do
  {\@testpach
- \ifcase \@chclass \@classfz
-  \or \or \@classfii \or
-  \or \or \or \or \or \or \or \@classfx \fi
- \@lastchclass\@chclass}%
+ \ifcase \@chclass \@classfz \or \or \@classfii \or \or \or \or \or
+ \or \or \or \@classfx \fi\@lastchclass\@chclass}%
 %    \end{macrocode}
 % And the macro is finished by applying the |\aut at check| and appending the 
 % |\\| to the sumline.  Note that the |\aut at check| is performed {\itshape 
@@ -1006,7 +1162,8 @@
  \edef\t at stn{\string\e at fi}
  \ifx\t at stm\t at stn
 %    \end{macrocode}
-% If both tests yield |true| then add the macro to typeset everything.
+% If both tests yield |true|, i.e., we encountered a |<{\e at fi}| where we expect one to 
+% find, then add the macro to typeset everything.
 %    \begin{macrocode}
   \@addtosumline{\prr at sult}
 %    \end{macrocode}
@@ -1074,12 +1231,14 @@
 \def\sumline{\@ifnextchar[\s at mline{\s at mline[2pt]}}
 \def\s at mline[#1]{\global\s at mlinesep=#1 \s at ml@ne}
 %    \end{macrocode}
+% In the introduction it was stated that |\sumline| has two options, but in 
+% reality that second option is the option to |\\| that is issued by |\s at ml@ne|.
 % \end{macro}
 % \begin{macro}{\prr at sult}
 % The macro |\prr at sult| actually puts the information together.  It starts
 % like |\leeg|.
 %    \begin{macrocode}
-\def\prr at sult{$\egroup \let\e at fi=\relax
+\def\prr at sult{$\egroup \let\e at fi=\relax \let\FCform at t=\FCform at tt
 %    \end{macrocode}
 % Then the information for the last line is computed.  It is not sufficient
 % to calculate the width of the result (in points) to use that as the width
@@ -1126,7 +1285,7 @@
 % table but it doesn't increase the totals of that column by~3 (assuming 
 % |3,2| coding for the separations).  But you won't cheat, won't you?  
 % It may affect the width, so be careful: don't insert the unabridged 
-% version of Romeo and Julia here.
+% version of Romeo and Juliet~\cite{RJ} here.
 % \end{macro}
 % \begin{macro}{\res at tsumline}
 % Since all changes to the totals and widths of the columns are global,
@@ -1168,6 +1327,7 @@
 % If the list |\FC at chklist| is empty, the list for the automatic check is
 % generated (which will remain empty if |\FCsc at l| is odd).
 %    \begin{macrocode}
+\def\FC at chklist{}
 \def\aut at check{\ifx\@empty\FC at chklist\relax
  \ifodd\FCsc at l\else 
   \count0=\@ne \count1=\FCsc at l 
@@ -1217,12 +1377,84 @@
 \def\checkfcolumns#1#2{\noalign{\xdef\FC at chklist{\FC at chklist #1,#2;}}}
 %    \end{macrocode}
 % \end{macro}
+% \subsection{Support for package longtable}
+% Package |longtable| is used for tables that may span multiple pages. |fcolumn| and
+% |longtable| work together as long as |longtable| is loaded first, so that |fcolumn|
+% can adapt one definition of |longtable|. If |longtable| is not loaded, that definition 
+% is just that: a definition.  If |longtable| is loaded before |fcolumn|, it is a 
+% redefinition, and it should be.  For that reason the user is warned (not loading 
+% |longtable| is not an error if you don't use it) if |fcolumn| is loaded without prior 
+% loading of |longtable|.
+%    \begin{macrocode}
+\ifx\longtable\@undefined
+ \PackageWarning{fcolumn}{fcolumn is loaded without longtable. That's 
+ OK, but\MessageBreak if you want to load longtable as well, make sure
+ \MessageBreak it is done before loading fcolumn}
+\fi
+%    \end{macrocode}
+% \begin{macro}{\LT at array}
+% And here is the only definition of |longtable| that needs to be adapted a bit, to make 
+% |fcolumn| work with that package.
+%    \begin{macrocode}
+\def\LT at array[#1]#2{%
+  \refstepcounter{table}\stepcounter{LT at tables}%
+  \if l#1 \LTleft\z@\LTright\fill
+  \else\if r#1 \LTleft\fill\LTright\z@
+  \else\if c#1 \LTleft\fill\LTright\fill
+  \fi\fi\fi
+  \let\LT at mcol\multicolumn\let\LT@@tabarray\@tabarray\let\LT@@hl\hline
+  \def\@tabarray{\let\hline\LT@@hl \LT@@tabarray}%
+  \let\\\LT at tabularcr\let\tabularnewline\\%
+  \def\newpage{\noalign{\break}}%
+  \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT at no@pgbk-}4}%
+  \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT at no@pgbk4}%
+  \let\hline\LT at hline\let\kill\LT at kill\let\caption\LT at caption
+  \@tempdima\ht\strutbox\let\@endpbox\LT at endpbox
+  \ifx\extrarowheight\@undefined
+    \let\@acol\@tabacol\let\@classz\@tabclassz\let\@classiv\@tabclassiv
+    \def\@startpbox{\vtop\LT at startpbox}\let\@@startpbox
+    \@startpbox\let\@@endpbox\@endpbox\let\LT at LL@FM at cr\@tabularcr
+  \else
+    \advance\@tempdima\extrarowheight \col at sep\tabcolsep
+    \let\@startpbox\LT at startpbox\let\LT at LL@FM at cr\@arraycr
+  \fi
+  \setbox\@arstrutbox\hbox{\vrule\@height\arraystretch\@tempdima
+    \@depth\arraystretch\dp\strutbox\@width\z@}%
+  \let\@sharp##\let\protect\relax
+   \begingroup
+    \@mkpream{#2}%
+    \xdef\LT at bchunk{%
+       \global\advance\c at LT@chunks\@ne\global\LT at rows\z@
+       \setbox\z@\vbox\bgroup\LT at setprevdepth\tabskip\LTleft
+       \noexpand\halign to\hsize\bgroup\tabskip\z@\@arstrut
+       \@preamble\tabskip\LTright\cr}%
+  \endgroup
+%    \end{macrocode}
+% Until this line it was just the code for |\LT at array| from package |longtable|.
+% The five lines of the next chunk are new to |\LT at array|.  Their 
+% purpose is the same as in |\@array| above.
+%    \begin{macrocode}
+  \begingroup
+  \@mksumline{#2}%
+  \endgroup
+  \res at tsumline
+  \everycr{\noalign{\global\FCsc at l=0 }}% 
+%    \end{macrocode}
+% From here on |\LT at array| is picked up again.
+%    \begin{macrocode}
+  \expandafter\LT at nofcols\LT at bchunk&\LT at nofcols
+  \LT at make@row\m at th\let\par\@empty
+  \lineskip\z@\baselineskip\z@\LT at bchunk}
+%    \end{macrocode}
+% \end{macro}
 % That's it!
 % \section*{Acknowledgement}
 % Thanks to Karl Berry for valuable comments regarding the consistency of
 % the installation procedure of this version.  Frank Mittelbach gave 
 % various useful suggestions for improving the input parsing as well as
-% hints to make the package more \LaTeX-like. 
+% hints to make the package more \LaTeX-like. He also challenged me to make |fcolumn|
+% compatible with |longtable|.  Christian Hoff's request on column formatting triggered
+% many happy hours of coding.
 % \bibliographystyle{plain}
 % \begin{thebibliography}{9}
 % \itemsep0pt
@@ -1232,10 +1464,12 @@
 %    A new implementation of \LaTeX's |tabular| and |array| environment.
 % \bibitem{booktabs} Simon Fear.  Publication quality tables in \LaTeX.
 % \bibitem{dcolumn} David Carlisle.  The |dcolumn| package.
+% \bibitem{longtable} David Carlisle.  The |longtable| package.
 % \bibitem{world_economy} According to the IMF \url{www.imf.org}.
 % \bibitem{CandTB} Donald Knuth, Computers \& Typesetting/B, \TeX: the program.
 % \bibitem{CandTA} Donald Knuth, Computers \& Typesetting/A, The \TeX book.
 % \bibitem{TAOCP1} Donald Knuth, The Art of Computers Programming, volume~1.
+% \bibitem{RJ} William Shakespeare, Romeo and Juliet, a tragedy (1597).
 % \end{thebibliography}
 % \Finale
 \endinput

Modified: trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.ins	2021-01-15 21:50:13 UTC (rev 57427)
+++ trunk/Master/texmf-dist/source/latex/fcolumn/fcolumn.ins	2021-01-15 21:50:38 UTC (rev 57428)
@@ -17,7 +17,7 @@
 
 This is a generated file.
 
-Copyright (C) 2015--2019 by Edgar Olthof
+Copyright (C) 2015--2021 by Edgar Olthof
 
 This file may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either
@@ -42,9 +42,9 @@
 \Msg{*   fcolumn.sty                                       *}
 \Msg{*                                                     *}
 \Msg{* into a directory searched by TeX.                   *}
-\Msg{*    To produce the documentation, run the file       *}
-\Msg{* fcolumn.dtx through LaTeX.  Make sure to update     *}
-\Msg{* the glossary and index by makeindex:                *}
+\Msg{*    To produce the documentation, type ``make'' or   *}
+\Msg{* run the file fcolumn.dtx through LaTeX.  Make sure  *}
+\Msg{* to update the glossary and index by makeindex:      *}
 \Msg{*                                                     *}
 \Msg{*   makeindex -s gglo.ist -o fcolumn.gls fcolumn.glo  *}
 \Msg{*   makeindex -s gglo.ist -o fcolumn.ind fcolumn.idx  *}

Modified: trunk/Master/texmf-dist/tex/latex/fcolumn/fcolumn.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fcolumn/fcolumn.sty	2021-01-15 21:50:13 UTC (rev 57427)
+++ trunk/Master/texmf-dist/tex/latex/fcolumn/fcolumn.sty	2021-01-15 21:50:38 UTC (rev 57428)
@@ -8,7 +8,7 @@
 %% 
 %% This is a generated file.
 %% 
-%% Copyright (C) 2015--2019 by Edgar Olthof
+%% Copyright (C) 2015--2021 by Edgar Olthof
 %% 
 %% This file may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either
@@ -20,20 +20,21 @@
 %% and version 1.3 or later is part of all distributions of
 %% LaTeX version 1999/12/01 or later.
 \ProvidesPackage{fcolumn}
-          [2019/04/24 v1.2 Automatic Currency Package (EHTO)]
+          [2021/01/14 v1.3 Automatic Currency Package (EHTO)]
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{array}[v2.4k]
+
 \newif\ifstrict at ccounting \strict at ccountingfalse
 \DeclareOption{strict}{\strict at ccountingtrue}
 \ProcessOptions
-\newcolumntype{F}[3]{>{\b at fi{#1}{#2}{#3}}r<{\e at fi}}
-\newcolumntype{f}{F{.}{,}{3,2}}
+\newcolumntype{F}[4]{>{\b at fi{#1}{#2}{#3}{#4}}r<{\e at fi}}
+\newcolumntype{f}{F{.}{,}{3,2}{}}
 \newcount\FCsc at l \FCsc at l=0 \newcount\FCtc at l \FCtc at l=0
 \newif\ifwiths at p
 \def\geldm at cro#1#2{\withs at pfalse
 \afterassignment\g at ldm@cro\count@#1\relax{#2}}
-\def\g at ldm@cro#1\relax#2{\ifnum#2<0 \ifstrict at ccounting (\else -\fi
-  \count2=-#2 \else\count2=#2
+\def\g at ldm@cro#1\relax#2{\FCform at t{\ifnum#2<0 \ifstrict at ccounting (\else
+  -\fi \count2=-#2 \else\count2=#2
 \fi
 \count4=\ifx\relax#1\relax 2 \else \@gobble#1\relax\fi
 \count3=0
@@ -58,7 +59,7 @@
   \rlap{)~!}\else\rlap{~!}\fi\else\ifstrict at ccounting
   \rlap{\phantom{)}~!}\else\rlap{~!}\fi\fi
 \else \ifnum#2<0 \ifstrict at ccounting\rlap{)}\fi\fi
-\fi}
+\fi}}
 \def\g at ldens#1{{\count3=\count2 \count0=#1
 \ifnum\count0<1 \count0=3 \fi
 \loop \ifnum\count0>0 \divide\count2 by 10 \advance\count0 by \m at ne
@@ -103,7 +104,9 @@
   \ifnum\count0<0
     \let\FCs at gn=\m at ne
     \PackageError{fcolumn}{Register overflow}{Overflow occurred
-    in fcolumn \number\FCsc at l. Check your table.}%
+    in fcolumn \number\FCsc at l. You can press <enter> now and I'll
+    proceed,\MessageBreak but check your table. The offending entry is
+    indicated with an exclamation\MessageBreak mark in the output.}%
   \else\let\FCs at gn=\@ne
   \fi
 \fi
@@ -112,12 +115,12 @@
  \global\csname FCwd@\romannumeral\FCsc at l\endcsname=\wd0
 \fi\unhbox0}
 \newcount\FC at l \newcount\FC at r
-\def\FC at chklist{}
 \def\setucc at de#1#2\relax{\uccode`\~=`#1 }
-\def\b at fi#1#2#3{%
+\def\assignform at t#1,#2,#3\end{\def\FCform at t{#1}\def\FCform at tt{#1#2}}
+\def\b at fi#1#2#3#4{%
 \def\sep at xt##1##2\end{\def\sep at rator{{##1}}}%
 \sep at xt#1\end\def\decim at lmark{{#2}}%
-\def\sp at l{#3}\global\advance\FCsc at l by \@ne
+\def\sp at l{#3}\assignform at t#4,,\end \global\advance\FCsc at l by \@ne
 \global\FC at l=0 \global\FC at r=1
 \let\FCs at gn=\@ne\relax \setbox0\hbox\bgroup$%
 \uccode`\~=`0\relax \uppercase{\def~}{\restorem at thcodes \global\FC at l=0}
@@ -157,7 +160,7 @@
 \mathcode`\8=\mathcode`- \mathcode`\9=\mathcode`- }
 \def\e at fi{\ifnum\mathcode`\0=\mathcode`- \global\FC at r=\m at ne\fi$\egroup
 \ifnum\FC at r>0
- \ifnum\FC at r<10 \multiply\FC at r by 10 \fi
+ \ifnum\FC at r<10 \FC at r=10 \fi
  \def\i at ts##1##2{\count0=##2}
  \afterassignment\i at ts\count@\sp at l
  \loop\ifnum\count0>0 \multiply\FC at l by 10
@@ -207,19 +210,14 @@
 \def\@mksumline#1{\gdef\s at ml@ne{}\@lastchclass 4 \@firstamptrue
 \global\FCsc at l=0
 \let\prr at sult=\relax
-\@temptokena{#1}
-\@tempswatrue
+\@temptokena{#1}\@tempswatrue
 \@whilesw\if at tempswa\fi{\@tempswafalse\the\NC at list}%
-\count0\m at ne
-\let\the at toks\relax
-\prepnext at tok
+\count0\m at ne\let\the at toks\relax\prepnext at tok
 \expandafter \@tfor \expandafter \@nextchar
  \expandafter :\expandafter =\the\@temptokena \do
  {\@testpach
- \ifcase \@chclass \@classfz
-  \or \or \@classfii \or
-  \or \or \or \or \or \or \or \@classfx \fi
- \@lastchclass\@chclass}%
+ \ifcase \@chclass \@classfz \or \or \@classfii \or \or \or \or \or
+ \or \or \or \@classfx \fi\@lastchclass\@chclass}%
 \xdef\s at ml@ne{\s at ml@ne\noexpand\aut at check\noexpand\\}}
 \def\@addtosumline#1{\xdef\s at ml@ne{\s at ml@ne #1}}
 \def\@classfx{\if at firstamp \@firstampfalse \else \@addtosumline &\fi}
@@ -256,7 +254,7 @@
 \newdimen\s at mlinesep
 \def\sumline{\@ifnextchar[\s at mline{\s at mline[2pt]}}
 \def\s at mline[#1]{\global\s at mlinesep=#1 \s at ml@ne}
-\def\prr at sult{$\egroup \let\e at fi=\relax
+\def\prr at sult{$\egroup \let\e at fi=\relax \let\FCform at t=\FCform at tt
 \setbox0=\hbox{$\geldm at cro{\sp at l}{\number\csname
 FCtot@\romannumeral\FCsc at l\endcsname}$}%
 \ifdim\wd0>\csname FCwd@\romannumeral\FCsc at l\endcsname
@@ -271,6 +269,7 @@
  \global\csname FCwd@\romannumeral\FCsc at l\endcsname=\z@
  \advance\FCsc at l by \m at ne\repeat}
 \def\resetsumline{\noalign{\res at tsumline}}
+\def\FC at chklist{}
 \def\aut at check{\ifx\@empty\FC at chklist\relax
  \ifodd\FCsc at l\else
   \count0=\@ne \count1=\FCsc at l
@@ -294,6 +293,52 @@
 \repeat}
 \def\fre at t#1,#2;#3\end{\count0=#1 \count1=#2 \xdef\FC at chklist{#3}}
 \def\checkfcolumns#1#2{\noalign{\xdef\FC at chklist{\FC at chklist #1,#2;}}}
+\ifx\longtable\@undefined
+ \PackageWarning{fcolumn}{fcolumn is loaded without longtable. That's
+ OK, but\MessageBreak if you want to load longtable as well, make sure
+ \MessageBreak it is done before loading fcolumn}
+\fi
+\def\LT at array[#1]#2{%
+  \refstepcounter{table}\stepcounter{LT at tables}%
+  \if l#1 \LTleft\z@\LTright\fill
+  \else\if r#1 \LTleft\fill\LTright\z@
+  \else\if c#1 \LTleft\fill\LTright\fill
+  \fi\fi\fi
+  \let\LT at mcol\multicolumn\let\LT@@tabarray\@tabarray\let\LT@@hl\hline
+  \def\@tabarray{\let\hline\LT@@hl \LT@@tabarray}%
+  \let\\\LT at tabularcr\let\tabularnewline\\%
+  \def\newpage{\noalign{\break}}%
+  \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT at no@pgbk-}4}%
+  \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT at no@pgbk4}%
+  \let\hline\LT at hline\let\kill\LT at kill\let\caption\LT at caption
+  \@tempdima\ht\strutbox\let\@endpbox\LT at endpbox
+  \ifx\extrarowheight\@undefined
+    \let\@acol\@tabacol\let\@classz\@tabclassz\let\@classiv\@tabclassiv
+    \def\@startpbox{\vtop\LT at startpbox}\let\@@startpbox
+    \@startpbox\let\@@endpbox\@endpbox\let\LT at LL@FM at cr\@tabularcr
+  \else
+    \advance\@tempdima\extrarowheight \col at sep\tabcolsep
+    \let\@startpbox\LT at startpbox\let\LT at LL@FM at cr\@arraycr
+  \fi
+  \setbox\@arstrutbox\hbox{\vrule\@height\arraystretch\@tempdima
+    \@depth\arraystretch\dp\strutbox\@width\z@}%
+  \let\@sharp##\let\protect\relax
+   \begingroup
+    \@mkpream{#2}%
+    \xdef\LT at bchunk{%
+       \global\advance\c at LT@chunks\@ne\global\LT at rows\z@
+       \setbox\z@\vbox\bgroup\LT at setprevdepth\tabskip\LTleft
+       \noexpand\halign to\hsize\bgroup\tabskip\z@\@arstrut
+       \@preamble\tabskip\LTright\cr}%
+  \endgroup
+  \begingroup
+  \@mksumline{#2}%
+  \endgroup
+  \res at tsumline
+  \everycr{\noalign{\global\FCsc at l=0 }}%
+  \expandafter\LT at nofcols\LT at bchunk&\LT at nofcols
+  \LT at make@row\m at th\let\par\@empty
+  \lineskip\z@\baselineskip\z@\LT at bchunk}
 \endinput
 %%
 %% End of file `fcolumn.sty'.



More information about the tex-live-commits mailing list.