# Can I detect whether a footnote has been split?

Title sez it all: Can I detect, hopefully by inspecting `\box\footins`, whether a footnote has been split at page-breaking?

I found the package fnbreak but it uses labels, which is much too delayed for my purpose.

I thought about a mark, but where would I put `\splitbotmarks`?

Of course I could put a special penalty after every footnote and try to detect that with `\lastpenalty`, but it seems like a cheap trick and furthermore, maybe it would be discarded?

What would you do?

-

Inside the TeX output routine the number of split insertions is available in the register `\insertpenalties`. So as long as footnotes are the only insertions that can split (e.g., as it is the case with LaTeX) you can simply inspect this parameter to find out if a footnote has been split. From the TeX book:

Chapter 15 points out that \TeX\ gives special values to certain internal registers and parameters, in addition to |\box255|, just before the output routine begins. Insertions are put into their own vboxes, and ^|\insertpenalties| is set equal to the total number of heldover insertions; furthermore the ^|\outputpenalty| parameter is set to the value of the penalty at the current breakpoint. An output routine can be made to do special things when these quantities have special values. For example, the output routine of plain \TeX\ recognizes a ^|\supereject| (which ejects all held-over insertions) by the fact that |\supereject| causes |\outputpenalty| to be \$-20000\$, and by using |\insertpenalties| to decide if any insertions are being held over.

-
When I tested this I got `\insertpenalties=1` even if a footnote was moved entirely to the next page. But I can test it again. Maybe I was unclear with "split": I want to produce a continuation mark, so I'm only interested in footnotes which are really split in two parts. –  Stephan Lehmke Apr 15 '12 at 9:52
Hmm. I can't reproduce getting `\insertpenalties>0` without a split footnote. So I must have been deceived the last time I tested this. Thank yout for pointing this out! –  Stephan Lehmke Apr 15 '12 at 10:22