From dc22da4ed822b288859f3a2d49fbc9ea18df86c1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 3 Jan 2012 00:13:18 +0000 Subject: fnbreak (2jan12) git-svn-id: svn://tug.org/texlive/trunk@25003 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/fnbreak/ChangeLog | 13 ++ Master/texmf-dist/doc/latex/fnbreak/Makefile | 79 +++++++ Master/texmf-dist/doc/latex/fnbreak/README | 6 +- Master/texmf-dist/doc/latex/fnbreak/fnbreak-v.tex | 6 +- Master/texmf-dist/doc/latex/fnbreak/fnbreak.pdf | Bin 142428 -> 204511 bytes Master/texmf-dist/doc/latex/fnbreak/fnbreak.xml | 10 +- .../texmf-dist/doc/latex/fnbreak/fnbreaktest.tex | 9 +- Master/texmf-dist/source/latex/fnbreak/Makefile | 78 ------- Master/texmf-dist/source/latex/fnbreak/fnbreak.dtx | 230 ++++++++++++++++++--- Master/texmf-dist/source/latex/fnbreak/fnbreak.ins | 4 +- Master/texmf-dist/tex/latex/fnbreak/fnbreak.sty | 89 ++++++-- 11 files changed, 382 insertions(+), 142 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/fnbreak/Makefile delete mode 100644 Master/texmf-dist/source/latex/fnbreak/Makefile (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/fnbreak/ChangeLog b/Master/texmf-dist/doc/latex/fnbreak/ChangeLog index 402acbba091..301dbe53ed9 100644 --- a/Master/texmf-dist/doc/latex/fnbreak/ChangeLog +++ b/Master/texmf-dist/doc/latex/fnbreak/ChangeLog @@ -1,3 +1,13 @@ +v1.30 2012/01/01: + - Fix verbose mode for non-numeric labels + - Add options `nonverbose' and `label' + +v1.20 2010/08/09: + - Distinguish between split over double page or with flipping the page. + +v1.11 2006/05/08: + - Allow commands in page number. + v1.10 2004/04/06: - Add option `verbose'. - Write an additional warning at the end of the log file if @@ -9,3 +19,6 @@ v1.00 2004/04/01: - Use the footnote number instead of the label, show both in the warning. - Patch \@footnotetext instead of re-writing it. + +v0.10 2003/04/03: + - Initial version diff --git a/Master/texmf-dist/doc/latex/fnbreak/Makefile b/Master/texmf-dist/doc/latex/fnbreak/Makefile new file mode 100644 index 00000000000..31d08461246 --- /dev/null +++ b/Master/texmf-dist/doc/latex/fnbreak/Makefile @@ -0,0 +1,79 @@ + +SRCDIR=fnbreak +INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/fnbreak +DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/fnbreak +VERSION=`grep -e '\\[.*\\]' fnbreak-v.tex | sed 's/ \\[[0-9/]* *\\([v0-9]*\\)\\.\\([0-9]*\\).*\\]/\\1_\\2/'` + + +.SUFFIXES: .sty .ins .dtx .dvi .pdf + +.ins.sty: + latex $< + +.dtx.pdf: + pdflatex $< + pdflatex $< + makeindex -s gind.ist $(*D)/$(*F) + makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo + pdflatex $< + + +all: fnbreak fnbreak.pdf fnbreaktest.dvi + +fnbreaktest.dvi: fnbreaktest.tex fnbreak.sty + latex fnbreaktest + + +fnbreak: fnbreak.sty + + + +clean: + @-rm -f fnbreak.{glo,gls,idx,ilg,ind,aux,log,toc} + @-rm -f fnbreaktest.{log,aux} + @-rm -f *~ + +distclean: clean + @-rm -f fnbreak.sty fnbreak.pdf + @-rm -f fnbreaktest.dvi fnbreak-v.tex + +tar: all clean + echo Lege fnbreak-$(VERSION).tar.gz an + -rm -f fnbreak-$(VERSION).tar.gz + tar czCf .. fnbreak-$(VERSION).tar.gz \ + $(SRCDIR)/README \ + $(SRCDIR)/ChangeLog \ + $(SRCDIR)/Makefile \ + $(SRCDIR)/fnbreak.dtx \ + $(SRCDIR)/fnbreak.ins \ + $(SRCDIR)/fnbreak.pdf \ + $(SRCDIR)/fnbreaktest.tex \ + $(SRCDIR)/fnbreak.xml + +zip: texlive + -@rm -f fnbreak-$(VERSION).zip + zip -r fnbreak-$(VERSION).zip texmf + rm -rf texmf + rm -f getversion.log + + +texlive: all clean + rm -rf texmf + mkdir -p texmf/tex/latex/fnbreak/ + mkdir -p texmf/doc/latex/fnbreak/ + mkdir -p texmf/source/latex/fnbreak/ + cp fnbreak.sty texmf/tex/latex/fnbreak/ + cp fnbreak.pdf README ChangeLog fnbreaktest.tex texmf/doc/latex/fnbreak/ + cp fnbreak.dtx fnbreak.ins texmf/source/latex/fnbreak/ + cp Makefile fnbreak.xml texmf/source/latex/fnbreak/ + + +install: all + if [ ! -d $(INSTALLDIR) ]; then mkdir -p $(INSTALLDIR); fi + if [ ! -d $(DOCDIR) ]; then mkdir -p $(DOCDIR); fi + install -m644 fnbreak.sty $(INSTALLDIR) + install -m644 fnbreak.pdf $(DOCDIR) + texhash + +fnbreak.sty: fnbreak.ins fnbreak.dtx + diff --git a/Master/texmf-dist/doc/latex/fnbreak/README b/Master/texmf-dist/doc/latex/fnbreak/README index c62cf325cee..b2f0911a847 100644 --- a/Master/texmf-dist/doc/latex/fnbreak/README +++ b/Master/texmf-dist/doc/latex/fnbreak/README @@ -5,7 +5,7 @@ This package detects footnotes that are split over several pages. It writes a warning into the log file. -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 @@ -28,6 +28,6 @@ by hand: - execute latex on fnbreak.ins - run texhash or the corresponding command of your distribution -2004/04/06 +2012/01/01 Harald Harders -h.harders@tu-bs.de +harald.harders@gmx.de diff --git a/Master/texmf-dist/doc/latex/fnbreak/fnbreak-v.tex b/Master/texmf-dist/doc/latex/fnbreak/fnbreak-v.tex index 524beaa7428..3f77f4366b6 100644 --- a/Master/texmf-dist/doc/latex/fnbreak/fnbreak-v.tex +++ b/Master/texmf-dist/doc/latex/fnbreak/fnbreak-v.tex @@ -8,17 +8,17 @@ %% %% 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 %% \ProvidesFile{fnbreak-v.tex} - [2004/04/06 v1.10 Warning for pagebreak in footnote (HH)] + [2012/01/01 v1.30 Warning for pagebreak in footnote (HH)] \endinput %% %% End of file `fnbreak-v.tex'. diff --git a/Master/texmf-dist/doc/latex/fnbreak/fnbreak.pdf b/Master/texmf-dist/doc/latex/fnbreak/fnbreak.pdf index 5454b87538c..6ae5f00b07d 100644 Binary files a/Master/texmf-dist/doc/latex/fnbreak/fnbreak.pdf and b/Master/texmf-dist/doc/latex/fnbreak/fnbreak.pdf differ diff --git a/Master/texmf-dist/doc/latex/fnbreak/fnbreak.xml b/Master/texmf-dist/doc/latex/fnbreak/fnbreak.xml index e3bff810d40..72d4cfd0556 100644 --- a/Master/texmf-dist/doc/latex/fnbreak/fnbreak.xml +++ b/Master/texmf-dist/doc/latex/fnbreak/fnbreak.xml @@ -1,18 +1,18 @@ + datestamp="2012/01/01" + modifier="harald.harders@gmx.de"> fnbreak - Warn for splitted footnotes. + Warn for footnotes split over pages. Harald Harders - h.harders@tu-bs.de + harald.harders@gmx.de - 1.10 + 1.30 diff --git a/Master/texmf-dist/doc/latex/fnbreak/fnbreaktest.tex b/Master/texmf-dist/doc/latex/fnbreak/fnbreaktest.tex index c93ec49ce73..4fdeb31373d 100644 --- a/Master/texmf-dist/doc/latex/fnbreak/fnbreaktest.tex +++ b/Master/texmf-dist/doc/latex/fnbreak/fnbreaktest.tex @@ -1,7 +1,12 @@ \listfiles -\documentclass{article} -\usepackage{fnbreak} +%\documentclass{article} +\documentclass[twoside]{article} +\usepackage[T1]{fontenc} +\usepackage[verbose]{fnbreak} +%\usepackage[nolabel]{fnbreak} +%\usepackage{fnbreak} \usepackage[symbol]{footmisc} +\def\thepage{\textsc{\roman{page}}} \begin{document} Das ist ein langer Text. Das ist ein langer Text. Das ist ein langer Text. Das ist ein langer Text. diff --git a/Master/texmf-dist/source/latex/fnbreak/Makefile b/Master/texmf-dist/source/latex/fnbreak/Makefile deleted file mode 100644 index d630482adf3..00000000000 --- a/Master/texmf-dist/source/latex/fnbreak/Makefile +++ /dev/null @@ -1,78 +0,0 @@ - -SRCDIR=fnbreak -INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/fnbreak -DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/fnbreak -VERSION=`grep -e '\\[.*\\]' fnbreak-v.tex | sed 's/ \\[[0-9/]* *\\([v0-9]*\\)\\.\\([0-9]*\\).*\\]/\\1_\\2/'` - - -.SUFFIXES: .sty .ins .dtx .dvi .ps - -.ins.sty: - latex $< - -.dtx.dvi: - latex $< - latex $< - makeindex -s gind.ist $(*D)/$(*F) - makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo - latex $< - -.dvi.ps: - dvips -o $(*D)/$(*F).ps $(*D)/$(*F) - - -all: fnbreak fnbreak.dvi fnbreaktest.dvi ausgabe - -fnbreaktest.dvi: fnbreaktest.tex fnbreak.sty - latex fnbreaktest - - -fnbreak: fnbreak.sty - - - -clean: - @-rm -f fnbreak.{glo,gls,idx,ilg,ind,aux,log,toc} - @-rm -f fnbreaktest.{log,aux} - @-rm -f *~ - -distclean: clean - @-rm -f fnbreak.{sty,dvi,ps} - @-rm -f fnbreaktest.{dvi,ps} fnbreak-v.tex - -tar: all clean - echo Lege fnbreak-$(VERSION).tar.gz an - -rm -f fnbreak-$(VERSION).tar.gz - tar czCf .. fnbreak-$(VERSION).tar.gz \ - $(SRCDIR)/README \ - $(SRCDIR)/ChangeLog \ - $(SRCDIR)/Makefile \ - $(SRCDIR)/fnbreak.dtx \ - $(SRCDIR)/fnbreak.ins \ - $(SRCDIR)/fnbreak.dvi \ - $(SRCDIR)/fnbreaktest.tex \ - $(SRCDIR)/fnbreak.xml - -install: all - if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi - if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi - install -m644 fnbreak.sty $(INSTALLDIR) - install -m644 fnbreak.dvi $(DOCDIR) - texhash - -texlive: all clean - rm -rf texmf - mkdir -p texmf/tex/latex/fnbreak - mkdir -p texmf/doc/latex/fnbreak - mkdir -p texmf/source/latex/fnbreak - cp fnbreak.sty texmf/tex/latex/fnbreak - cp fnbreak.dvi README ChangeLog fnbreaktest.tex texmf/doc/latex/fnbreak - cp fnbreak.dtx fnbreak.ins fnbreak.xml texmf/source/latex/fnbreak - -ausgabe: - @echo "Please copy fnbreak.sty to a directory" - @echo "in the LaTeX search path" - - -fnbreak.sty: fnbreak.ins fnbreak.dtx - diff --git a/Master/texmf-dist/source/latex/fnbreak/fnbreak.dtx b/Master/texmf-dist/source/latex/fnbreak/fnbreak.dtx index e794e4e7742..1cc54cdfdad 100644 --- a/Master/texmf-dist/source/latex/fnbreak/fnbreak.dtx +++ b/Master/texmf-dist/source/latex/fnbreak/fnbreak.dtx @@ -1,5 +1,5 @@ % \iffalse meta comment -% File: fnbreak.dtx Copyright (C) 2003, 2004 Harald Harders +% File: fnbreak.dtx Copyright (C) 2003, 2004, 2006, 2010, 2012 Harald Harders % \fi % % \iffalse @@ -7,15 +7,15 @@ %<*driver> \documentclass{ltxdoc} \title{The \texttt{fnbreak} package} -\author{Harald Harders\\\texttt{h.harders@tu-bs.de}} +\author{Harald Harders\\\texttt{harald.harders@gmx.de}} \date{Version \fileversion, \filedate, Printed \today} \EnableCrossrefs \CodelineIndex \DoNotIndex{\def,\edef,\let,\newcommand,\newenvironment,\newcounter} -\DoNotIndex{\setcounter,\space} +\DoNotIndex{\setcounter,\space,\ifx,\else,\fi} \CodelineNumbered \RecordChanges -\CheckSum{132} +\CheckSum{202} \IfFileExists{fnbreak-v.tex}{% \input{fnbreak-v.tex} \GetFileInfo{fnbreak-v.tex} @@ -43,7 +43,7 @@ % \tableofcontents % % \section*{Copyright} -% 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 @@ -61,18 +61,23 @@ % If a footnote is split over a page break, a warning like the % following is put into the log: %\begin{verbatim} -%Package fnbreak Warning: Footnote number 1 (label `a') +%Package fnbreak Warning: Footnote number 1 +%(fnbreak) (label `a') %(fnbreak) has been split over different pages: %(fnbreak) page 1 to page 2. %\end{verbatim} % Sometimes, complicated footnote labels are used (for example, when % using symbols): %\begin{verbatim} -%Package fnbreak Warning: Footnote number 1 (label `\ensuremath {*}') +%Package fnbreak Warning: Footnote number 1 +%(fnbreak) (label `\ensuremath {*}') %(fnbreak) has been split over different pages: %(fnbreak) page 1 to page 2. %\end{verbatim} -% In some cases may this even break the function. +% In some cases may complex footnote labels may prevent |fnbreak| from +% functioning. +% \begin{macro}{nolabel} +% \begin{macro}{label} % To avoid these problems, you may give the package option |nolabel|: %\begin{verbatim} %\usepackage[nolabel]{fnbreak} @@ -83,9 +88,57 @@ %(fnbreak) has been split over different pages: %(fnbreak) page 1 to page 2. %\end{verbatim} +% \end{macro} +% \end{macro} % +% \begin{macro}{\fnbreaknolabel} +% \begin{macro}{\fnbreaklabel} +% You may switsch on and off printing of the footnote label in the +% warnings also by using the macros \cs{fnbreaknolabel} and \cs{fnbreaklabel}. +% \end{macro} +% \end{macro} +% +% If the document is set two-sided, fnbreak tries to determine whether +% the footnote spans over a double page or flipsides. +% The result is shown in the warning: +%\begin{verbatim} +%Package fnbreak Warning: Footnote number 1 +%(fnbreak) has been split over different pages (flipsides): +%(fnbreak) page 1 to page 2. +%\end{verbatim} +% or: +%\begin{verbatim} +%Package fnbreak Warning: Footnote number 1 +%(fnbreak) has been split over different pages (double page): +%(fnbreak) page 2 to page 3. +%\end{verbatim} +% This only works if the page numbers are (arabic) numerical. +% +% \begin{macro}{verbose} +% \begin{macro}{nonverbose} % When using the package option |verbose| the fnbreak package writes a -% message for every footnote, even if it is completely on one page. +% message for every footnote, even if it is completely on one page: +%\begin{verbatim} +%\usepackage[verbose]{fnbreak} +%\end{verbatim} +% The output looks as follows: +%\begin{verbatim} +%Package fnbreak Note: Footnote number 2 +%(fnbreak) (label `2') +%(fnbreak) completely on page 3. +%\end{verbatim} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\fnbreaknonverbose} +% \begin{macro}{\fnbreakverbose} +% You may switsch on and off printing footnote information for +% non-split footnotes using the macros \cs{fnbreaknonverbose} and +% \cs{fnbreakverbose}. +% \end{macro} +% \end{macro} +% +% % % \StopEventually{\PrintChanges \PrintIndex} % @@ -100,20 +153,55 @@ % \begin{macrocode} %\ProvidesPackage{fnbreak} %\ProvidesFile{fnbreak-v.tex} -% [2004/04/06 v1.10 Warning for pagebreak in footnote (HH)] +% [2012/01/01 v1.30 Warning for pagebreak in footnote (HH)] %<*package> % \end{macrocode} % Declare an option to show not only the footnote number but also the % label. +% \changes{1.11}{2006/05/08}{Allow commands in page number}% +% \begin{macrocode} +\RequirePackage{ifthen} +% \end{macrocode} +% Declare an option to show not only the footnote number but also the +% label. % \changes{1.10}{2004/04/06}{Add option `verbose'}% +% \changes{1.30}{2012/01/01}{Add options `nonverbose' and `label'}% % \begin{macrocode} \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 % \end{macrocode} +% \begin{macro}{\fnbreakverbose} +% \begin{macro}{\fnbreaknonverbose} +% Switch on or off verbose printing of footnotes. +% \begin{macrocode} +\newcommand*\fnbreakverbose{\fnb@verbosetrue} +\newcommand*\fnbreaknonverbose{\fnb@verbosefalse} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\fnbreaklabel} +% \begin{macro}{\fnbreaknolabel} +% Switch on or off printing of footnote labels in the warnings. +% \begin{macrocode} +\newcommand*\fnbreaklabel{\fnb@showlabeltrue} +\newcommand*\fnbreaknolabel{\fnb@showlabelfalse} +% \end{macrocode} +% \end{macro} +% \end{macro} +% Define new counter and boolean for determining whether a split +% footnote spans ofer a double page or flipsides. +% \changes{1.20}{2010/08/09}{Distinguish between split over double +% page or flipsides}% +% \begin{macrocode} +\newcounter{fnb@@numberpages} +\newif\iffnb@@isdoublepage +% \end{macrocode} % Define default values in order to avoid possible problems: % \changes{1.00}{2004/04/01}{Correct some internal macro names}% % \begin{macrocode} @@ -133,10 +221,11 @@ % \end{macrocode} % If the start of a footnote has been found, just define commands % containing the footnote number (only for debugging) and the start page: +% \changes{1.11}{2006/05/08}{Allow commands in page number}% % \begin{macrocode} \def\fnb@footnotestart#1#2#3{% \xdef\fnb@@footnotestartnum{#1}% - \xdef\fnb@@footnotestartpage{#3}% + \gdef\fnb@@footnotestartpage{#3}% }% % \end{macrocode} % \changes{1.00}{2004/04/01}{No need to have numerical page numbers @@ -151,37 +240,122 @@ % \begin{macrocode} \def\fnb@footnoteend#1#2#3{% \xdef\fnb@@footnoteendnum{#1}% - \xdef\fnb@@footnoteendpage{#3}% + \def\fnb@@footnoteendpage{#3}% % \end{macrocode} % Test if start and end refer to the same footnote. % \begin{macrocode} \ifx\fnb@@footnotestartnum\fnb@@footnoteendnum % \end{macrocode} % Test if the footnote ends on the same page it has started. +% \changes{1.11}{2006/05/08}{Allow commands in page number}% % \begin{macrocode} - \ifx\fnb@@footnotestartpage\fnb@@footnoteendpage + \ifthenelse{\equal{\fnb@@footnotestartpage}{\fnb@@footnoteendpage}}{% % \end{macrocode} % Yes, the footnote is completely on one page. % Print a message if |verbose| mode is requested. +% Simulate a variant of \cs{PackageInfo} which is also written to the +% output rather than only to the log file. +% \changes{1.30}{2012/01/01}{Fix verbose mode for non-numeric labels} % \begin{macrocode} \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 - \else + }{% % \end{macrocode} % No, the footnote contains a pagebreak. +% +% If the page labels are plain numbers we can determine whether a +% footnot spans over a double page or a flipside.\footnote{Thanks to +% Martin M\"unch for the idea of determining double pages.} +% \changes{1.20}{2010/08/09}{Distinguish between split over double +% page or flipsides}% +% |fnb@@numberpages = 0| is used if the code cannot find out whether a +% footnote spans over a double page (i.\,e., for non-integer page +% numbers or single-side documents). +% \begin{macrocode} + \setcounter{fnb@@numberpages}{0}% +% \end{macrocode} +% Do the effort only if the document is two-sided. +% This code requised the boolean \cs{if@twoside} to be defined. +% If this is not the case please report to the author including a +% minimal example file. +% \begin{macrocode} + \if@twoside +% \end{macrocode} +% We can find double pages only if the start page as well as the end +% page are numbers. +% \begin{macrocode} + \ifnum\number0<0\fnb@@footnoteendpage{}% + \ifnum\number0<0\fnb@@footnotestartpage{}% +% \end{macrocode} +% Calculate the number of pages covered by the footnote. If it is more +% than two, a flipside occurs anyways. +% \begin{macrocode} + \setcounter{fnb@@numberpages}{\fnb@@footnoteendpage}% + \addtocounter{fnb@@numberpages}{-\fnb@@footnotestartpage}% + \addtocounter{fnb@@numberpages}{1}% +% \end{macrocode} +% If the footnote starts on an odd page, flipside occurs in any case. +% \begin{macrocode} + \ifodd \fnb@@footnotestartpage{}% + \fnb@@isdoublepagefalse +% \end{macrocode} +% If the footnote starts on an odd page, a double page is found if the +% number of pages equals two. +% \begin{macrocode} + \else + \ifnum \thefnb@@numberpages=2{}% + \fnb@@isdoublepagetrue +% \end{macrocode} +% If the number of pages is larger, flipside. +% \begin{macrocode} + \else + \fnb@@isdoublepagefalse + \fi + \fi + \fi + \fi + \fi +% \end{macrocode} % Print a warning. +% +% If not determined whether a double page occurs: +% \begin{macrocode} + \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}% +% \end{macrocode} +% For a double page: % \begin{macrocode} - \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}% + \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}% +% \end{macrocode} +% For a flipside: +% \begin{macrocode} + \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 % \end{macrocode} % Redefine the \cs{fnb@globalwarning} to print a warning at the end of % the log file. @@ -191,7 +365,7 @@ pagebreak.\MessageBreak Check if they are acceptable}% }% - \fi + }% \else % \end{macrocode} % This macro trys to handle different footnotes. @@ -203,7 +377,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 }% } diff --git a/Master/texmf-dist/source/latex/fnbreak/fnbreak.ins b/Master/texmf-dist/source/latex/fnbreak/fnbreak.ins index 574099dca6c..dd3b8bd3dc7 100644 --- a/Master/texmf-dist/source/latex/fnbreak/fnbreak.ins +++ b/Master/texmf-dist/source/latex/fnbreak/fnbreak.ins @@ -3,14 +3,14 @@ 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 \endpreamble 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 }% } -- cgit v1.2.3