summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fnbreak
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fnbreak')
-rw-r--r--Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty89
1 files changed, 68 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty b/Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty
index 59b1171980c..c74d658f82c 100644
--- a/Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty
+++ b/Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty
@@ -8,23 +8,32 @@
%%
%% fnbreak package
%%
-%% Copyright 2003, 2004 Harald Harders
+%% Copyright 2003, 2004, 2006, 2010, 2012 Harald Harders
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1.3 of the License, or any later version.
%%
-%% h.harders@tu-bs.de
+%% harald.harders@gmx.de
%%
\ProvidesPackage{fnbreak}
- [2004/04/06 v1.10 Warning for pagebreak in footnote (HH)]
+ [2012/01/01 v1.30 Warning for pagebreak in footnote (HH)]
+\RequirePackage{ifthen}
\newif\iffnb@showlabel
-\fnb@showlabeltrue
\newif\iffnb@verbose
+\DeclareOption{label}{\fnb@showlabeltrue}
\DeclareOption{nolabel}{\fnb@showlabelfalse}
\DeclareOption{verbose}{\fnb@verbosetrue}
+\DeclareOption{nonverbose}{\fnb@verbosefalse}
+\ExecuteOptions{label,nonverbose}
\ProcessOptions\relax
+\newcommand*\fnbreakverbose{\fnb@verbosetrue}
+\newcommand*\fnbreaknonverbose{\fnb@verbosefalse}
+\newcommand*\fnbreaklabel{\fnb@showlabeltrue}
+\newcommand*\fnbreaknolabel{\fnb@showlabelfalse}
+\newcounter{fnb@@numberpages}
+\newif\iffnb@@isdoublepage
\xdef\fnb@@footnotestartnum{0}
\xdef\fnb@@footnotestartpage{0}
\def\fnb@footnotestart#1#2#3{}
@@ -32,33 +41,71 @@
\AtBeginDocument{%
\def\fnb@footnotestart#1#2#3{%
\xdef\fnb@@footnotestartnum{#1}%
- \xdef\fnb@@footnotestartpage{#3}%
+ \gdef\fnb@@footnotestartpage{#3}%
}%
\def\fnb@footnoteend#1#2#3{%
\xdef\fnb@@footnoteendnum{#1}%
- \xdef\fnb@@footnoteendpage{#3}%
+ \def\fnb@@footnoteendpage{#3}%
\ifx\fnb@@footnotestartnum\fnb@@footnoteendnum
- \ifx\fnb@@footnotestartpage\fnb@@footnoteendpage
+ \ifthenelse{\equal{\fnb@@footnotestartpage}{\fnb@@footnoteendpage}}{%
\iffnb@verbose
- \message{Package fnbreak: Footnote number #1
- \iffnb@showlabel(label `#2') \fi^^J%
- \space\space\space\space\space\space
- \space\space\space\space\space\space
- \space\space\space\space\space
- completely on page #3.}%
+ \begingroup
+ \def\MessageBreak{^^J(fnbreak)\@spaces\@spaces\@spaces\@spaces}%
+ \set@display@protect
+ \immediate\write\@unused{^^JPackage fnbreak Note:%
+ \space\space\space\space Footnote number #1
+ \iffnb@showlabel\MessageBreak (label `#2') \fi
+ \MessageBreak
+ completely on page #3.^^J}%
+ \endgroup
+ \fi
+ }{%
+ \setcounter{fnb@@numberpages}{0}%
+ \if@twoside
+ \ifnum\number0<0\fnb@@footnoteendpage{}%
+ \ifnum\number0<0\fnb@@footnotestartpage{}%
+ \setcounter{fnb@@numberpages}{\fnb@@footnoteendpage}%
+ \addtocounter{fnb@@numberpages}{-\fnb@@footnotestartpage}%
+ \addtocounter{fnb@@numberpages}{1}%
+ \ifodd \fnb@@footnotestartpage{}%
+ \fnb@@isdoublepagefalse
+ \else
+ \ifnum \thefnb@@numberpages=2{}%
+ \fnb@@isdoublepagetrue
+ \else
+ \fnb@@isdoublepagefalse
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifnum\thefnb@@numberpages=0
+ \PackageWarningNoLine{fnbreak}{Footnote number #1
+ \iffnb@showlabel\MessageBreak (label `#2')\fi
+ \MessageBreak
+ has been split over different pages:\MessageBreak
+ page \fnb@@footnotestartpage\space to page #3}%
+ \else
+ \iffnb@@isdoublepage
+ \PackageWarningNoLine{fnbreak}{Footnote number #1
+ \iffnb@showlabel\MessageBreak (label `#2')\fi
+ \MessageBreak
+ has been split over different pages (double page):\MessageBreak
+ page \fnb@@footnotestartpage\space to page #3}%
+ \else
+ \PackageWarningNoLine{fnbreak}{Footnote number #1
+ \iffnb@showlabel\MessageBreak (label `#2')\fi
+ \MessageBreak
+ has been split over different pages (flipside):\MessageBreak
+ page \fnb@@footnotestartpage\space to page #3}%
+ \fi
\fi
- \else
- \PackageWarningNoLine{fnbreak}{Footnote number #1
- \iffnb@showlabel(label `#2')\fi
- \MessageBreak
- has been split over different pages:\MessageBreak
- page \fnb@@footnotestartpage\space to page #3}%
\def\fnb@globalwarning{%
\PackageWarningNoLine{fnbreak}{There are footnotes with a
pagebreak.\MessageBreak
Check if they are acceptable}%
}%
- \fi
+ }%
\else
\PackageError{fnbreak}{Internal problem:\MessageBreak
Start and stop marker of footnote do not fit:\MessageBreak
@@ -66,7 +113,7 @@
end: #1, page #3}{%
This error may not happen.
Please try to make a short example which shows this behaviour
- and send a bug report to h.harders@tu-bs.de.}%
+ and send a bug report to harald.harders@gmx.de.}%
\fi
}%
}