%!TEX TS-program = pdftex \input eplain \beginpackages \usepackage{url} \usepackage{color} \endpackages \enablehyperlinks %++++++++++++++++++++++++++++++++++++++++++++++++ % page layout \pdfpagewidth 129mm \pdfpageheight 198mm \hsize 99mm %\vsize 161mm % unadjusted \vsize \vsize 454pt \voffset -9.4mm \hoffset -10.4mm % to adjust the space between the header and the text block \def\makeheadline{\vbox to 0pt{\vskip-22.5pt \line{\vbox to8.5pt{}\the\headline}\vss}\nointerlineskip} % to adjust the space between the footer and the text block \def\makefootline{\baselineskip24pt\lineskiplimit0pt\line{\the\footline}} %++++++++++++++++++++++++++++++++++++++++++++++++ \tolerance 1414 \hbadness 1414 \hyphenpenalty 500 \finalhyphendemerits 7500 \emergencystretch 5pt \hfuzz 0.3pt \vfuzz=\hfuzz % paragraph spacing \parskip 0pt \parindent 1.2em \baselineskip 12pt \frenchspacing \def\nl{\hfil\break} \def\pagebreak{\vadjust{\eject}} \def\newpage{\vfill\eject} \def\star{\leavevmode\lower2.85pt\hbox{*}} \def\Star{\centerline{\star}} \def\stars{\centerline{\star\qquad\star\qquad\star}} %++++++++++++++++++++++++++++++++++++++++++++++++ % footnote macro from the TeXbook \catcode`\@=11 \def\footnote#1{\edef\@sf{\spacefactor\the\spacefactor}#1\@sf \insert\footins\bgroup\eightpoint \interlinepenalty100 \let\par=\endgraf \leftskip=0pt \rightskip=0pt \splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000 \smallskip\item{#1}\bgroup\strut\aftergroup\@foot\let\next} \skip\footins=12pt plus 2pt minus 4pt % space added when footnote exists \dimen\footins=30pc % maximum footnotes per page \font\eightrm=cmr8 \font\eightit=cmti8 \font\eightbf=cmbx8 \font\eighttt=cmtt8 % edited version of the \eightpoint macro % these macros are from `manmac.tex' \def\eightpoint{\def\rm{\fam0\eightrm}% \def\it{\fam\itfam\eightit}% \def\bf{\fam\bffam\eightbf}% \def\tt{\fam\ttfam\eighttt}% \normalbaselineskip=9pt \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}% \normalbaselines\rm} \catcode`\@=12 \def\footnoterule{} % %++++++++++++++++++++++++++++++++++++++++++++++++ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % endnote macro from TeXlive % 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{\rm} \def\endnote#1{\let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi #1\@sf\vendnote{{#1}}} \def\vendnote#1{\global\setbox\endnotebox= \vbox{\parindent=0pt\endnotefont\unvbox\endnotebox\bgroup \item#1\ignorespaces\futurelet\next\aftergroup\no@te\relax}} \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\egroup} % \newcount\enotecounter \def\resetenotecount{\global\enotecounter=0 } \resetenotecount \def\setenotecount#1{\global\enotecounter=#1 } % \def\setendnoteflagfont#1{\gdef\endnoteflagfont{#1}} \setendnoteflagfont{\sevenrm} \def\enote{\unskip \global\advance \enotecounter by 1 % First bump the counter. % Now convert the current value of the counter into a superscripted numeral \endnote{{$^{\hbox{\endnoteflagfont\the\enotecounter}}$}}} % \def\producenotes{% \ifvoid\endnotebox\else\medskip\unvbox\endnotebox\par\fi} \catcode`@=12 % at signs are no longer letters % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \centerline{Endnote macros}\medskip \centerline{(1)}\medskip \noindent An endnote macro which I found by searching my TeX Live installation. It works similarly to the footnote macro. The referring numbers in the text are appearing as full-sized numerals instead of superscripts. I'm not really sure why. I made the `1' in the reference to the first endnote superscript by using \TeX\ math mode, but then the number is superscript in the endnote itself, which looks wrong. \medskip\stars\medskip \noindent The entire set of endnotes could be typeset in a hang paragraph style, with the text hung from the endnote number. For example, the ten endnotes we have been considering might appear as follows:\endnote{$^1$}{First endnote.} And some more.\endnote{2}{Second endnote.} And some more. And some more.\endnote{3}{Third endnote.}$N,$\endnote{4}{Fourth endnote. } And some more. And some more.\endnote{5}{Fifth endnote. (This is incredibly boring, but it's just an example.)}$N,$\endnote{6}{Another.} And some more. And some more. And some more.\endnote{7}{And another.}$N,$\endnote{8}{Ho hum.}$N,$\endnote{9}{Umpteenth endnote.}$N,$\endnote{10}{Oodles of them.} \newpage \centerline{Notes}\bigskip \producenotes \newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % endnote macro \newcount\endno \endno=0 \def\endnotetext{} \def\endnote#1#2{\eightpoint\global\advance\endno by 1 \definexref{#1}{$^{\number\endno}$}{number} \item{\number\endno.} \endnotetext{#2} } % If you do not want endnotes to be hyperlinked, but want to keep hyperlinks % elsewhere in the document, use this: %\catcode`\@=11 %\let\xrefn=\plain@xrefn %\catcode`\@=12 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \centerline{(2)}\medskip \noindent An endnote macro I wrote that uses Eplain's cross referencing mechanism to place the referring numbers in the text. Unlike with the previous macro the endnotes themselves are placed where they will occur in the book,\footnote{*}{They could be placed at the end of individual chapters, or more usually all together at the end of the book. If you want the notes to be numbered by chapter, you will have to reset the counter ({\tt\string\endno}) at the beginning of each chapter's notes.} and a cross reference is used to place the referring superscript numbers in the main text. In the endnote markup -- \verbatim\endnote{label}{text of endnote}|endverbatim\ -- the label must be (a) distinct from the label in any other crossref definition in the document; and (b) identical with the label in the reference: \verbatim\xrefn{label}|endverbatim.\footnote{\dag}{Actually, you can have more than one {\tt\string\xrefn} referring to the same {\tt\string\definexref}, but you don't usually get multiple references to the same endnote.} You have to run \TeX\ twice to get the referring numbers to appear properly. I have noticed that \TeX\ puts some additional space after the superscripts in the text. This is nothing to do with the cross-referencing macro, \TeX\ does this after superscripts, and fractions too: zzz zzz$^1$ zzz$1\over2$ zzz zzz zzz. You can counteract this by altering the label definition in the macro:\nl\verbatim\definexref{#1}{$^{\number\endno}\kern-1pt$}{number}|endverbatim. \medskip\stars\medskip \noindent The entire set of endnotes could be printed in a hang paragraph style, cross-referenced to their referring numbers in the text. For example, the ten endnotes we have been considering might appear as follows:\xrefn{n1} And some more.\xrefn{n2} And some more. And some more.\xrefn{n3}$N,$\xrefn{n4} And some more. And some more.\xrefn{n5}$N,$\xrefn{n6} And some more. And some more. And some more.\xrefn{n7}$N,$\xrefn{n8}$N,$\xrefn{n9}$N,$\xrefn{n10} \newpage \centerline{Notes}\bigskip {\leftskip3pt% to stop the `1' of `10' protruding into the margin \endnote{n1}{First endnote.} \endnote{n2}{Second endnote.} \endnote{n3}{Third endnote.} \endnote{n4}{Fourth endnote.} \endnote{n5}{Fifth endnote. (This is incredibly boring, but it's just an example.)} \endnote{n6}{Another.} \endnote{n7}{And another.} \endnote{n8}{Ho hum.} \endnote{n9}{Umpteenth endnote.} \endnote{n10}{Oodles of them.} } \bye