<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=us-ascii" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 05/29/2010 02:33 AM, Adam Fenn wrote:
<blockquote cite="mid:COL107-W565635F47658569F3D2190B9EC0@phx.gbl"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Well ... I notice that \@@footnote is \let within
a \begingroup ... \endgroup nest; maybe try a \global
prefix on the \let and see if that helps,
</pre>
</blockquote>
<pre wrap="">
With \global it runs without an error and produces footnotes
but they do not start from one on each new page (they just run consecutively as normal).
                                          
</pre>
</blockquote>
Since I do not do Latex for anything but business invoices, I cannot be
positive of this, but surely the footnote mechanism has a global
counter that increments before or after each footnote.
\show<footnotemacro> might reveal this. Assuming it does (it
really has to) the problem reduces to a need to reset this counter
globally just after each call to your \output macro---you must have one
somewhere. <br>
<br>
As long as your footnotes are short enough to avoid breaking over into
the next page, this may be all you need. If there is a possibility of
breaking, the task is more complex, because you may have to monitor
what part of any long footnote is on what page. <br>
<br>
Page breaking is asynchronous, and it is sometimes necessary to insert
a "pseudoparagraph" to get the regular page breaking mechanism to fire
up when <b><i>you</i></b> want it to, and not when an arbitrarily long
paragraph says it ought to happen. That requires inspecting the
penultimate version of your text and inserting a paragraph break with a
0pt \parfillskip followed by a \noindent before the rest of the long
original paragraph. I think I do this about ten times in each journal
issue I set. Occasionally I have to put an \eject before the \noindent.<br>
<br>
\def\pseudopar{\parfillskip=0pt\par\parfillskip=0pt plus 1fil} % make
sure you restore the normal \parfillskip<br>
<br>
Pseudopar is only necessary when the counter appears to have been reset
on the wrong footnote. <br>
<br>
You can also inspect the penultimate printout for obvious cases of
misnumbered footnotes and, just preceding the note, force the
footnotenumber counter to restart (using a global)
\count<whatever>=1 (or zero, depending on whether the footnote
counter increments before or after the footnote is committed to
temporary storage).<br>
<br>
You may find that you don't have to do this often. I have been
surprised by how effective it is to use the "pseudoparagraph" macro to
trick the output macro into setting things correctly. <br>
<br>
Pierre MacKay<br>
</body>
</html>