I'm in the middle of proofreading TeX source for a book, and have found a couple of places where a stray space has slipped through before a footnote mark. Is there any automated way of scanning TeX source to detect this?

The answer depends whether you are proofreading the PDF or the *.tex source. While there may be a possibility to search via »regular expressions« through a PDF looking for footnote numbers, I have no idea how to do that.

But for the *.tex source in the editor there should be a very easy solution: All editors I know provide a funcitionality called »search and replace«. You just have to search for _\footnote{ and replace that by \footnote{ .

Edit: As serveral comments demand to be as precise as possible, I admit that this would be usefull. So I correct: "_" meant a whitespace and certainly it would be a good idea to search and replace two leading whitespaces before a footnote, as well.

Nitpick: that would not work for this \footnote{\dots} that is preceded by two spaces. Tab characters also pose a problem, as do footnote commands at the beginning of a line.
–
Christian LindigDec 16 '12 at 11:20