summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex209/contrib/misc/fnpara.sty
blob: 03e909b7e3ddd02ad472a39bcf75ee7223dec1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
% FNPARA.STY
% A LaTeX style to typeset footnotes in run-on paragraphs.
% See end of this file (after \endinput) for comments.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% From LaTeX.tex :
\long\def\@footnotetext#1{\insert\footins{\footnotesize
%CCCC  ---the next four lines are probably redundant, since:
%           the paragraphing takes place later;
%           and this style of footnote never gets split.
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox
%CCCC  ---these two lines will need to be reproduced when doing the unboxing.
    \hsize\columnwidth
    \@parboxrestore
%CCCC
   \floatingpenalty \@MM
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}
%CCCC  --- need to set each footnote in an hbox and apply 
%          the fudge factor here:
    \setbox0=\hbox{%
    \@makefntext
%CCCC   --- this needs a parameter
%       --- the rule should be moved to the beginning of the footnote
%           paragraph:
%       --- but the \ignorespaces should be left here.
%      \rule{\z@}{\footnotesep}
      {\ignorespaces
      #1\strut
%CCCC   --- penalty to help line breaking in footnote para goes here:
%              value from TeXbook.
      \penalty -10
      \hskip\footglue
      }  % end of parameter
      }  % end of \hbox
  \dp0=0pt \ht0=\fudgefactor\wd0 \box0
      }  % end of \footins
      }  % end of \def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CCCC --- from TeXbook
\newskip\footglue \footglue=1em plus.3em minus.3em
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cut down from ARTICLE.TEX :
\long\def\@makefntext#1{{$^{\@thefnmark}$}\nobreak\hskip.5em\relax#1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% From LaTeX.TEX:
\def\@makecol{\ifvoid\footins \setbox\@outputbox\box\@cclv
   \else\setbox\@outputbox
     \vbox{\boxmaxdepth \maxdepth
     \unvbox\@cclv\vskip\skip\footins\footnoterule
          \global\setbox1\vbox{\makefootnoteparagraph}\unvbox1}\fi
     \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
     \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
        \@texttop\dimen128=\dp\@outputbox\unvbox\@outputbox
        \vskip-\dimen128\@textbottom}
     \global\maxdepth\@maxdepth}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% From TeXbook, p.398 ff., AVOIDING the  redefinition of \\ in LaTeX!!
{\catcode`p=12 \catcode`t=12 \gdef\@ennumber#1pt{#1}}

{\footnotesize \newdimen\footnotebaselineskip
%CCCC --definitely needed:
  \global
  \footnotebaselineskip=\normalbaselineskip}

\dimen0=\footnotebaselineskip \multiply\dimen0 by 1024
\divide \dimen0 by \columnwidth \multiply\dimen0 by 64
\xdef\fudgefactor{\expandafter\@ennumber\the\dimen0 }

\def\makefootnoteparagraph{\unvbox\footins \makehboxofhboxes
  \setbox0=\hbox{\unhbox0 \removehboxes}
%CCCC  ---now we are ready to set the paragraph:
    \hsize\columnwidth
    \@parboxrestore
    \baselineskip=\footnotebaselineskip
    \noindent
%CCCC ---this is where the strut is needed:
  \rule{\z@}{\footnotesep}%
  \unhbox0\par}
\def\makehboxofhboxes{\setbox0=\hbox{}
  \loop\setbox2=\lastbox \ifhbox2 \setbox0=\hbox{\box2\unhbox0}\repeat}
\def\removehboxes{\setbox0=\lastbox
  \ifhbox0{\removehboxes}\unhbox0 \fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput

                           FNPARA.STY
    A LaTeX style to typeset footnotes in run-on paragraphs.

History:

A vain attempt at this LaTeX modification was tried in late
September 1988 by Dominik Wujastyk, and sent to TeXhax and UKTeX
for comment.  Chris Rowley came up with a working
version a few days later, but it still needs thorough testing.

The Style:

This LaTeX style changes the way LaTeX does footnotes.  With this
style invoked (\documentstyle[fnpara]{article}), footnotes will
be typeset in a running paragraph, instead of one above another.
It is suitable for texts such as critical editions, which contain
many short footnotes.

This is based on the TeX macros described by Knuth in the
TeXbook, Dirty Tricks, pages 398--400.  It is  not tested beyond
some simple examples.   In particular, it has not been tested
properly in connection with even the simplest of environments, nor with
other floats.

(In fact, ordinary LaTeX footnotes sometimes do not work well
if they need splitting (e.g. producing blank pages,
or appearing in shufled form): but these
problems should not affect this style.
I --CR-- have sent in a Bug Report about some
of these problems.)

Be aware of Knuth's note on the limitations of this method of
doing the job:  the TeX stack is used four times per footnote,
and the stack is limited (TeXbook pp. 300--301).  So if you have
very many footnotes (in the hundreds) and encounter
  "! TeX capacity exceeded, sorry [... save size ...]"
errors, you may need to break your text into smaller sections.
Fortunately, this is very easy to do with LaTeX.  And the
footnote counter can be reset to make the joins seamless.

Chris Rowley
Office tel: (England) 01 794 0575
Janet: CA_ROWLEY@UK.AC.OPEN.ACS.VAX

Dominik Wujastyk
Office tel: (England) 01 387 4477 x 3013
Janet: Wujastyk@UK.AC.UCL.EUCLID


October 3, 1988