summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/footmisc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-11 21:53:45 +0000
committerKarl Berry <karl@freefriends.org>2022-02-11 21:53:45 +0000
commit6981d9f5465cd5432cfb27196814914d44fd0b56 (patch)
treecd34e77e73466ad1eb8bb1c15f286e897119b18d /Master/texmf-dist/tex/latex/footmisc
parenta2b63cb66fbde22e2615466521546b8e9477a468 (diff)
footmisc (11feb22)
git-svn-id: svn://tug.org/texlive/trunk@61979 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/footmisc')
-rw-r--r--Master/texmf-dist/tex/latex/footmisc/footmisc-2011-06-06.sty949
-rw-r--r--Master/texmf-dist/tex/latex/footmisc/footmisc.sty737
2 files changed, 1219 insertions, 467 deletions
diff --git a/Master/texmf-dist/tex/latex/footmisc/footmisc-2011-06-06.sty b/Master/texmf-dist/tex/latex/footmisc/footmisc-2011-06-06.sty
new file mode 100644
index 00000000000..d44d8e2585b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/footmisc/footmisc-2011-06-06.sty
@@ -0,0 +1,949 @@
+%%
+%% This is file `footmisc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% footmisc.dtx (with options: `package')
+%% ----------------------------------------------------------------------
+%% The footmisc package -- variations of footnote typesetting
+%% Copyright (c) 2008 Robin Fairbairns
+%%
+%% This work may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License, either version 1.3c 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.3c or later is part
+%% of all distributions of LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of the files footmisc.dtx, footmisc.ins, and README
+%% and the derived files footmisc.sty and footmisc.pdf.
+%% -----------------------------------------------------------------------
+%%
+%% This is footmisc.dtx, and it's -*-LaTeX-*- text
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{footmisc}%
+ [2011/06/06 v5.5b
+ a miscellany of footnote facilities%
+ ]% $Id: footmisc.dtx,v 4.25 2011/06/06 14:25:44 rf10 Exp rf10 $
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\newtoks\FN@temptoken
+\providecommand\protected@writeaux{%
+ \protected@write\@auxout
+}% \end{macrocode}
+\def\l@advance@macro{\@@dvance@macro\edef}
+\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax
+ \advance\@tempcnta#3\relax
+ #1#2{\the\@tempcnta}%
+}
+\let\@advance@macro\l@advance@macro
+\newif\ifFN@etex
+\ifx\dimexpr\undefined
+ \FN@etexfalse
+\else
+ \FN@etextrue
+\fi
+\newdimen\footnotemargin
+\footnotemargin1.8em\relax
+\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
+\DeclareOption{symbol*}{%
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
+}
+\newif\ifFN@para \FN@parafalse
+\DeclareOption{para}{\ifFN@sidefn
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "side"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \FN@paratrue
+ \fi
+}
+\newif\ifFN@sidefn \FN@sidefnfalse
+\DeclareOption{side}{\ifFN@para
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "para"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \FN@sidefntrue
+ \fi
+}
+\let\footnotelayout\@empty
+\DeclareOption{ragged}{%
+ \@ifundefined{RaggedRight}%
+ {\renewcommand\footnotelayout{\linepenalty50 \raggedright}}%
+ {\renewcommand\footnotelayout{\linepenalty50 \RaggedRight}}%
+}
+\newif\ifFN@perpage
+\FN@perpagefalse
+\DeclareOption{perpage}{%
+ \FN@perpagetrue
+}
+\newif\ifFN@bottom \FN@bottomfalse
+\DeclareOption{bottom}{%
+ \FN@bottomtrue
+}
+\DeclareOption{marginal}{%
+ \footnotemargin-0.8em\relax
+}
+\DeclareOption{flushmargin}{%
+ \footnotemargin0pt\relax
+}
+\newif\ifFN@hangfoot \FN@hangfootfalse
+\DeclareOption{hang}{%
+ \FN@hangfoottrue
+}
+\newcommand*\hangfootparskip{0.5\baselineskip}
+\newcommand*\hangfootparindent{0em}%
+\DeclareOption{norule}{%
+ \renewcommand\footnoterule{}%
+ \advance\skip\footins 4\p@\@plus2\p@\relax
+}
+\DeclareOption{splitrule}{%
+ \gdef\split@prev{0}
+ \let\pagefootnoterule\footnoterule
+ \let\mpfootnoterule\footnoterule
+ \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@}
+ \def\footnoterule{\relax
+ \ifx \@listdepth\@mplistdepth
+ \mpfootnoterule
+ \else
+ \ifnum\split@prev=\z@
+ \pagefootnoterule
+ \else
+ \splitfootnoterule
+ \fi
+ \xdef\split@prev{\the\insertpenalties}%
+ \fi
+ }%
+}
+\newif\ifFN@stablefootnote \FN@stablefootnotefalse
+\DeclareOption{stable}{\FN@stablefootnotetrue}
+\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse
+\DeclareOption{multiple}{\FN@multiplefootnotetrue}
+\ProcessOptions
+\let \if@tempswa \ifFN@bottom
+\ifFN@para \@tempswatrue \fi
+\if@tempswa
+ \@ifl@t@r\fmtversion{2005/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth \@maxdepth
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \let \@elt \relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }
+ }{%
+ \@ifl@t@r\fmtversion{2003/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \let \@elt \relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop
+ \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }{%
+ \@ifl@t@r\fmtversion{1999/12/01}{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }%
+ }{%
+ \CheckCommand*\@makecol{\ifvoid \footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \unvbox\@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }%
+ }%
+}
+ \ifFN@para
+ \FN@temptoken{%
+ \toks@\expandafter{\the\toks@
+ \vskip\skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \global\setbox\FN@tempboxc\vbox{\makefootnoteparagraph}%
+ \unvbox\FN@tempboxc
+ \color@endgroup
+ }%
+ }%
+ \else
+ \FN@temptoken{%
+ \toks@\expandafter{\the\toks@
+ \vskip\skip\footins
+ \color@begingroup
+ \normalcolor\footnoterule
+ \unvbox\footins
+ \color@endgroup
+ }%
+ }%
+ \fi
+ \ifFN@bottom
+ \toks@{\setbox\@outputbox \box\@cclv
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ \ifvoid\footins
+ \else
+ \setbox\@outputbox \vbox\bgroup
+ \boxmaxdepth\@maxdepth
+ \unvbox\@outputbox
+ \vfill\relax
+ }
+ \the\FN@temptoken
+ \toks@\expandafter{\the\toks@\egroup\fi}
+ \else
+ \toks@{\ifvoid\footins
+ \setbox\@outputbox\box\@cclv
+ \else
+ \setbox\@outputbox \vbox\bgroup
+ \boxmaxdepth\@maxdepth
+ \unvbox\@cclv
+ }
+ \the\FN@temptoken
+ \toks@\expandafter{\the\toks@
+ \egroup
+ \fi
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats
+ }%
+ \fi
+ \toks@\expandafter{\the\toks@
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@\@textbottom
+ }%
+ \fi
+ \global\maxdepth\@maxdepth
+ }
+ \edef\@makecol{\the\toks@}
+\fi
+\newif\ifFN@setspace
+\@ifpackageloaded{setspace}{%
+ \FN@setspacetrue
+ \@ifclassloaded{memoir}{%
+ \let\FN@baselinestretch\m@m@singlespace
+ }{%
+ \let\FN@baselinestretch\setspace@singlespace
+ }%
+}{%
+ \FN@setspacefalse
+}
+\ifFN@para
+ \renewcommand\@footnotetext[1]{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \setbox\FN@tempboxa=\hbox{%
+ \@makefntext{\ignorespaces#1\strut
+ \penalty-10\relax
+ \hskip\footglue
+ }% end of \@makefntext parameter
+ }% end of \hbox
+ \dp\FN@tempboxa=0pt
+ \ifFN@etex
+ \ht\FN@tempboxa=\dimexpr\wd\FN@tempboxa *
+ \footnotebaselineskip / \columnwidth\relax
+ \else
+ \ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
+ \fi
+ \box\FN@tempboxa
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }
+\else
+ \ifFN@sidefn
+ \renewcommand\@footnotetext[1]{%
+ \marginpar{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \ignorespaces#1%
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+ \else
+ \renewcommand\@footnotetext[1]{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep
+ \ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+ \fi
+\fi
+\ifFN@para
+ \let\FN@tempboxa\@tempboxa
+ \newbox\FN@tempboxb
+ \newbox\FN@tempboxc
+ \newskip\footglue \footglue=1em plus.3em minus.3em
+ \long\def\@makefntext#1{\leavevmode
+ \@makefnmark\nobreak
+ \hskip.5em\relax#1%
+ }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \newdimen\footnotebaselineskip
+ {%
+ \footnotesize
+ \global
+ \footnotebaselineskip=\normalbaselineskip
+ }
+ \ifFN@etex
+ \else
+ \@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024
+ \divide \@tempdima by \columnwidth \multiply\@tempdima by 64
+ \xdef\fudgefactor{\strip@pt\@tempdima }%
+ \fi
+ \long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
+ \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
+ \hsize\columnwidth
+ \@parboxrestore
+ \baselineskip=\footnotebaselineskip
+ \noindent
+ \rule{\z@}{\footnotesep}%
+ \unhbox\FN@tempboxa\par
+ }
+ \def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
+ \loop
+ \setbox\FN@tempboxb=\lastbox
+ \ifhbox\FN@tempboxb
+ \setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}%
+ \repeat
+ }
+ \def\removehboxes{\setbox\FN@tempboxa=\lastbox
+ \ifhbox
+ \FN@tempboxa{\removehboxes}%
+ \unhbox\FN@tempboxa
+ \fi
+ }
+\fi
+\newif\ifFN@pp@footnotehint
+\newcounter{pp@next@reset}%
+\newif\ifFN@pp@towrite
+\FN@pp@towritefalse
+\ifFN@perpage
+ \CheckCommand*\footnote{\@ifnextchar [%]
+ \@xfootnote
+ {%
+ \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark \@footnotetext
+ }%
+ }
+ \renewcommand*\footnote{\@ifnextchar [%]
+ \@xfootnote
+ {%
+ \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
+ \FN@pp@footnote\@footnotemark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \@footnotetext
+ }%
+ }
+ \CheckCommand*\footnotemark{%
+ \@ifnextchar [%]
+ \@xfootnotemark
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark
+ }%
+ }
+ \renewcommand*\footnotemark{%
+ \@ifnextchar [%]
+ \@xfootnotemark
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \FN@pp@footnote\@footnotemark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ }%
+ }
+ \gdef\FN@pp@initial@stab{\@addtoreset{footnote}{page}}
+ \AtBeginDocument{\FN@pp@initial@stab}
+ \newcounter{@fnserial}
+ \def\FN@pp@cpage{0}
+ \FN@pp@footnotehinttrue
+ \newcommand{\footnotehint}{%
+ \setcounter{footnote}{0}%
+ \protected@writeaux\relax{\protect\FN@pp@footnotehinttrue}%
+ \@tempcnta\c@@fnserial
+ \advance\@tempcnta\@ne
+ \global\c@pp@next@reset\@tempcnta
+ }
+ \AtBeginDocument{\protected@writeaux\relax{%
+ \protect\providecommand{\protect\FN@pp@footnotehinttrue}{}%
+ }%
+ }
+\def\FN@pp@lastfoot{-1}
+ \newcommand{\FN@pp@footnote@aux}[2]{%
+ \ifnum\FN@pp@lastfoot<#1
+ \ifFN@pp@footnotehint
+ \FN@pp@resetfn{#1}{#2}%
+ \FN@pp@footnotehintfalse
+ \else
+ \gdef\@tempa{#2}%
+ \ifx\@tempa\FN@pp@cpage
+ \else
+ \FN@pp@resetfn{#1}{#2}%
+ \fi
+ \fi
+ \def\FN@pp@lastfoot{#1}%
+ \fi
+ \global\let\FN@pp@initial@stab\relax
+ }
+ \newcommand{\FN@pp@resetfn}[2]{%
+ \gdef\FN@pp@cpage{#2}%
+ \expandafter\gdef
+ \csname FN@pp@next-\FN@pp@prev@foot\endcsname{#1}%
+ \def\FN@pp@prev@foot{#1}%
+ \expandafter\xdef
+ \csname FN@pp@next-\FN@pp@prev@foot\endcsname{\the\@MM}%
+ }
+ \newcommand{\FN@pp@prev@foot}{root}
+ \AtBeginDocument{\protected@writeaux\relax{%
+ \protect\providecommand{\protect\FN@pp@footnote@aux}[2]{}}%
+ \c@pp@next@reset\@ne
+ }
+ \AtEndDocument{\let\FN@pp@footnote@aux\FN@pp@footnote@endaux
+ \def\FN@pp@lastfoot{-1}%
+ \FN@pp@footnotehintfalse
+ \renewcommand{\FN@pp@prev@foot}{root}
+ }
+ \newcommand{\FN@pp@footnote@endaux}[2]{%
+ \ifnum\FN@pp@lastfoot<#1
+ \ifFN@pp@footnotehint
+ \FN@pp@resetfn@end{#1}{#2}%
+ \FN@pp@footnotehintfalse
+ \else
+ \gdef\@tempa{#2}%
+ \ifx\@tempa\FN@pp@cpage
+ \else
+ \FN@pp@resetfn@end{#1}{#2}%
+ \fi
+ \fi
+ \def\FN@pp@lastfoot{#1}%
+ \fi
+ }
+ \newcommand{\FN@pp@resetfn@end}[2]{%
+ \def\@tempa{#1}%
+ \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\@tempa%
+ \else
+ \@tempswatrue
+ \fi
+ \gdef\FN@pp@prev@foot{#1}%
+ \gdef\FN@pp@cpage{#2}%
+ }
+\let\FN@pp@@clearpage\clearpage
+\renewcommand{\clearpage}{\footnotehint\FN@pp@@clearpage}
+\def\FN@pp@footnote{%
+ \if@minipage\else
+ \global\advance\c@@fnserial\@ne
+ \if@filesw
+ \xdef\FN@pp@writetemp{%
+ \noexpand\protected@writeaux\relax{%
+ \string\FN@pp@footnote@aux
+ {\the\c@@fnserial}{\noexpand\thepage}%
+ }%
+ }%
+ \FN@pp@towritetrue
+ \fi
+ \ifnum\c@pp@next@reset>\c@@fnserial
+ \else
+ \global\expandafter\csname c@\@mpfn\endcsname\@ne
+ \protected@xdef\@thefnmark{\thempfn}%
+ \expandafter\let\expandafter\@tempa
+ \csname FN@pp@next-\number\c@pp@next@reset\endcsname
+ \ifx\@tempa\relax
+ \global\c@pp@next@reset\@MM
+ \else
+ \global\c@pp@next@reset\@tempa
+ \fi
+ \fi
+ \fi
+}
+\fi
+\ifFN@para
+\else
+ \long\def\@makefntext#1{%
+ \ifFN@hangfoot
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \ifdim\footnotemargin>0pt
+ \hb@xt@\footnotemargin{\@makefnmark\hss}%
+ \else
+ \@makefnmark
+ \fi
+ }%
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ \footnotesize
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ \parskip\hangfootparskip\relax
+ \parindent\hangfootparindent\relax
+ \else
+ \parindent1em
+ \noindent
+ \ifdim\footnotemargin>\z@
+ \hb@xt@ \footnotemargin{\hss\@makefnmark}%
+ \else
+ \ifdim\footnotemargin=\z@
+ \llap{\@makefnmark}%
+ \else
+ \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
+ \fi
+ \fi
+ \fi
+ \footnotelayout#1%
+ \ifFN@hangfoot
+ \par\egroup
+ \fi
+ }
+\fi
+\ifFN@multiplefootnote
+ \providecommand*{\multiplefootnotemarker}{3sp}
+ \providecommand*{\multfootsep}{,}
+ \CheckCommand*\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+ \renewcommand*\@footnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \FN@mf@check
+ \nobreak
+ \fi
+ \@makefnmark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \FN@mf@prepare
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+ \def\FN@mf@prepare{%
+ \kern-\multiplefootnotemarker
+ \kern\multiplefootnotemarker\relax
+ }
+ \def\FN@mf@check{%
+ \ifdim\lastkern=\multiplefootnotemarker\relax
+ \edef\@x@sf{\the\spacefactor}%
+ \unkern
+ \textsuperscript{\multfootsep}%
+ \spacefactor\@x@sf\relax
+ \fi
+ }
+\else
+ \let\FN@mf@prepare\relax
+\fi
+\ifFN@stablefootnote
+\let\FN@sf@@footnote\footnote
+\def\footnote{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnote
+ \else
+ \expandafter\FN@sf@gobble@opt
+ \fi
+}
+\edef\FN@sf@gobble@opt{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
+\expandafter\def\csname FN@sf@gobble@opt \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@twobracket
+ \@gobble
+}
+\def\FN@sf@gobble@twobracket[#1]#2{}
+\let\FN@sf@@footnotemark\footnotemark
+\def\footnotemark{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnotemark
+ \else
+ \expandafter\FN@sf@gobble@optonly
+ \fi
+}
+\edef\FN@sf@gobble@optonly{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname}
+\expandafter\def\csname FN@sf@gobble@optonly \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@bracket
+ {}%
+}
+\def\FN@sf@gobble@bracket[#1]{}
+\fi
+\newcommand\setfnsymbol[1]{%
+ \@bsphack
+ \@ifundefined{FN@fnsymbol@#1}%
+ {%
+ \PackageError{footmisc}{Symbol style "#1" not known}%
+ \@eha
+ }{%
+ \expandafter\let\expandafter\@fnsymbol\csname
+ FN@fnsymbol@#1\endcsname
+ }%
+ \@esphack
+}
+\let\FN@fnsymbol@lamport\@fnsymbol
+\newif\if@tempswb
+\newcommand{\DefineFNsymbols}{%
+ \@ifstar{\@tempswbtrue\@DefineFNsymbols}%
+ {\@tempswbfalse\@DefineFNsymbols}%
+}
+\newcommand{\@DefineFNsymbols}[1]{%
+ \@ifnextchar[% ]
+ {\@DefineFNsymbols@{#1}}{\@DefineFNsymbols@{#1}[text]}%
+}
+\def\@DefineFNsymbols@#1[#2]#3{%
+ \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #1}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldef#3\end
+ \def\@tempc{math}%
+ \def\@tempd{#2}%
+ \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \ifx\@tempc\@tempd
+ \noexpand\ensuremath
+ \else
+ \noexpand\nfss@text
+ \fi
+ {%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \if@tempswb
+ \noexpand\@ctrerr
+ \else
+ \noexpand\@arabic##1\noexpand\FN@orange##1%
+ \fi
+ \noexpand\fi
+ }%
+ }%
+}
+\def\FN@build@symboldef#1{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or#1}%
+ \expandafter\FN@build@symboldef
+ \fi
+}
+\newcommand{\DefineFNsymbolsTM}{%
+ \@ifstar{\@tempswbtrue\@DefineFNsymbolsTM}%
+ {\@tempswbfalse\@DefineFNsymbolsTM}}%
+\newcommand{\@DefineFNsymbolsTM}[2]{%
+ \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #1}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldefTM#2\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \if@tempswb
+ \noexpand\@ctrerr
+ \else
+ \noexpand\@arabic##1\noexpand\FN@orange##1%
+ \fi
+ \noexpand\fi
+ }%
+}%
+\def\FN@build@symboldefTM#1#2{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or\TextOrMath{#1}{#2}}%
+ \expandafter\FN@build@symboldefTM
+ \fi
+}
+\@ifundefined{TextOrMath}{%
+ \@ifundefined{eTeXversion}{%
+ \PackageError{footmisc}{Can't define commands for footnote symbol}%
+ {Use e-LaTeX, or load package fixltx2e before
+ footmisc}%
+ }{%
+ \protected\expandafter\def\csname TextOrMath\space\endcsname{%
+ \ifmmode \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi
+ }
+ \edef\TextOrMath#1#2{%
+ \expandafter\noexpand\csname TextOrMath\space\endcsname
+{#1}{#2}%
+ }%
+ }%
+}{}
+\def\FN@orange#1{%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+}
+\global\let\@diagnose@fnsymbol@orange\relax
+\AtEndDocument{\@diagnose@fnsymbol@orange}
+\def\@fnsymbol@orange{%
+ \gdef\@diagnose@fnsymbol@orange{%
+ \PackageWarningNoLine{footmisc}{Some footnote number(s)
+ were out of range
+ \MessageBreak
+ see log for details%
+ }%
+ }%
+}
+\@ifundefined{textbardbl}{%
+ \DeclareTextSymbol{\textbardbl}{OMS}{107}%
+ \DeclareTextSymbolDefault{\textbardbl}{TS1}}{}%
+\DefineFNsymbolsTM*{bringhurst}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \textparagraph \mathparagraph
+}%
+\DefineFNsymbolsTM*{chicago}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \#\#%
+}%
+\DefineFNsymbolsTM*{wiley}{
+ \textasteriskcentered *
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+}%
+\DefineFNsymbolsTM{lamport-robust}{
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+}
+\DefineFNsymbolsTM*{lamport*}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\setfnsymbol{lamport*}
+\DefineFNsymbolsTM{lamport*-robust}{%
+ \textasteriskcentered *
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\providecommand*{\footref}[1]{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark
+}
+\newcommand\mpfootnotemark{%
+ \@ifnextchar[%
+ \@xmpfootnotemark
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark
+ }%
+}
+\def\@xmpfootnotemark[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark
+}
+\endinput
+%%
+%% End of file `footmisc.sty'.
diff --git a/Master/texmf-dist/tex/latex/footmisc/footmisc.sty b/Master/texmf-dist/tex/latex/footmisc/footmisc.sty
index d44d8e2585b..e957609146c 100644
--- a/Master/texmf-dist/tex/latex/footmisc/footmisc.sty
+++ b/Master/texmf-dist/tex/latex/footmisc/footmisc.sty
@@ -5,50 +5,65 @@
%% The original source files were:
%%
%% footmisc.dtx (with options: `package')
-%% ----------------------------------------------------------------------
-%% The footmisc package -- variations of footnote typesetting
-%% Copyright (c) 2008 Robin Fairbairns
%%
-%% This work may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License, either version 1.3c 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.3c or later is part
-%% of all distributions of LaTeX version 2005/12/01 or later.
+%% This is a generated file.
%%
-%% This work has the LPPL maintenance status `author-maintained'.
+%% Copyright (c) 1995-2011 Robin Fairbairns
+%% Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
%%
-%% This work consists of the files footmisc.dtx, footmisc.ins, and README
-%% and the derived files footmisc.sty and footmisc.pdf.
-%% -----------------------------------------------------------------------
+%% This file was generated from file(s) of the LaTeX `footmisc Bundle'.
+%% --------------------------------------------------------------------
%%
-%% This is footmisc.dtx, and it's -*-LaTeX-*- text
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% `footmisc Bundle'. You may however distribute the `footmisc Bundle'
+%% without such generated files.
+%%
+%% The newest sources can be found below
+%%
+%% https://github.com/FrankMittelbach/fmitex-footmisc/
+%%
+%% where one can also log issues in case there are any.
+%%
+%% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns
+%% (C) Copyright 2018-2022 Frank Mittelbach
\NeedsTeXFormat{LaTeX2e}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
+\DeclareCurrentRelease{}{2022-02-10}
\ProvidesPackage{footmisc}%
- [2011/06/06 v5.5b
+ [2022/02/10 v6.0a
a miscellany of footnote facilities%
- ]% $Id: footmisc.dtx,v 4.25 2011/06/06 14:25:44 rf10 Exp rf10 $
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+ ]
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\newtoks\FN@temptoken
\providecommand\protected@writeaux{%
\protected@write\@auxout
-}% \end{macrocode}
+}
\def\l@advance@macro{\@@dvance@macro\edef}
\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax
\advance\@tempcnta#3\relax
#1#2{\the\@tempcnta}%
}
\let\@advance@macro\l@advance@macro
-\newif\ifFN@etex
-\ifx\dimexpr\undefined
- \FN@etexfalse
-\else
- \FN@etextrue
-\fi
\newdimen\footnotemargin
\footnotemargin1.8em\relax
\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
+\newif\ifFN@robust \FN@robustfalse
\DeclareOption{symbol*}{%
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \FN@robusttrue
\AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
}
\newif\ifFN@para \FN@parafalse
@@ -80,9 +95,23 @@
\DeclareOption{perpage}{%
\FN@perpagetrue
}
-\newif\ifFN@bottom \FN@bottomfalse
+\newif\ifFN@fixskip \FN@fixskipfalse
+\let\FN@ORspacehandling\thr@@
\DeclareOption{bottom}{%
- \FN@bottomtrue
+ \let\FN@ORspacehandling\@ne
+ \FN@abovefloatsfalse
+ \FN@fixskiptrue
+}
+\newif\ifFN@abovefloats \FN@abovefloatstrue
+\DeclareOption{abovefloats}{\FN@abovefloatstrue \FN@fixskiptrue}
+\DeclareOption{belowfloats}{\FN@abovefloatsfalse \FN@fixskiptrue}
+\DeclareOption{bottomfloats}{%
+ \let\FN@ORspacehandling\tw@
+ \FN@abovefloatstrue \FN@fixskiptrue
+}
+\DeclareOption{bottomfootnotes}{%
+ \let\FN@ORspacehandling\tw@
+ \FN@abovefloatsfalse \FN@fixskiptrue
}
\DeclareOption{marginal}{%
\footnotemargin-0.8em\relax
@@ -123,200 +152,165 @@
\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse
\DeclareOption{multiple}{\FN@multiplefootnotetrue}
\ProcessOptions
-\let \if@tempswa \ifFN@bottom
-\ifFN@para \@tempswatrue \fi
-\if@tempswa
- \@ifl@t@r\fmtversion{2005/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth \@maxdepth
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \let \@elt \relax
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }
- }{%
- \@ifl@t@r\fmtversion{2003/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \@tempdima\dp\@cclv
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor
- \footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \let \@elt \relax
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop
- \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@
- \@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }%
- }{%
- \@ifl@t@r\fmtversion{1999/12/01}{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \@tempdima\dp\@cclv
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
+\def \@makecol {%
+ \@kernel@before@cclv
+ \setbox\@outputbox \box\@cclv
+ \@outputbox@removebskip
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@makecol@appendblocks
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \@makenormalcolbox
+ \fi
+ \global \maxdepth \@maxdepth
+}
+\newdimen\@outputbox@depth
+\def \@makenormalcolbox {%
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \@outputbox@depth \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\@outputbox@depth
+ \@textbottom
}%
- }%
- }{%
- \CheckCommand*\@makecol{\ifvoid \footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }%
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }%
- }%
}
- \ifFN@para
- \FN@temptoken{%
- \toks@\expandafter{\the\toks@
- \vskip\skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \global\setbox\FN@tempboxc\vbox{\makefootnoteparagraph}%
- \unvbox\FN@tempboxc
- \color@endgroup
+\def \@makespecialcolbox {%
+ \@outputbox@append {\vskip-\@outputbox@depth}%
+ \@tempdima \@colht
+ \ifdim \wd\@kludgeins>\z@
+ \advance \@tempdima -\ht\@outputbox
+ \advance \@tempdima \pageshrink
+ \setbox\@outputbox \vbox to \@colht {%
+ \unvbox\@outputbox
+ \vskip \@tempdima
+ \@textbottom
+ }%
+ \else
+ \advance \@tempdima -\ht\@kludgeins
+ \setbox \@outputbox \vbox to \@colht {%
+ \vbox to \@tempdima {%
+ \unvbox\@outputbox
+ \@textbottom}%
+ \vss}%
+ \fi
+ {\setbox \@tempboxa \box \@kludgeins}%
+}
+\ifFN@fixskip
+ \def\@outputbox@removebskip{%
+ \ifx\@textbottom\relax \else
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
}%
- }%
- \else
- \FN@temptoken{%
- \toks@\expandafter{\the\toks@
- \vskip\skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
+ \fi
+ }
+\let\@outputbox@reinsertbskip\relax
+\else
+ \let\@outputbox@removebskip \relax
+ \let\@outputbox@reinsertbskip\relax
+\fi
+\providecommand\@kernel@before@cclv{}
+\providecommand\@kernel@before@footins{}
+\def\@outputbox@append #1{%
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \@outputbox@depth\dp\@outputbox % if needed in #1
+ \unvbox \@outputbox
+ #1%
+ }%
+}
+\def\@outputbox@appendfootnotes {%
+ \ifvoid\footins \else
+ \@makecol@handlesplitfootnotes
+ \@makecol@preparefootinshook
+ \@outputbox@append{%
+ \vskip \skip\footins
+ \@kernel@before@footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \csname pdfcolfoot@current\endcsname
+ \unvbox \footins
+ \color@endgroup
}%
- }%
\fi
- \ifFN@bottom
- \toks@{\setbox\@outputbox \box\@cclv
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvoid\footins
- \else
- \setbox\@outputbox \vbox\bgroup
- \boxmaxdepth\@maxdepth
- \unvbox\@outputbox
- \vfill\relax
+}
+\let \@outputbox@attachfloats \@combinefloats
+\def \@outputbox@attachtopfloats {%
+ \ifx \@toplist\@empty \else \@cflt \fi
+}
+\def \@outputbox@attachbottomfloats {%
+ \ifx \@botlist\@empty \else \@cflb \fi
+}
+\def\@makecol@handlesplitfootnotes {%
+ \ifnum\insertpenalties>\z@
+ \@makecol@splitfootnotemessagehook
+ \fi
+}
+\let \@makecol@splitfootnotemessagehook \@empty
+\let \@makecol@preparefootinshook \@empty
+\ifFN@para
+ \def\@makecol@preparefootinshook {%
+ \global\setbox\footins\vbox{\FN@makefootnoteparagraph}%
}
- \the\FN@temptoken
- \toks@\expandafter{\the\toks@\egroup\fi}
+\fi
+\ifcase \FN@ORspacehandling\relax
+\ERROR
+\or
+ \ifFN@abovefloats
+ \def\@makecol@appendblocks {%
+ \@outputbox@append{\vfill}%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ }
\else
- \toks@{\ifvoid\footins
- \setbox\@outputbox\box\@cclv
- \else
- \setbox\@outputbox \vbox\bgroup
- \boxmaxdepth\@maxdepth
- \unvbox\@cclv
+ \def\@makecol@appendblocks {%
+ \@outputbox@append{\vfill}%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
}
- \the\FN@temptoken
- \toks@\expandafter{\the\toks@
- \egroup
- \fi
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- }%
\fi
- \toks@\expandafter{\the\toks@
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop \dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }%
- \fi
- \global\maxdepth\@maxdepth
- }
- \edef\@makecol{\the\toks@}
+\or
+ \ifFN@abovefloats
+ \def\@makecol@appendblocks {%
+ \@outputbox@appendfootnotes
+ \@outputbox@append{\vfill}%
+ \@outputbox@attachfloats
+ }
+ \else
+ \def\@makecol@appendblocks {%
+ \@outputbox@attachfloats
+ \@outputbox@append{\vfill}%
+ \@outputbox@appendfootnotes
+ }
+ \fi
+\or
+ \ifFN@abovefloats
+ \def\@makecol@appendblocks {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ \@outputbox@reinsertbskip
+ }
+ \else
+ \def\@makecol@appendblocks {%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ \@outputbox@reinsertbskip
+}
+ \fi
+\else
+\ERROR
\fi
+
\newif\ifFN@setspace
\@ifpackageloaded{setspace}{%
\FN@setspacetrue
@@ -329,7 +323,7 @@
\FN@setspacefalse
}
\ifFN@para
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\insert\footins{%
\ifFN@setspace
\let\baselinestretch\FN@baselinestretch
@@ -343,19 +337,15 @@
\@parboxrestore
\protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
\color@begingroup
- \setbox\FN@tempboxa=\hbox{%
+ \setbox\FN@tempboxa\hbox{%
\@makefntext{\ignorespaces#1\strut
\penalty-10\relax
\hskip\footglue
}% end of \@makefntext parameter
}% end of \hbox
- \dp\FN@tempboxa=0pt
- \ifFN@etex
- \ht\FN@tempboxa=\dimexpr\wd\FN@tempboxa *
- \footnotebaselineskip / \columnwidth\relax
- \else
- \ht\FN@tempboxa=\fudgefactor\wd\FN@tempboxa
- \fi
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa\dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip / \columnwidth\relax
\box\FN@tempboxa
\color@endgroup
}%
@@ -363,7 +353,7 @@
}
\else
\ifFN@sidefn
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\marginpar{%
\ifFN@setspace
\let\baselinestretch\FN@baselinestretch
@@ -381,7 +371,7 @@
\FN@mf@prepare
}%
\else
- \renewcommand\@footnotetext[1]{%
+ \long\def\FN@footnotetext#1{%
\insert\footins{%
\ifFN@setspace
\let\baselinestretch\FN@baselinestretch
@@ -423,184 +413,39 @@
\global
\footnotebaselineskip=\normalbaselineskip
}
- \ifFN@etex
- \else
- \@tempdima=\footnotebaselineskip \multiply\@tempdima by 1024
- \divide \@tempdima by \columnwidth \multiply\@tempdima by 64
- \xdef\fudgefactor{\strip@pt\@tempdima }%
- \fi
- \long\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
- \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \removehboxes}
- \hsize\columnwidth
+
+ \long\def\FN@makefootnoteparagraph{\unvbox\footins \FN@makehboxofhboxes
+ \setbox\FN@tempboxa=\hbox{\unhbox\FN@tempboxa \FN@removehboxes}%
+ \FN@setfootnoteparawidth
\@parboxrestore
\baselineskip=\footnotebaselineskip
\noindent
\rule{\z@}{\footnotesep}%
\unhbox\FN@tempboxa\par
}
- \def\makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
+ \def\FN@makehboxofhboxes{\setbox\FN@tempboxa=\hbox{}%
\loop
\setbox\FN@tempboxb=\lastbox
\ifhbox\FN@tempboxb
\setbox\FN@tempboxa=\hbox{\box\FN@tempboxb\unhbox\FN@tempboxa}%
\repeat
}
- \def\removehboxes{\setbox\FN@tempboxa=\lastbox
+ \def\FN@removehboxes{\setbox\FN@tempboxa=\lastbox
\ifhbox
- \FN@tempboxa{\removehboxes}%
+ \FN@tempboxa{\FN@removehboxes}%
\unhbox\FN@tempboxa
\fi
}
\fi
-\newif\ifFN@pp@footnotehint
-\newcounter{pp@next@reset}%
-\newif\ifFN@pp@towrite
-\FN@pp@towritefalse
+\@ifpackageloaded{multicol}
+ {\def\FN@setfootnoteparawidth
+ {\hsize\ifnum\doublecol@number>\@ne
+ \textwidth
+ \else \columnwidth \fi}}
+ {\def\FN@setfootnoteparawidth{\hsize\columnwidth}}
\ifFN@perpage
- \CheckCommand*\footnote{\@ifnextchar [%]
- \@xfootnote
- {%
- \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
- \@footnotemark \@footnotetext
- }%
- }
- \renewcommand*\footnote{\@ifnextchar [%]
- \@xfootnote
- {%
- \stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}%
- \FN@pp@footnote\@footnotemark
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
- \@footnotetext
- }%
- }
- \CheckCommand*\footnotemark{%
- \@ifnextchar [%]
- \@xfootnotemark
- {%
- \stepcounter{footnote}%
- \protected@xdef\@thefnmark{\thefootnote}%
- \@footnotemark
- }%
- }
- \renewcommand*\footnotemark{%
- \@ifnextchar [%]
- \@xfootnotemark
- {%
- \stepcounter{footnote}%
- \protected@xdef\@thefnmark{\thefootnote}%
- \FN@pp@footnote\@footnotemark
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
- }%
- }
- \gdef\FN@pp@initial@stab{\@addtoreset{footnote}{page}}
- \AtBeginDocument{\FN@pp@initial@stab}
- \newcounter{@fnserial}
- \def\FN@pp@cpage{0}
- \FN@pp@footnotehinttrue
- \newcommand{\footnotehint}{%
- \setcounter{footnote}{0}%
- \protected@writeaux\relax{\protect\FN@pp@footnotehinttrue}%
- \@tempcnta\c@@fnserial
- \advance\@tempcnta\@ne
- \global\c@pp@next@reset\@tempcnta
- }
- \AtBeginDocument{\protected@writeaux\relax{%
- \protect\providecommand{\protect\FN@pp@footnotehinttrue}{}%
- }%
- }
-\def\FN@pp@lastfoot{-1}
- \newcommand{\FN@pp@footnote@aux}[2]{%
- \ifnum\FN@pp@lastfoot<#1
- \ifFN@pp@footnotehint
- \FN@pp@resetfn{#1}{#2}%
- \FN@pp@footnotehintfalse
- \else
- \gdef\@tempa{#2}%
- \ifx\@tempa\FN@pp@cpage
- \else
- \FN@pp@resetfn{#1}{#2}%
- \fi
- \fi
- \def\FN@pp@lastfoot{#1}%
- \fi
- \global\let\FN@pp@initial@stab\relax
- }
- \newcommand{\FN@pp@resetfn}[2]{%
- \gdef\FN@pp@cpage{#2}%
- \expandafter\gdef
- \csname FN@pp@next-\FN@pp@prev@foot\endcsname{#1}%
- \def\FN@pp@prev@foot{#1}%
- \expandafter\xdef
- \csname FN@pp@next-\FN@pp@prev@foot\endcsname{\the\@MM}%
- }
- \newcommand{\FN@pp@prev@foot}{root}
- \AtBeginDocument{\protected@writeaux\relax{%
- \protect\providecommand{\protect\FN@pp@footnote@aux}[2]{}}%
- \c@pp@next@reset\@ne
- }
- \AtEndDocument{\let\FN@pp@footnote@aux\FN@pp@footnote@endaux
- \def\FN@pp@lastfoot{-1}%
- \FN@pp@footnotehintfalse
- \renewcommand{\FN@pp@prev@foot}{root}
- }
- \newcommand{\FN@pp@footnote@endaux}[2]{%
- \ifnum\FN@pp@lastfoot<#1
- \ifFN@pp@footnotehint
- \FN@pp@resetfn@end{#1}{#2}%
- \FN@pp@footnotehintfalse
- \else
- \gdef\@tempa{#2}%
- \ifx\@tempa\FN@pp@cpage
- \else
- \FN@pp@resetfn@end{#1}{#2}%
- \fi
- \fi
- \def\FN@pp@lastfoot{#1}%
- \fi
- }
- \newcommand{\FN@pp@resetfn@end}[2]{%
- \def\@tempa{#1}%
- \expandafter\ifx\csname FN@pp@next-\FN@pp@prev@foot\endcsname\@tempa%
- \else
- \@tempswatrue
- \fi
- \gdef\FN@pp@prev@foot{#1}%
- \gdef\FN@pp@cpage{#2}%
- }
-\let\FN@pp@@clearpage\clearpage
-\renewcommand{\clearpage}{\footnotehint\FN@pp@@clearpage}
-\def\FN@pp@footnote{%
- \if@minipage\else
- \global\advance\c@@fnserial\@ne
- \if@filesw
- \xdef\FN@pp@writetemp{%
- \noexpand\protected@writeaux\relax{%
- \string\FN@pp@footnote@aux
- {\the\c@@fnserial}{\noexpand\thepage}%
- }%
- }%
- \FN@pp@towritetrue
- \fi
- \ifnum\c@pp@next@reset>\c@@fnserial
- \else
- \global\expandafter\csname c@\@mpfn\endcsname\@ne
- \protected@xdef\@thefnmark{\thempfn}%
- \expandafter\let\expandafter\@tempa
- \csname FN@pp@next-\number\c@pp@next@reset\endcsname
- \ifx\@tempa\relax
- \global\c@pp@next@reset\@MM
- \else
- \global\c@pp@next@reset\@tempa
- \fi
- \fi
- \fi
-}
+ \RequirePackage{perpage}
+ \MakePerPage{footnote}
\fi
\ifFN@para
\else
@@ -647,14 +492,7 @@
\ifFN@multiplefootnote
\providecommand*{\multiplefootnotemarker}{3sp}
\providecommand*{\multfootsep}{,}
- \CheckCommand*\@footnotemark{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- \@makefnmark
- \ifhmode\spacefactor\@x@sf\fi
- \relax
- }
- \renewcommand*\@footnotemark{%
+ \newcommand*\FN@footnotemark{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}%
@@ -662,10 +500,6 @@
\nobreak
\fi
\@makefnmark
- \ifFN@pp@towrite
- \FN@pp@writetemp
- \FN@pp@towritefalse
- \fi
\FN@mf@prepare
\ifhmode\spacefactor\@x@sf\fi
\relax
@@ -684,6 +518,7 @@
}
\else
\let\FN@mf@prepare\relax
+ \let\FN@footnotemark\@footnotemark
\fi
\ifFN@stablefootnote
\let\FN@sf@@footnote\footnote
@@ -731,26 +566,18 @@
}
\let\FN@fnsymbol@lamport\@fnsymbol
\newif\if@tempswb
-\newcommand{\DefineFNsymbols}{%
- \@ifstar{\@tempswbtrue\@DefineFNsymbols}%
- {\@tempswbfalse\@DefineFNsymbols}%
-}
-\newcommand{\@DefineFNsymbols}[1]{%
- \@ifnextchar[% ]
- {\@DefineFNsymbols@{#1}}{\@DefineFNsymbols@{#1}[text]}%
-}
-\def\@DefineFNsymbols@#1[#2]#3{%
- \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
- \PackageInfo{footmisc}{Declaring symbol style #1}%
+\DeclareDocumentCommand\DefineFNsymbols {smO{text}m}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
\else
- \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
\fi
\toks@{}%
\def\@tempb{\end}%
- \FN@build@symboldef#3\end
+ \FN@build@symboldef#4\end
\def\@tempc{math}%
- \def\@tempd{#2}%
- \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \def\@tempd{#3}%
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
\ifx\@tempc\@tempd
\noexpand\ensuremath
\else
@@ -760,11 +587,8 @@
\noexpand\ifcase##1%
\the\toks@
\noexpand\else
- \if@tempswb
- \noexpand\@ctrerr
- \else
- \noexpand\@arabic##1\noexpand\FN@orange##1%
- \fi
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
\noexpand\fi
}%
}%
@@ -777,30 +601,24 @@
\expandafter\FN@build@symboldef
\fi
}
-\newcommand{\DefineFNsymbolsTM}{%
- \@ifstar{\@tempswbtrue\@DefineFNsymbolsTM}%
- {\@tempswbfalse\@DefineFNsymbolsTM}}%
-\newcommand{\@DefineFNsymbolsTM}[2]{%
- \expandafter\ifx\csname FN@fnsymbol@#1\endcsname\relax
- \PackageInfo{footmisc}{Declaring symbol style #1}%
+\DeclareDocumentCommand\DefineFNsymbolsTM {smm}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
\else
- \PackageWarning{footmisc}{Redeclaring symbol style #1}%
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
\fi
\toks@{}%
\def\@tempb{\end}%
- \FN@build@symboldefTM#2\end\@null
- \expandafter\xdef\csname FN@fnsymbol@#1\endcsname##1{%
+ \FN@build@symboldefTM#3\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
\noexpand\ifcase##1%
\the\toks@
\noexpand\else
- \if@tempswb
- \noexpand\@ctrerr
- \else
- \noexpand\@arabic##1\noexpand\FN@orange##1%
- \fi
- \noexpand\fi
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
}%
-}%
+}
\def\FN@build@symboldefTM#1#2{%
\def\@tempa{#1}%
\ifx\@tempa\@tempb
@@ -809,27 +627,14 @@
\expandafter\FN@build@symboldefTM
\fi
}
-\@ifundefined{TextOrMath}{%
- \@ifundefined{eTeXversion}{%
- \PackageError{footmisc}{Can't define commands for footnote symbol}%
- {Use e-LaTeX, or load package fixltx2e before
- footmisc}%
- }{%
- \protected\expandafter\def\csname TextOrMath\space\endcsname{%
- \ifmmode \expandafter\@secondoftwo
- \else \expandafter\@firstoftwo \fi
- }
- \edef\TextOrMath#1#2{%
- \expandafter\noexpand\csname TextOrMath\space\endcsname
-{#1}{#2}%
- }%
- }%
-}{}
\def\FN@orange#1{%
- \@bsphack
- \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
- \protect\@fnsymbol@orange
- \@esphack
+ \ifFN@robust
+ \@arabic#1%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+ \else \@ctrerr \fi
}
\global\let\@diagnose@fnsymbol@orange\relax
\AtEndDocument{\@diagnose@fnsymbol@orange}
@@ -842,27 +647,24 @@
}%
}%
}
-\@ifundefined{textbardbl}{%
- \DeclareTextSymbol{\textbardbl}{OMS}{107}%
- \DeclareTextSymbolDefault{\textbardbl}{TS1}}{}%
-\DefineFNsymbolsTM*{bringhurst}{%
- \textasteriskcentered *
+\DefineFNsymbolsTM{bringhurst}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
\textbardbl \|%
\textparagraph \mathparagraph
}%
-\DefineFNsymbolsTM*{chicago}{%
- \textasteriskcentered *
+\DefineFNsymbolsTM{chicago}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
\textbardbl \|%
\#\#%
}%
-\DefineFNsymbolsTM*{wiley}{
- \textasteriskcentered *
+\DefineFNsymbolsTM{wiley}{%
+ \textasteriskcentered *%
{\textasteriskcentered\textasteriskcentered}{**}%
\textdagger \dagger
\textdaggerdbl \ddagger
@@ -870,8 +672,8 @@
\textparagraph \mathparagraph
\textbardbl \|%
}%
-\DefineFNsymbolsTM{lamport-robust}{
- \textasteriskcentered *
+\DefineFNsymbolsTM{lamport-robust}{%
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -882,7 +684,7 @@
{\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
}
\DefineFNsymbolsTM*{lamport*}{%
- \textasteriskcentered *
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -903,7 +705,7 @@
}
\setfnsymbol{lamport*}
\DefineFNsymbolsTM{lamport*-robust}{%
- \textasteriskcentered *
+ \textasteriskcentered *%
\textdagger \dagger
\textdaggerdbl \ddagger
\textsection \mathsection
@@ -922,12 +724,6 @@
{\textparagraph\textparagraph\textparagraph}%%
{\mathparagraph\mathparagraph\mathparagraph}%
}
-\providecommand*{\footref}[1]{%
- \begingroup
- \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
- \endgroup
- \@footnotemark
-}
\newcommand\mpfootnotemark{%
\@ifnextchar[%
\@xmpfootnotemark
@@ -944,6 +740,13 @@
\endgroup
\@footnotemark
}
+\@ifpackageloaded{hyperref}{%
+ \let\H@@footnotetext\FN@footnotetext
+ \let\H@@footnotemark\FN@footnotemark
+}{%
+ \let \@footnotetext \FN@footnotetext
+ \let\@footnotemark \FN@footnotemark
+}
\endinput
%%
%% End of file `footmisc.sty'.