1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
%
%<*other>
%
%
\ifcat a\noexpand @\let\next\relax\else \def\next{%
\documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
\def\filedate{2000/04/29}
\def\filename{klunote.sty}
%\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
%\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
%\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
%\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
%\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
%\changes{v??}{1999/12/22}{SK: footnotemarks implemented with textsuperscript}
%\CodelineIndex
%\newcommand{\Bs}{$\backslash$}
%\parindent=0pt
%\parskip=3pt
%\hfuzz=11pt
%\MakeShortVerb{\|}
%\setlength{\marginparwidth}{0in}
%\addtolength{\textwidth}{4pc}
%\begin{document}
%\begin{opening}
%\title{\filename}
%\date{\filedate}
%\author{T. \surname{Hoekwater}}
%\institute{Kluwer Academic Publishers}
%\begin{abstract}
% This internal stylefile takes care of footnotes, endnotes and marginpars.
%\end{abstract}
%\end{opening}
%\tableofcontents
%\section{Usage}
%
%
% Footnotes are quite normal in usage, so please see Lamport for
% details.
%
% Endnotes were originally code from |endnotes.sty| (\LaTeX 2.09
% package), with some minor adjustments to aid\endnote{Example}
% kluwer layout. Endnotes can be used just as |\footnote|s, with the
% command |\endnote| and family. Say |\theendnotes| where you
% want\endnote{another}.
% them to appear in your document.
%
% This endnote code {\it does\/} obey |\nofiles|, but will not work
% then (prevents an NFS error i've had). This means: any
% writing command will be ignored, but the file will be read if
% available. Note that this might mean that the endnotes are incorrect!
%\newpage\section{Implementation}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{klunote}[\filedate ]
% \end{macrocode}
%
%
% \subsection{Footnotes}
%
% Most stylefiles need to redefine the following lines, but we
% need a default anyway...
% \begin{macrocode}
%</other>
%<*main>
\def\footnoterule{\kern-3\p@
\hrule width 3pc
\kern 2.6\p@}
% \long\def\@makefntext#1{\parindent 1em\noindent
% \hbox to 1.5em{\hss$^{\@thefnmark}$}\hskip0.5em\footnotesize#1}
% \def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
% SK: reimplemented with \textsuperscript, following LaTeX format
\long\def\@makefntext#1{\parindent 1em\noindent
\hbox to 1.5em{\hss\textsuperscript{\@thefnmark}}%
\hskip0.5em\footnotesize#1}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
\footnotesep 6pt
\skip\footins 10pt plus 4pt minus 2pt
% \end{macrocode}
% \subsection{Endnotes}
% User options first.
% \begin{macrocode}
\newcounter{endnote}
\def\theendnote{\arabic{endnote}}
\def\@makeenmark{\hbox{$^{\@theenmark}$}}
\newdimen\endnotesep
\setlength\endnotesep{1pt}
\def\notesname{Notes}% <------ JK
\def\endnotesize{\footnotesize}
\def\endnoteformat{\vskip\endnotesep
\rightskip\z@ \leftskip\z@
\parindent=1.8em\leavevmode\llap{\hbox{$^{\@theenmark}$ }}}
% \end{macrocode}
% User level interface: |\endnote|, |\addtoendnotes| and
% |\theendnotes|.
% \begin{macrocode}
\def\endnote{%
\@ifnextchar[
{\@xendnote}%
{\stepcounter{endnote}%
\xdef\@theenmark{\theendnote}%
\@endnotemark
\@endnotetext}}
\long\def\addtoendnotes#1{%
\if@endnotesopen \else \@openendnotes \fi
\begingroup
\newlinechar='40
\let\protect\string
\if@filesw \immediate\write\@endnotes{#1}\fi
\endgroup}
% \end{macrocode}
%
% I can't remember what the |\makeatletter| is doing here.
%
% \begin{macrocode}
\def\theendnotes{%
\if@filesw \immediate\closeout\@endnotes \fi
\global\@endnotesopenfalse
\begingroup
\makeatletter
\def\@doanendnote##1##2>{%
\def\@theenmark{##1}%
\par\begingroup
\endnoteformat}%
\def\@endanendnote{\par\endgroup}%
\def\ETC.{\PackageError{klunote}{%
Some endnotes will be truncated}{%
Because of memory constraints, LaTeX truncated some\MessageBreak
long endnotes while writing the auxiliary file.\MessageBreak
Use a bigger TeX main memory size to avoid this,\MessageBreak
It is save to continue by pressing <enter>}%
\def\ETC.{\relax}}%
\IfFileExists{\jobname.ent}{%
\endnoteheading
\endnotesize
\@input{\jobname.ent}}{}%
\endgroup }
% \end{macrocode}
% The less commonly used part of the user interface.
% \begin{macrocode}
\def\endnotemark{%
\@ifnextchar[{\@xendnotemark}%
{\stepcounter{endnote}%
\xdef\@theenmark{\theendnote}%
\@endnotemark}}
\def\endnotetext{%
\@ifnextchar[{\@xendnotenext}%
{\xdef\@theenmark{\theendnote}%
\@endnotetext}}
\def\endnoteheading{\section*{\notesname
\imarkboth{\notesname}{\notesname}}\leavevmode\par}
% \end{macrocode}
%
% \begin{macrocode}
\def\@xendnote[#1]{\begingroup
\c@endnote=#1\relax
\xdef\@theenmark{\theendnote}\endgroup
\@endnotemark\@endnotetext}
\let\@doanendnote=0
\let\@endanendnote=0
\newwrite\@endnotes
\newif\if@endnotesopen \@endnotesopenfalse
\def\@openendnotes{%
\if@filesw \immediate\openout\@endnotes=\jobname.ent\relax
\global\@endnotesopentrue \fi}
\long\def\@endnotetext#1{%
\if@endnotesopen \else \@openendnotes \fi
\if@filesw \immediate\write\@endnotes{\@doanendnote{\@theenmark}}\fi
\begingroup
\def\next{#1}%
\newlinechar='40
\if@filesw \immediate\write\@endnotes{\meaning\next}\fi
\endgroup
\if@filesw \immediate\write\@endnotes{\@endanendnote}\fi
\edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}}
\def\@xendnotemark[#1]{%
\begingroup
\c@endnote #1\relax
\xdef\@theenmark{\theendnote}\endgroup
\@endnotemark}
\def\@endnotemark{%
\leavevmode
\ifhmode \edef\@x@sf{\the\spacefactor}\fi
\@makeenmark
\ifhmode\spacefactor\@x@sf\fi\relax}
\def\@xendnotenext[#1]{%
\begingroup \c@endnote=#1\relax
\xdef\@theenmark{\theendnote}\endgroup
\@endnotetext}
% \end{macrocode}
%
%
% \subsection{marginparbox}
% This redefinition puts a |\marginparbox| in a |\fbox|. I am not sure
% whether we want this, because it is quite hard to restore if needed.
% \begin{macrocode}
%\long\def\@savemarbox#1#2{%
% \global\setbox #1
% \vtop{\fbox{\vtop{\hsize\marginparwidth
% \@parboxrestore
% \raggedright
% \footnotesize
% #2}}}}
%</main>
%<*other>
\endinput
% \end{macrocode}
% \theendnotes
%\PrintIndex
%\end{document}
% end of klunote.sty
%</other>
|