[freeside-commits] branch master updated. 3ded761f92af1bab8d3d8a8e9deccd97082aaf15

Mark Wells mark at 420.am
Thu Sep 27 23:38:46 PDT 2012


The branch, master has been updated
       via  3ded761f92af1bab8d3d8a8e9deccd97082aaf15 (commit)
      from  3185fe4edea62dd3fa9818cf80902e96fe2a2d21 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3ded761f92af1bab8d3d8a8e9deccd97082aaf15
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Sep 27 23:38:32 2012 -0700

    fix caption/longtable conflict with modern LaTeX installs, #13908

diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 8e697d3..b7971ff 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -70,6 +70,15 @@ sub upgrade_config {
     foreach grep { ! $conf->exists($_) && -s "$DIST_CONF/$_" }
       qw( quotation_html quotation_latex quotation_latexnotes );
 
+  # change 'fslongtable' to 'longtable'
+  foreach my $name (qw(invoice_latex quotation_latex)) {
+    my $value = join("\n",$conf->config($name));
+    if (length($value)) {
+      $value =~ s/fslongtable/longtable/g;
+      $conf->set($name, $value);
+    }
+  }
+
 }
 
 sub upgrade_overlimit_groups {
diff --git a/Makefile b/Makefile
index 208398a..10c06eb 100644
--- a/Makefile
+++ b/Makefile
@@ -247,9 +247,9 @@ dev-perl-modules: perl-modules
 	ln -sf ${FREESIDE_PATH}/FS/blib/lib/FS ${PERL_INC_DEV_KLUDGE}/FS
 
 install-texmf:	
-	install -D -o freeside -m 444 etc/fslongtable.sty \
-          `kpsewhich -expand-var \\\$$TEXMFLOCAL`/tex/generic/fslongtable.sty
-	texhash `kpsewhich -expand-var \\\$$TEXMFLOCAL`
+	install -D -o freeside -m 444 etc/longtable.sty \
+	  ~freeside/texmf/tex/longtable.sty
+	texhash ~freeside
 
 install-init:
 	#[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
diff --git a/conf/invoice_latex b/conf/invoice_latex
index 772c2eb..d56a7fb 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -19,7 +19,7 @@
 
 \documentclass[letterpaper]{article}
 
-\usepackage{fancyhdr,lastpage,ifthen,array,fslongtable,afterpage,caption,multirow,bigstrut}
+\usepackage{fancyhdr,lastpage,ifthen,array,longtable,afterpage,caption,multirow,bigstrut}
 \usepackage{graphicx}			% required for logo graphic
 \usepackage[utf8]{inputenc}             % multilanguage support
 \usepackage[T1]{fontenc}
diff --git a/conf/quotation_latex b/conf/quotation_latex
index 772c2eb..d56a7fb 100644
--- a/conf/quotation_latex
+++ b/conf/quotation_latex
@@ -19,7 +19,7 @@
 
 \documentclass[letterpaper]{article}
 
-\usepackage{fancyhdr,lastpage,ifthen,array,fslongtable,afterpage,caption,multirow,bigstrut}
+\usepackage{fancyhdr,lastpage,ifthen,array,longtable,afterpage,caption,multirow,bigstrut}
 \usepackage{graphicx}			% required for logo graphic
 \usepackage[utf8]{inputenc}             % multilanguage support
 \usepackage[T1]{fontenc}
diff --git a/etc/longtable.sty b/etc/longtable.sty
new file mode 100644
index 0000000..66e2bf9
--- /dev/null
+++ b/etc/longtable.sty
@@ -0,0 +1,438 @@
+%%
+%% This is file `longtable.sty',
+%%
+%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%% 
+%% This file was forked from file(s) of the Standard LaTeX `Tools Bundle'.
+%% This file includes a new length LTextracouponspace which modifies
+%% the behavior of the package at the end of a page.  This feature 
+%% and package is not supported or acknowledged by Dave Carlisle.
+%% Do not contact him for such support.
+%% --------------------------------------------------------------------------
+%% 
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%% 
+%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle
+%% File: fslongtable.sty Copyright (C) 2008 Jeff Finucane
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{longtable}
+          [2004/02/01 v4.11 Multi-page Table package (DPC)]
+\def\LT at err{\PackageError{longtable}}
+\def\LT at warn{\PackageWarning{longtable}}
+\def\LT at final@warn{%
+  \AtEndDocument{%
+    \LT at warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}%
+  \global\let\LT at final@warn\relax}
+\DeclareOption{errorshow}{%
+  \def\LT at warn{\PackageInfo{longtable}}}
+\DeclareOption{pausing}{%
+  \def\LT at warn#1{%
+    \LT at err{#1}{This is not really an error}}}
+\DeclareOption{set}{}
+\DeclareOption{final}{}
+\ProcessOptions
+\newskip\LTleft       \LTleft=\fill
+\newskip\LTright      \LTright=\fill
+\newskip\LTpre        \LTpre=\bigskipamount
+\newskip\LTpost       \LTpost=\bigskipamount
+\newcount\LTchunksize \LTchunksize=20
+\let\c at LTchunksize\LTchunksize
+\newdimen\LTcapwidth  \LTcapwidth=4in
+\newlength\LTextracouponspace
+\newbox\LT at head
+\newbox\LT at firsthead
+\newbox\LT at foot
+\newbox\LT at lastfoot
+\newcount\LT at cols
+\newcount\LT at rows
+\newcounter{LT at tables}
+\newcounter{LT at chunks}[LT at tables]
+\ifx\c at table\undefined
+  \newcounter{table}
+  \def\fnum at table{\tablename~\thetable}
+\fi
+\ifx\tablename\undefined
+  \def\tablename{Table}
+\fi
+\newtoks\LT at p@ftn
+\mathchardef\LT at end@pen=30000
+\def\longtable{%
+  \par
+  \ifx\multicols\@undefined
+  \else
+     \ifnum\col at number>\@ne
+       \@twocolumntrue
+     \fi
+  \fi
+  \if at twocolumn
+    \LT at err{longtable not in 1-column mode}\@ehc
+  \fi
+  \begingroup
+  \@ifnextchar[\LT at array{\LT at array[x]}}
+\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
+  \expandafter\LT at nofcols\LT at bchunk&\LT at nofcols
+  \LT at make@row
+  \m at th\let\par\@empty
+  \everycr{}\lineskip\z@\baselineskip\z@
+  \LT at bchunk}
+\def\LT at no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}}
+\def\LT at start{%
+  \let\LT at start\endgraf
+  \endgraf\penalty\z@\vskip\LTpre
+  \dimen@\pagetotal
+  \advance\dimen@ \ht\ifvoid\LT at firsthead\LT at head\else\LT at firsthead\fi
+  \advance\dimen@ \dp\ifvoid\LT at firsthead\LT at head\else\LT at firsthead\fi
+  \advance\dimen@ \ht\LT at foot
+  \dimen at ii\vfuzz
+  \vfuzz\maxdimen
+    \setbox\tw@\copy\z@
+    \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox
+    \setbox\tw@\vbox{\unvbox\tw@}%
+  \vfuzz\dimen at ii
+  \advance\dimen@ \ht
+        \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi
+  \advance\dimen@\dp
+        \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi
+  \advance\dimen@ -\pagegoal
+  \ifdim \dimen@>\z@\vfil\break\fi
+      \global\@colroom\@colht
+  \ifnum\thepage=1
+    \advance\vsize-\LTextracouponspace
+    \dimen@\pagegoal\advance\dimen at -\LTextracouponspace\pagegoal\dimen@
+  \fi
+  \ifvoid\LT at foot\else
+    \advance\vsize-\ht\LT at foot
+    \global\advance\@colroom-\ht\LT at foot
+    \dimen@\pagegoal\advance\dimen at -\ht\LT at foot\pagegoal\dimen@
+    \maxdepth\z@
+  \fi
+  \ifvoid\LT at firsthead\copy\LT at head\else\box\LT at firsthead\fi\nobreak
+  \output{\LT at output}}
+\def\endlongtable{%
+  \crcr
+  \noalign{%
+    \let\LT at entry\LT at entry@chop
+    \xdef\LT at save@row{\LT at save@row}}%
+  \LT at echunk
+  \LT at start
+  \unvbox\z@
+  \LT at get@widths
+  \if at filesw
+    {\let\LT at entry\LT at entry@write\immediate\write\@auxout{%
+      \gdef\expandafter\noexpand
+        \csname LT@\romannumeral\c at LT@tables\endcsname
+          {\LT at save@row}}}%
+  \fi
+  \ifx\LT at save@row\LT@@save at row
+  \else
+    \LT at warn{Column \@width s have changed\MessageBreak
+             in table \thetable}%
+    \LT at final@warn
+  \fi
+  \endgraf\penalty -\LT at end@pen
+  \endgroup
+  \global\@mparbottom\z@
+  \pagegoal\vsize
+  \endgraf\penalty\z@\addvspace\LTpost
+  \ifvoid\footins\else\insert\footins{}\fi}
+\def\LT at nofcols#1&{%
+  \futurelet\@let at token\LT at n@fcols}
+\def\LT at n@fcols{%
+  \advance\LT at cols\@ne
+  \ifx\@let at token\LT at nofcols
+    \expandafter\@gobble
+  \else
+    \expandafter\LT at nofcols
+  \fi}
+\def\LT at tabularcr{%
+  \relax\iffalse{\fi\ifnum0=`}\fi
+  \@ifstar
+    {\def\crcr{\LT at crcr\noalign{\nobreak}}\let\cr\crcr
+     \LT at t@bularcr}%
+    {\LT at t@bularcr}}
+\let\LT at crcr\crcr
+\let\LT at setprevdepth\relax
+\def\LT at t@bularcr{%
+  \global\advance\LT at rows\@ne
+  \ifnum\LT at rows=\LTchunksize
+    \gdef\LT at setprevdepth{%
+      \prevdepth\z@\global
+      \global\let\LT at setprevdepth\relax}%
+    \expandafter\LT at xtabularcr
+  \else
+    \ifnum0=`{}\fi
+    \expandafter\LT at LL@FM at cr
+  \fi}
+\def\LT at xtabularcr{%
+  \@ifnextchar[\LT at argtabularcr\LT at ntabularcr}
+\def\LT at ntabularcr{%
+  \ifnum0=`{}\fi
+  \LT at echunk
+  \LT at start
+  \unvbox\z@
+  \LT at get@widths
+  \LT at bchunk}
+\def\LT at argtabularcr[#1]{%
+  \ifnum0=`{}\fi
+  \ifdim #1>\z@
+    \unskip\@xargarraycr{#1}%
+  \else
+    \@yargarraycr{#1}%
+  \fi
+  \LT at echunk
+  \LT at start
+  \unvbox\z@
+  \LT at get@widths
+  \LT at bchunk}
+\def\LT at echunk{%
+  \crcr\LT at save@row\cr\egroup
+  \global\setbox\@ne\lastbox
+    \unskip
+  \egroup}
+\def\LT at entry#1#2{%
+  \ifhmode\@firstofone{&}\fi\omit
+  \ifnum#1=\c at LT@chunks
+  \else
+    \kern#2\relax
+  \fi}
+\def\LT at entry@chop#1#2{%
+  \noexpand\LT at entry
+    {\ifnum#1>\c at LT@chunks
+       1}{0pt%
+     \else
+       #1}{#2%
+     \fi}}
+\def\LT at entry@write{%
+  \noexpand\LT at entry^^J%
+  \@spaces}
+\def\LT at kill{%
+  \LT at echunk
+  \LT at get@widths
+  \expandafter\LT at rebox\LT at bchunk}
+\def\LT at rebox#1\bgroup{%
+  #1\bgroup
+  \unvbox\z@
+  \unskip
+  \setbox\z@\lastbox}
+\def\LT at blank@row{%
+  \xdef\LT at save@row{\expandafter\LT at build@blank
+    \romannumeral\number\LT at cols 001 }}
+\def\LT at build@blank#1{%
+  \if#1m%
+    \noexpand\LT at entry{1}{0pt}%
+    \expandafter\LT at build@blank
+  \fi}
+\def\LT at make@row{%
+  \global\expandafter\let\expandafter\LT at save@row
+    \csname LT@\romannumeral\c at LT@tables\endcsname
+  \ifx\LT at save@row\relax
+    \LT at blank@row
+  \else
+    {\let\LT at entry\or
+     \if!%
+         \ifcase\expandafter\expandafter\expandafter\LT at cols
+         \expandafter\@gobble\LT at save@row
+         \or
+         \else
+           \relax
+         \fi
+        !%
+     \else
+       \aftergroup\LT at blank@row
+     \fi}%
+  \fi}
+\let\setlongtables\relax
+\def\LT at get@widths{%
+  \setbox\tw@\hbox{%
+    \unhbox\@ne
+    \let\LT at old@row\LT at save@row
+    \global\let\LT at save@row\@empty
+    \count@\LT at cols
+    \loop
+      \unskip
+      \setbox\tw@\lastbox
+    \ifhbox\tw@
+      \LT at def@row
+      \advance\count@\m at ne
+    \repeat}%
+  \ifx\LT@@save at row\@undefined
+    \let\LT@@save at row\LT at save@row
+  \fi}
+\def\LT at def@row{%
+  \let\LT at entry\or
+  \edef\@tempa{%
+    \ifcase\expandafter\count@\LT at old@row
+    \else
+      {1}{0pt}%
+    \fi}%
+  \let\LT at entry\relax
+  \xdef\LT at save@row{%
+    \LT at entry
+    \expandafter\LT at max@sel\@tempa
+    \LT at save@row}}
+\def\LT at max@sel#1#2{%
+  {\ifdim#2=\wd\tw@
+     #1%
+   \else
+     \number\c at LT@chunks
+   \fi}%
+  {\the\wd\tw@}}
+\def\LT at hline{%
+  \noalign{\ifnum0=`}\fi
+    \penalty\@M
+    \futurelet\@let at token\LT@@hline}
+\def\LT@@hline{%
+  \ifx\@let at token\hline
+    \global\let\@gtempa\@gobble
+    \gdef\LT at sep{\penalty-\@medpenalty\vskip\doublerulesep}%
+  \else
+    \global\let\@gtempa\@empty
+    \gdef\LT at sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
+  \fi
+  \ifnum0=`{\fi}%
+  \multispan\LT at cols
+     \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
+  \noalign{\LT at sep}%
+  \multispan\LT at cols
+     \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
+  \noalign{\penalty\@M}%
+  \@gtempa}
+\def\LT at caption{%
+  \noalign\bgroup
+    \@ifnextchar[{\egroup\LT at c@ption\@firstofone}\LT at capti@n}
+\def\LT at c@ption#1[#2]#3{%
+  \LT at makecaption#1\fnum at table{#3}%
+  \def\@tempa{#2}%
+  \ifx\@tempa\@empty\else
+     {\let\\\space
+     \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
+  \fi}
+\def\LT at capti@n{%
+  \@ifstar
+    {\egroup\LT at c@ption\@gobble[]}%
+    {\egroup\@xdblarg{\LT at c@ption\@firstofone}}}
+\def\LT at makecaption#1#2#3{%
+  \LT at mcol\LT at cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
+    \sbox\@tempboxa{#1{#2: }#3}%
+    \ifdim\wd\@tempboxa>\hsize
+      #1{#2: }#3%
+    \else
+      \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+    \fi
+    \endgraf\vskip\baselineskip}%
+  \hss}}}
+\def\LT at output{%
+  \ifnum\outputpenalty <-\@Mi
+    \ifnum\outputpenalty > -\LT at end@pen
+      \LT at err{floats and marginpars not allowed in a longtable}\@ehc
+    \else
+      \setbox\z@\vbox{\unvbox\@cclv}%
+      \ifdim \ht\LT at lastfoot>\ht\LT at foot
+        \dimen@\pagegoal
+        \advance\dimen at -\ht\LT at lastfoot
+        \ifdim\dimen@<\ht\z@
+          \setbox\@cclv\vbox{\unvbox\z@\copy\LT at foot\vss}%
+          \@makecol
+          \@outputpage
+          \setbox\z@\vbox{\box\LT at head}%
+        \fi
+      \fi
+      \global\@colroom\@colht
+      \global\vsize\@colht
+      \vbox
+        {\unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi}%
+    \fi
+  \else
+    \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT at foot\vss}%
+    \@makecol
+    \@outputpage
+      \global\vsize\@colroom
+    \copy\LT at head\nobreak
+  \fi}
+\def\LT at end@hd at ft#1{%
+  \LT at echunk
+  \ifx\LT at start\endgraf
+    \LT at err
+     {Longtable head or foot not at start of table}%
+     {Increase LTchunksize}%
+  \fi
+  \setbox#1\box\z@
+  \LT at get@widths
+  \LT at bchunk}
+\def\endfirsthead{\LT at end@hd at ft\LT at firsthead}
+\def\endhead{\LT at end@hd at ft\LT at head}
+\def\endfoot{\LT at end@hd at ft\LT at foot}
+\def\endlastfoot{\LT at end@hd at ft\LT at lastfoot}
+\def\LT at startpbox#1{%
+  \bgroup
+    \let\@footnotetext\LT at p@ftntext
+    \setlength\hsize{#1}%
+    \@arrayparboxrestore
+    \vrule \@height \ht\@arstrutbox \@width \z@}
+\def\LT at endpbox{%
+  \@finalstrut\@arstrutbox
+  \egroup
+  \the\LT at p@ftn
+  \global\LT at p@ftn{}%
+  \hfil}
+\def\LT at p@ftntext#1{%
+  \edef\@tempa{\the\LT at p@ftn\noexpand\footnotetext[\the\c at footnote]}%
+  \global\LT at p@ftn\expandafter{\@tempa{#1}}}%
+\endinput
+%%
+%% End of file `longtable.sty'.

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Upgrade.pm                       |    9 +++++++++
 Makefile                               |    6 +++---
 conf/invoice_latex                     |    2 +-
 conf/quotation_latex                   |    2 +-
 etc/{fslongtable.sty => longtable.sty} |    2 +-
 5 files changed, 15 insertions(+), 6 deletions(-)
 copy etc/{fslongtable.sty => longtable.sty} (99%)




More information about the freeside-commits mailing list