summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fixfoot
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-19 08:04:14 +0000
committerNorbert Preining <preining@logic.at>2007-12-19 08:04:14 +0000
commitffe2955d194551e56c5f196c64d1c13cc6907a42 (patch)
tree3c34daed0744dbadcfdb45e4f3fd5b6bbb03d38d /Master/texmf-dist/tex/latex/fixfoot
parentfcf8bfb5aead020a85bae7884c8e5a91c7695f02 (diff)
update fixfoot 07-12-19
git-svn-id: svn://tug.org/texlive/trunk@5810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fixfoot')
-rw-r--r--Master/texmf-dist/tex/latex/fixfoot/fixfoot.sty54
1 files changed, 40 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/fixfoot/fixfoot.sty b/Master/texmf-dist/tex/latex/fixfoot/fixfoot.sty
index fe7eaf22e5f..1b66b7ff834 100644
--- a/Master/texmf-dist/tex/latex/fixfoot/fixfoot.sty
+++ b/Master/texmf-dist/tex/latex/fixfoot/fixfoot.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{fixfoot}[2000/07/10 v0.1b fixed-text footnotes]
+\ProvidesPackage{fixfoot}[2007/12/12 v0.3a fixed-text footnotes]
%
% Author: Robin Fairbairns <rf10@cam.ac.uk>
%
@@ -36,6 +36,10 @@
% this package does not (yet) have the ability to warn the user that
% another run of latex is still necessary (changing labels or footnote
% numbers in footmisc \emph{do} thus warn).
+\newif\if@fftn@debug
+\DeclareOption{debug}{\@fftn@debugtrue}
+\ProcessOptions\relax
+%
\newcommand\DeclareFixedFootnote{%
\@ifstar{\@declare@fftn\xspace}%
{\@declare@fftn\relax }%
@@ -79,12 +83,15 @@
\begingroup
\let\protect\noexpand
\edef\@tempc{\noexpand\AtEndDocument{%
- \noexpand\clearpage
+ \fftn@clearpage
\noexpand\def\@tempa{%
\noexpand\@reprocess@fftn@mark{\reserved@a}}%
\noexpand\def\@tempb{oinkpig}}}%
\@tempc
- \endgroup}%
+ \endgroup
+ \let\fftn@clearpage\@empty
+}%
+\def\fftn@clearpage{\noexpand\clearpage}
%
% Stick a dummy \cs{@process@fftn@mark} into the |.aux| file, in
% accordance with good practice for such things...
@@ -109,8 +116,10 @@
%
% Is this serial beyond the limit of serial numbers destined for this
% page?
-%\message{footnote #1 serial \csname the@#1@fftn@serial\endcsname\space
-% existing limit \csname @#1@fftn@pagelim\endcsname;}%
+ \if@fftn@debug
+ \message{footnote #1 serial \csname the@#1@fftn@serial\endcsname\space
+ existing limit \csname @#1@fftn@pagelim\endcsname;}%
+ \fi
\ifnum\csname @#1@fftn@pagelim\endcsname <
\csname c@@#1@fftn@serial\endcsname
%
@@ -120,9 +129,13 @@
\expandafter\let\expandafter\@tempa
\csname @#1@fftn-\the\csname c@@#1@fftn@serial\endcsname\endcsname
\ifx\@tempa\relax
-%\message{footnote #1 no limit to inherit from .aux file;}%
+ \if@fftn@debug
+ \message{footnote #1 no limit to inherit from .aux file;}%
+ \fi
\else
-%\message{footnote #1 limit \@tempa;}%
+ \if@fftn@debug
+ \message{footnote #1 limit \@tempa;}%
+ \fi
%
% record the information from the file
\global\expandafter\let\csname @#1@fftn@pagelim\endcsname\@tempa
@@ -133,13 +146,20 @@
\footnote{#3}%
\expandafter\xdef\csname @#1@fftn@footnote\endcsname
{\the\c@footnote}%
-%\message{written new #1 footnote, number \the\c@footnote.}%
+ \if@fftn@debug
+ \message{written new #1 footnote, number \the\c@footnote.}%
+ \fi
%
% if we're still on the same page as the previous footnote, create a
-% mark only
+% mark only; note we can't use \cs{footnotemark} here, as it won't do
+% the right thing if we're in a minipage (or anywhere where
+% \cs{thempfn} isn't the same as \cs{thefootnote}).
\else
- \footnotemark[\csname @#1@fftn@footnote\endcsname]%
-%\message{reusing #1 footnote \csname @#1@fftn@footnote\endcsname.}%
+ \protected@xdef\@thefnmark{\csname @#1@fftn@footnote\endcsname}%
+ \@footnotemark
+ \if@fftn@debug
+ \message{reusing #1 footnote \csname @#1@fftn@footnote\endcsname.}%
+ \fi
\fi
%
% record which page `this' footnote appeared in the |.aux|
@@ -159,10 +179,14 @@
% #2 serial number
% #3 actual page
\newcommand\@process@fftn@mark[3]{%
-%\message{fftn #1 #2 #3;}%
+ \if@fftn@debug
+ \message{fftn #1 #2 #3;}%
+ \fi
\def\@tempa{#3}%
\expandafter\ifx\csname @#1@fftn@scanpage\endcsname\@tempa
-%\message{on same page as previous;}%
+ \if@fftn@debug
+ \message{on same page as previous;}%
+ \fi
\else
%
% well, we're no longer on whatever was last recorded as the page of a
@@ -172,7 +196,9 @@
\fi
%
%
-%\message{setting limit for serial \csname @#1@fftn@lastserial\endcsname.}%
+ \if@fftn@debug
+ \message{setting limit for serial \csname @#1@fftn@lastserial\endcsname.}%
+ \fi
\expandafter\gdef\csname @#1@fftn-%
\csname @#1@fftn@lastserial\endcsname
\endcsname{#2}%