Article View: comp.text.tex
Article #10475(ftn.sty) Footnotes in array tabular etc...
From: Kresten Krab Thorup
Date: Tue, 25 Jun 1991 14:30
Date: Tue, 25 Jun 1991 14:30
58 lines
2036 bytes
2036 bytes
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 <krab@iesd.auc.dk> 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}
%----------------------------------------------------------------------
Technical Details
Message-ID:
<KRAB.91Jun25153024@eos.iesd.auc.dk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!dkuug!iesd!iesd.auc.dk!krabShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <KRAB.91Jun25153024@eos.iesd.auc.dk> 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