summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/titlefoot/titlefoot.sty
blob: aa75d7595c8a390d2e5b1f6509c6dd8c83b2cf7f (plain)
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
%%%  TITLE PAGE ENHANCEMENTS
%%%  Brett Presnell (presnell@stat.ufl.edu)
%%%  Created: 1997/07/16
%%%  Last modified: 1999/03/02
%%% 
%%%  Copyright  1999 Brett Presnell
%%%  This program can be redistributed and/or modified under the terms
%%%  of the LaTeX Project Public License Distributed from CTAN
%%%  archives in directory macros/latex/base/lppl.txt; either
%%%  version 1 of the License, or any later version.
%%%
%%%  Gives the capability of adding keywords, a running title, AMS
%%%  subject classifications, and an ``authors footnote'' as footnotes
%%%  to the title or first page of a document.  I use it with the
%%%  article class, but I hope it will work with any class for which
%%%  the ``\thanks'' macro works.  Suggestions are welcome.
%%%
%%%  Keywords are set by, e.g., \keywords{Smoothing, bootstrap.}.
%%%
%%%  The running title is set by, e.g., \runningtitle{A few words.}.
%%%
%%%  AMS subject classifications are set by, e.g.,
%%%    \amssubj{Primary 62G07, Secondary 62G09.}
%%%
%%%  To change the phrase before the keywords, short title, or AMS
%%%   subject classifications, just use \renewcommand{\keywordsname}{...},
%%%  \renewcommand{\runningtitlename}{...}, and
%%%  \renewcommand{\amssubjname}{...}.  Similarly use
%%%  \renewcommand{\authorfnname}{...} to add a generic phrase before
%%%  the author's footnote.
%%%
%%%  I've also included a simple macro to insert a comma between
%%%  footnote marks.  Mainly this is for use with multiple "thanks"
%%%  for a single author, so it seems to fit in with the general
%%%  purposes of this package.  There must be a better way to do this
%%%  though.
%%%
%%%  CHANGES
%%%
%%%  1999/03/02: Added free-latex copyright notice.
%%%
%%%  1998/03/17: Fixed a small bug that deleted the mark on footnotes
%%%              after the title.
%%%
\ProvidesPackage{titlefoot}[1999/03/02]
%%
%%  I'm not actually sure if this needs LaTeX2e, but it might.
%%
\NeedsTeXFormat{LaTeX2e}
%%
%%  A funny little macro to insert a comma between footnote marks.
%%  It would be nice to fix this up to swallow extra spaces on either
%%  side of the comma, but for now ...
%%
\newcommand{\footnotecomma}{\hbox{\@textsuperscript{\normalfont,}}}
%%
%%  Define macros for creating keywords and AMS subject
%%  classifications:
%%
\newcommand{\keywordsname}{\textit{Key words and phrases. }}
\newcommand{\runningtitlename}{\textit{Running title. }}
\newcommand{\amssubjname}{\textit{AMS 1991 subject classifications. }}
\newcommand{\authorfnname}{}
\newcommand{\unmarkedfntext}[1]{{
  \renewcommand{\@makefnmark}{\mbox{}}
  \footnotetext{#1}
}}
\def\keywords#1{
    \protected@xdef\@keywords{\@keywords
        \protect\unmarkedfntext{{\keywordsname}#1}}%
}
\def\runningtitle#1{
    \protected@xdef\@runningtitle{\@runningtitle
        \protect\unmarkedfntext{{\runningtitlename}#1}}%
}
\def\amssubj#1{
    \protected@xdef\@amssubj{\@amssubj
        \protect\unmarkedfntext{{\amssubjname}#1}}%
}
\def\authorfootnote#1{
    \protected@xdef\@authorfootnote{\@authorfootnote
        \protect\unmarkedfntext{{\authorfnname}#1}}%
}
\let\@keywords\@empty
\let\@runningtitle\@empty
\let\@amssubj\@empty
\let\@authorfootnote\@empty
%%
%%  The rest is just a simple modification of the \maketitle stuff from
%%  the classes.dtx file in the latex2e base distribution. Alterations
%%  are highlighted.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  BEGIN MATERIAL TAKEN FROM CLASSES.DTX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \if@titlepage
  \renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\LARGE \@title \par}%
    \vskip 3em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\large \@date \par}%       % Set date in \large size.
  \end{center}\par
  \@thanks
%%%%%%%%% (presnell 1997/7/16) %%%%%%%%%
  \@authorfootnote                     %
  \@keywords                           %
  \@runningtitle                       %
  \@amssubj                            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
%%%%%%%%% (presnell 1997/7/16) %%%%%%%%%
  \global\let\@authorfootnote\@empty   %
  \global\let\@keywords\@empty         %
  \global\let\@runningtitle\@empty     %
  \global\let\@amssubj\@empty          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\else
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
%% This rlap is a bad idea if you use multiple thanks for one author,
%% so I'm removing it.  Could be an option, but I just think it was
%% a bad idea in the first place.
%%%%%%%%% (presnell 1998/03/12) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% %
    \def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}%         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks                    %
  \endgroup
%%%%%%%%% (presnell 1997/7/16) %%%%%%%%%%%%%%%%%%%%%%%
  \@authorfootnote\@runningtitle\@keywords\@amssubj  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
%%%%%%%% (presnell 1997/7/16) %%%%%%%%%%
  \global\let\authorfootnote\relax     %
  \global\let\keywords\relax           %
  \global\let\runningtitle\relax       %
  \global\let\amssubj\relax            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
%%%%%%%%% (presnell 1997/7/16) %%%%%%%%%
  \global\let\@authorfootnote\@empty   %
  \global\let\@keywords\@empty         %
  \global\let\@runningtitle\@empty     %
  \global\let\@amssubj\@empty          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}
\fi

%\if@titlepage{
%  \renewenvironment{abstract}{%
%      \null\vfil\if@abstractontitlepage\else\titlepage\fi
%      \@beginparpenalty\@lowpenalty
%      \begin{center}%
%        \bfseries \abstractname
%        \@endparpenalty\@M
%      \end{center}}%
%     {\par\vfil\null\if@abstractontitlepage\else\endtitlepage\fi}
%\else
%  \renewenvironment{abstract}{%
%      \if@twocolumn
%        \section*{\abstractname}%
%      \else
%        \small
%        \begin{center}%
%          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
%        \end{center}%
%        \quotation
%      \fi}
%      {\if@twocolumn\else\endquotation\fi}
%\fi

%\if@compatibility
%\renewenvironment{titlepage}
%    {%
%      \if@twocolumn
%        \@restonecoltrue\onecolumn
%      \else
%        \@restonecolfalse\newpage
%      \fi
%      \thispagestyle{empty}%
%      \setcounter{page}\z@
%    }%
%    {\if@restonecol\twocolumn \else \newpage \fi
%    }
%\else
%\renewenvironment{titlepage}
%    {%
%      \if@twocolumn
%        \@restonecoltrue\onecolumn
%      \else
%        \@restonecolfalse\newpage
%      \fi
%      \thispagestyle{empty}%
%      \setcounter{page}\@ne
%    }%
%    {\if@restonecol\twocolumn \else \newpage \fi
%     \if@twoside\else
%        \setcounter{page}\@ne
%     \fi
%    }
%\fi