%% MFParPtc.sty---Uwe L"uck http://www.contact-ednotes.sty.de.vu. %% Modifies Alexander Rozhenko's manyfoot.sty. %% %% Copyright (C) 2003--2006 by Uwe L"uck--author-maintained. %% %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either %% version 1.3c of the License, or any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% We did our best to help you, but there is NO WARRANTY. %% % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mfparptc}[2006/06/26 v0.41 %% TODO ^^J\string"patch\string" for manyfoot.sty's paragraph footnotes (ul)] % % The paragraphed-footnote style of Alexander Rozhenko's manyfoot.sty % derives, like the same style of Dominik Wujastyk's and John % Lavagnino's EDMAC.doc, from Donald Knuth's proposal on pp. % 398--400 of the TeXbook. However, the two packages improve this % proposal in different respects. EDMAC (i) adds to the TeXbook % macros penalties solving a page breaking problem and (ii) accounts % for some problems of line breaking and hyphenation in the % footnotes (see EDMAC.doc, Section % `Footnotes'--`Paragraphed footnotes'). manyfoot.sty does not deal % with these things. % % The present version of the "patch" rearms the latter with EDMAC's % remedies (maybe at the cost of \linebreak and \\, see below). %% TODO % We aim at manyfoot.sty v1.4 from 1998/12/19. % % Alex and me could not convince ourselves entirely of these % "patches". They are *experimental*. When we have made up our minds, % they may become part of other packages. % % Indeed, the present "patches" disable the \SplitNote macro % from manyfoot.sty. So you have to choose between \SplitNote % (not loading present package) and the EDMAC enhancements % (loading the present package). % % --If you want to use this package for working with ednotes.sty, % load the latter with option `edmacpara'--this loads the % present file at a suitable time. This is useful only unless % only `plain' options of `ednotes.sty' are called. % --If you don't work with ednotes.sty and want to use the present % file only for modifying manyfoot functionality, load the present % file after manyfoot.sty has been loaded. This is useful only if % some footnote layer has been declared with option `para' or % `para*'. % % Implementation: % %% Note: \Requirepackage[...]{manyfoot} would cause option clash. % % \MFL@fnotepara expected: % (Also tests whether manyfoot.sty has been loaded with option % `para' or `para*'.) \CheckCommand*\MFL@fnotepara[3]{\let\@thefnmark\@empty \NCC@makefnmark{#2}% \MFL@insert#1{\reset@font\footnotesize \ifx\@thefnmark\@empty \@tempswafalse \else \@tempswatrue \protected@edef\@currentlabel{\@thefnmark}% \fi \color@begingroup \if@tempswa \setbox\@tempboxa\hbox{\@makefnmark}% \ifMFL@paraindent \@tempdima.8em \advance\@tempdima-\wd\@tempboxa \ifdim \@tempdima<\z@ \@tempdima\z@ \fi \else \@tempdima\z@ \fi \fi \setbox\@tempboxa\hbox{% \if@tempswa \hskip\@tempdima\unhbox\@tempboxa\nobreak \fi \ignorespaces#3\unskip\strut \ifMFL@split \penalty\m@ne\space \else \penalty-10 \hskip\footglue \fi }% \dp\@tempboxa\z@ \ht\@tempboxa\MFL@fudgefactor\wd\@tempboxa \box\@tempboxa \color@endgroup }% } % For splitting footnote paragraphs EDMAC inserts a (low) \penalty % after \box\@tempboxa at Wayne Sullivan's suggestion, see % EDMAC.doc after \def\para@vfootnote. % Another patch is needed to get \language whatsit nodes and % \discretionary's---cf. EDMAC.doc's description of \para@vfootnote. % This is due to Michael Downes, Wayne Sullivan, and Donald Knuth. % The insert text is first typeset in an "infinitely" wide \vbox. % Some problems remain as in EDMAC. No \break should occur in the % insert text. We locally redefine \@M and \hfil hoping to repair % \\ and \linebreak (even \break!) (experimental---please report!) %% TODO % (EDMAC.doc refers to Michael Downes, `Line breaking in \unhboxed % Text', TUGboat 11 (1990), pp. 605--612.) % TODO: Might redefine \hfill and more; cf. Michael Downes' paper. \def\MFL@fnotepara#1#2#3{\let\@thefnmark\@empty \NCC@makefnmark{#2}% \MFL@insert#1{\reset@font\footnotesize \ifx\@thefnmark\@empty \@tempswafalse \else \@tempswatrue \protected@edef\@currentlabel{\@thefnmark}% \fi \color@begingroup \if@tempswa \setbox\@tempboxa\hbox{\@makefnmark}% \ifMFL@paraindent \@tempdima.8em \advance\@tempdima-\wd\@tempboxa \ifdim \@tempdima<\z@ \@tempdima\z@ \fi \else \@tempdima\z@ \fi \fi \setbox\@tempboxa\vbox{% <- PATCH! \@parboxrestore % <- PATCH \hsize\maxdimen \noindent % <- PATCH! % \setbox\@tempboxa\hbox{% \if@tempswa \hskip\@tempdima\unhbox\@tempboxa\nobreak \fi \mathchardef\@M9999 % <- PATCH! \def\hfil{\hskip\linewidth\@minus\linewidth}% <- PATCH! \ignorespaces#3\unskip\strut % \ifMFL@split \penalty\m@ne\space \else % PATCH: removed. % \penalty-10 \hskip\footglue % PATCH: reinserted below. % \fi }% \setbox\@tempboxa\hbox{% <- PATCH! % Here is a suitable variant of EDMAC.doc's \unvxh, due to Michael % Downes: \setbox\z@\vbox{% \unvbox\@tempboxa \global\setbox\@ne\lastbox}% \unhbox\@ne \unskip \unskip \unpenalty \ifMFL@split % Moved here from above. \penalty\m@ne\space \else \penalty-10 \hskip\footglue \fi }% \dp\@tempboxa\z@ \ht\@tempboxa\MFL@fudgefactor\wd\@tempboxa \box\@tempboxa \penalty\z@ % <- PATCH! \color@endgroup }% } % Like in EDMAC.doc, the additional penalty is removed by % \MFL@makehhbox which corresponds to \makehboxofhboxes. % \MFL@makehhbox differs from \makehboxofhboxes, however, in even % \unvbox'ing a note bundle from a minipage. It seems not to be easy % to tell a \penalty 0 placed by patched \MFL@fnotepara from another. % In this version we just hope that removing such other penalties % causes no damage---after all, the bundle was not supposed to be % splitted. \def\MFL@makehhbox{% \loop \unpenalty % <- PATCH! \setbox\z@\lastbox \ifhbox\z@ \setbox\@tempboxa\hbox{\box\z@\unhbox\@tempboxa}% \repeat \ifvbox\z@ \unvbox\z@ \MFL@makehhbox \fi } \endinput VERSION HISTORY: v0.1 2003/01/19 First. Sent to John Lavagnino + ... v0.2 2003/01/23 Corrected \Provides... file name; supplied \vbox in \unvxh (bug fix!). v0.21 2003/02/27 Stressed problem with \linebreak and \\ in doc. v0.23 2003/02/28 Further comment on \CheckCommand, improved explanation mentioning \para@vfootnote. v0.3 2003/03/01 Changed \@M and \hfil to enable \\ and \linebreak in para-style. v0.31 2003/03/24 Reminded above that v0.2 was a real bug fix; added ednotes.sty@web.de. v0.32 2003/03/26 Added TODO on Alex' provision. [!?? 2004/04/25] v0.33 2003/03/28 Added `experimental'; `missing' -> `bad' (hyph.) 2004/01/29 Corrected, in the explanation for users, allusion to problems to be solved (line breaking, not only hyphenation) and added mention of \SplitNote problem. v0.34 2004/04/25 Added copyright etc.; added missing `%' before `manyfoot.sty does not deal [...]'. Made `(loading ...)' more clear. `patch...' -> `"patch..."'. v0.35 2004/05/10 Note on \RequirePackage[...]{manyfoot}; enlarged on loading (Ednotes.sty); manyfoot -> Manyfoot. 2004/05/20 Enhanced comment on \CheckCommand. 2004/07/26 \string" with \Provides..., ^^J. v0.36 2004/08/21 Added \@parboxrestore--as a bug fix for `center' environment. 2004/08/23 LPPL v1.3. 2004/08/31 Rearranged preamble concerning maintenance. v0.4 2004/10/07 Ednotes -> ednotes etc.; instructions: ednotes option `edmacpara'. v0.4a 2004/11/07 LPPL v1.3a. v0.4b 2005/01/10 Contact via http. v0.41 2006/06/26 \MFL@makemark -> \MFL@makefnmark for nccfoots v1.2; LPPL v1.3c.