[5970] in Athena Bugs

home help back first fref pref prev next nref lref last post

[kcb@hss.caltech.edu: Re: LaTeX endnotes, degree symbol]

daemon@ATHENA.MIT.EDU (John T Kohl)
Fri Sep 7 09:44:04 1990

Date: Fri, 7 Sep 90 09:43:13 -0400
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: bug-sipb@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU

Both SIPB and Athena might consider installing this (or finding a better
version) so that LaTeXers can generate endnotes.

From: kcb@hss.caltech.edu (KC Border)
Newsgroups: comp.text.tex
Subject: Re: LaTeX endnotes, degree symbol
Date: 6 Sep 90 23:44:24 GMT
Organization: California Institute of Technology

In article <1990Sep6.201811.2221@rice.edu> susan@crysiris.rice.edu (susan chacko) writes:
>1) The journal I'm submitting a paper to requires 'endnotes' rather than
>footnotes. How can I change the footnotes in Latex to be collected and
>printed all together at the end?

I use the following, admittedly not perfect style option. I would like
to see a better one.
****************************************************************************
% endnotes.sty
% *************** Footnotes into Endnotes ***************
% Kim C. Border, Sep 4 1990
% kcb@hss.caltech.edu
%
% This file may be freely copied, modified, and distributed.
%
% Many journals in the humanities and social sciences require endnotes
% rather than footnotes. This style option reads the contents of
% a \footnote command verbatim into a file \jobname.end, whence
% they may be retrieved by an \endnotes command.
%
% It is a \documenstyle option, e.g., \documentstyle[endnotes]{article}.
% Place the command \endnotes where you want the notes to appear:
% after the last footnote, usually right before the bibliography.
% The \endnotes command creates a new page.
%
% The option works by redefining LaTeX's private \@footnotetext command,
% and is modeled after DEK's \answer macro in the TeXbook.
% It is always a bit dicey to redefine commands that you only
% vaguely understand, but I have tested it on my own manuscripts
% under LaTeX 2.09 and it seems to work. I do not consider myself an expert
% and would be glad to receive a more elegant version. 
%
% ***************** THERE IS ONE KNOWN (NONFATAL) PROBLEM: **************
% Since \ is catcoded to 12 for verbatim copying, if your footnote's text
% contains an unequal number of \{'s and \}'s, (for intance, if you
% have a \left\{  balanced by a \right.), then TeX believes
% you have unmatched braces and does not figure out where the
% argument of the \footnote command ends. The CURE is to use \lbrace
% and \rbrace instead. 
%
% If anyone has a better solution, please let me know:
% kcb@hss.caltech.edu 
%
\typeout{endnotes.sty-- Sep 4, 1990 -- kcb@hss.caltech.edu}
%
%
\newwrite\n@tefile
\immediate\openout\n@tefile=\jobname.end
\immediate\write\n@tefile{\relax}

%	redefine footnotes _after_ title 
\let\@maketitle@\maketitle
\def\maketitle{\@maketitle@
\long\gdef\@footnotetext{\immediate\write\n@tefile{}
	\begingroup\@mysetupcopy\@mycopynote}
\let\@maketitle@\relax}

\def\@mysetupcopy{\@sanitize}% for verbatim copying

\long\gdef\@mycopynote#1{%
	\immediate\write\n@tefile{\@thefnmark\hskip 1em }
	\immediate\write\n@tefile{#1}\endgroup}

\def\endnotes{\immediate\closeout\n@tefile
    \clearpage
    \section*{Notes}
    \input\jobname.end}
% **************************************************************************


Kim C. Border			Division of the Humanities and Social Sciences
kcb@hss.caltech.edu		228-77
				California Institute of Technology
				Pasadena, California 91125

home help back first fref pref prev next nref lref last post