Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!dkuug!iesd!iesd.auc.dk!krab From: krab@iesd.auc.dk (Kresten Krab Thorup) Newsgroups: comp.text.tex Subject: (ftn.sty) Footnotes in array tabular etc... Message-ID: Date: 25 Jun 91 14:30:24 GMT Sender: news@iesd.auc.dk Distribution: comp Organization: Mathematics and Computer Science, University of Aalborg Lines: 58 Here's a little hack, that lets you use footnotes inside tabular, array, minipage etc. environments. It works by collecting the `foot note texts' in a token register, which it executes at the end of the environment. To this effect to more environments, just add those to the list at the bottom of the style. It should be completely transparent with LaTeX's buildin \footnote command. Happy Hacking! /Kresten Krab Thorup %---------------------------------------------------------------------- % ftn.sty - footnotes inside tabular/array environments % Kresten Krab Thorup 1991-06-25 \def\inner@ftn{% \@ifnextchar[{\in@xftn}{\in@ftn{}}} \def\in@xftn[#1]#2{% \in@ftn{[#1]}{#2}} \def\in@ftn#1#2{% \@temptokena={\footnotetext#1{#2}}% \@temptokenb=\expandafter{\ftn@list}% \xdef\ftn@list{\the\@temptokenb\the\@temptokena}% \footnotemark#1} \def\exec@ftn{% \let\@temptokena=\ftn@list \let\ftn@list=\empty \@temptokena} \def\ftn#1{% \expandafter\let\csname o@#1\expandafter\endcsname \expandafter=\csname #1\endcsname \expandafter\let\csname o@end#1\expandafter\endcsname \expandafter=\csname end#1\endcsname \expandafter\def\csname #1\endcsname{\bgroup \let\footnote\inner@ftn\csname o@#1\endcsname} \expandafter\def\csname end#1\endcsname{\csname o@end#1\endcsname \exec@ftn\egroup}} % % INITIALIZING % \newtoks\@temptokenb \def\ftn@list{} % add more to this list... \ftn{tabular} \ftn{array} \ftn{minipage} \ftn{eqnarray} %----------------------------------------------------------------------