summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex209/contrib/misc/endnote.sty
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete/macros/latex209/contrib/misc/endnote.sty')
-rw-r--r--obsolete/macros/latex209/contrib/misc/endnote.sty34
1 files changed, 34 insertions, 0 deletions
diff --git a/obsolete/macros/latex209/contrib/misc/endnote.sty b/obsolete/macros/latex209/contrib/misc/endnote.sty
new file mode 100644
index 0000000000..0a6f9af68e
--- /dev/null
+++ b/obsolete/macros/latex209/contrib/misc/endnote.sty
@@ -0,0 +1,34 @@
+% Use \endnote{1}{text}. At the end of your document, type
+% \producenotes to actually flush all end notes to be printed.
+%
+% macros for making endnotes instead of footnotes
+% We make @ signs act like letters, temporarily, to avoid conflict
+% between user names and internal control sequences of plain format.
+\catcode`@=11
+\newbox\endnotebox
+
+\def\setendnotefont#1{\gdef\endnotefont{#1}}
+\setendnotefont{\normalsize\rm}
+\@definecounter{endnotei}
+\def\theendnotei{\arabic{endnotei}}
+\def\labelendnotei{(\theendnotei)}
+
+\def\endnote#1{\let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+ \stepcounter{endnotei} $^{\theendnotei}$\@sf% \vendnote
+ {\global\setbox\endnotebox=
+ \vbox{\parindent=0pt\endnotefont\unvbox\endnotebox\bgroup \theendnotei.\
+ #1\@endnote}}}
+
+\def\no@te{\ifcat\bgroup\noexpand\next \let\next\n@@te
+ \else\let\next\n@t\fi }%\next}
+
+\def\n@@te{\bgroup\aftergroup\@endnote\let\next}
+
+\def\n@t#1{#1\@endnote}
+
+\def\@endnote{\strut\unskip\hfil \penalty -\@M\relax \egroup} %
+
+\def\producenotes{%
+\ifvoid\endnotebox\else\medskip\unvbox\endnotebox\par\fi}
+\catcode`@=12 % at signs are no longer letters