Skip to content

Commit 04a8eba

Browse files
committed
[macros] Add 'footnote' environment.
1 parent c91afba commit 04a8eba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/macros.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,22 @@
289289
\newnoteenvironment{note}{Note \arabic{note}}{end note}
290290
\newnoteenvironment{example}{Example \arabic{example}}{end example}
291291

292+
\makeatletter
293+
\let\footnote\@undefined
294+
\global\newsavebox{\@tempfootboxa} % must be global, to escape tables/figures
295+
\newsavebox{\@templfootbox}
296+
\newenvironment{footnote}{%
297+
\unskip\footnotemark% no space before the mark
298+
\normalfont%
299+
\footnotesize% text size for rendering the footnote text
300+
\begin{lrbox}{\@templfootbox}% temporarily save to local box
301+
}{%
302+
\end{lrbox}%
303+
\global\setbox\@tempfootboxa\hbox{\unhbox\@templfootbox}% copy to global box
304+
\footnotetext{\unhbox\@tempfootboxa}%
305+
}
306+
\makeatother
307+
292308
%% Library function descriptions
293309
\newcommand{\Fundescx}[1]{\textit{#1}}
294310
\newcommand{\Fundesc}[1]{\Fundescx{#1}:\space}

0 commit comments

Comments
 (0)