Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \textheight.3\textheight
- \paperheight.5\paperheight
- \pdfpageheight\paperheight
- \usepackage{longtable}
- \makeatletter
- \def\foopage#1#2{\global\expandafter\let\csname foopage-#1-#2\endcsname\@empty}
- \let\foolist\@empty
- \def\foodef#1#2{%
- \g@addto@macro\foolist{{#1}}%
- \@namedef{foo-#1}{#2}}
- \def\foocite#1{%
- \textsuperscript{#1}%
- \let\reserved@a\relax
- \protected@write\@auxout{}{\string\foopage{#1}{\thepage}}%
- }
- \def\fooloop{%
- \expandafter\@tfor\expandafter\tmp\expandafter:\expandafter=\foolist\do{%
- \expandafter\ifx\csname foopage-\tmp-\thepage\endcsname\@empty
- \insert\footins{%
- \reset@font\footnotesize
- \interlinepenalty\interfootnotelinepenalty
- \splittopskip\footnotesep
- \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
- \hsize\columnwidth \@parboxrestore
- \textsuperscript{\tmp}\csname foo-\tmp\endcsname}%
- \fi
- }}
- % add the insert loop
- \def\foopatch#1\output#2{%
- \def\LT@start{#1\fooloop\output{\LT@output}}}
- \expandafter\foopatch\LT@start
- \def\foopatch#1\copy\LT@head\nobreak#2{%
- \def\LT@output{#1\copy\LT@head\nobreak\fooloop#2}}
- \expandafter\foopatch\LT@output
- \begin{document}
- \foodef{A}{Something about A.}
- \foodef{i}{Something equally dull about i.}
- \foodef{w}{In case you missed $x$ $y$ and $z$, here's $w$. I repeat, here's $w$. Actually, forget about $y$, $w$ seems to be the key. And, to tell You the truth, I don't really like $x$. }
- \begin{longtable}{ll}
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\foocite{A}\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\foocite{i}\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\foocite{w}\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- aaaa&bbb\\
- \end{longtable}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement