Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
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
add comment

You could arrange for each note to end with a strut that's 2 or 3 sp deeper than normal so if the depth of the box isn't recognisable you know it doesn't end with a line with the market strut.

share|improve this answer
    
That's also a good idea. But I'd need to remove it afterwards because I'm column-balancing footnotes... –  Stephan Lehmke Apr 7 '12 at 5:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.