Debian Codegraph @

texmf-dist/source/latex/titling/titling.dtx

raw
1 % \iffalse meta-comment
2 % titling.dtx
3 % Author: Peter Wilson (Herries Press)
4 % Maintainer: Will Robertson (will dot robertson at latex-project dot org)
5 % Copyright 2000--2004 Peter R. Wilson
6 %
7 % This work may be distributed and/or modified under the
8 % conditions of the LaTeX Project Public License, either
9 % version 1.3c of this license or (at your option) any
10 % later version: <http://www.latex-project.org/lppl.txt>
11 %
12 % This work has the LPPL maintenance status "maintained".
13 % The Current Maintainer of this work is Will Robertson.
14 %
15 % This work consists of the files listed in the README file.
16 %
17 %
18 %<*driver>
19 \documentclass{ltxdoc}
20 \EnableCrossrefs
21 \CodelineIndex
22 %%\OnlyDescription
23 \setcounter{StandardModuleDepth}{1}
24 \begin{document}
25 \DocInput{titling.dtx}
26 \end{document}
27 %</driver>
28 %
29 % \fi
30 %
31 % \CheckSum{490}
32 %
33 % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
34 % \DoNotIndex{\@centercr,\@cite}
35 % \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
36 % \DoNotIndex{\@input,\@ixpt,\@m}
37 % \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint}
38 % \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
39 % \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
40 % \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
41 % \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
42 % \DoNotIndex{\advance,\Alph,\alph}
43 % \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
44 % \DoNotIndex{\bullet}
45 % \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
46 % \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
47 % \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
48 % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
49 % \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
50 % \DoNotIndex{\fbox}
51 % \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
52 % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
53 % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
54 % \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
55 % \DoNotIndex{\input}
56 % \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
57 % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
58 % \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
59 % \DoNotIndex{\NeedsTeXFormat,\newdimen}
60 % \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
61 % \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
62 % \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
63 % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
64 % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
65 % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
66 % \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman}
67 % \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength}
68 % \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
69 % \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
70 % \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
71 % \DoNotIndex{\viipt,\vipt,\vskip,\vspace}
72 % \DoNotIndex{\wd,\xiipt,\year,\z@}
73 %
74 % \changes{v1.0}{2000/06/11}{First public release}
75 % \changes{v2.0}{2001/02/24}{Added controls for thanks marks}
76 % \changes{v2.1}{2001/03/23}{Further controls for thanks note layout}
77 % \changes{v2.1}{2001/03/23}{Added extra hooks into \cs{maketitle}}
78 % \changes{v2.1a}{2002/02/19}{Added quote from Jason}
79 % \changes{v2.1b}{2004/05/10}{Changed license from LPPL v.10 to v1.3}
80 % \changes{v2.1c}{2004/09/26}{Deleted mention of unimplemented command}
81 % \changes{v2.1d}{2009/09/04}{New maintainer (Will Robertson)}
82 %
83 % \def\dtxfile{titling.dtx}
84 % ^^A \def\fileversion{v0.3}
85 % ^^A \def\filedate{2000/05/20}
86 % ^^A \def\fileversion{v1.0}
87 % ^^A \def\filedate{2000/06/11}
88 % ^^A \def\fileversion{v2.0}
89 % ^^A \def\filedate{2001/02/24}
90 % ^^A \def\fileversion{v2.1}
91 % ^^A \def\filedate{2001/03/23}
92 % \def\fileversion{v2.1a}
93 % \def\filedate{2002/02/19}
94 % \def\fileversion{v2.1b}
95 % \def\filedate{2004/05/10}
96 % \def\fileversion{v2.1c}
97 % \def\filedate{2004/09/26}
98 % \def\fileversion{v2.1d}
99 % \def\filedate{2009/09/04}
100 % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
101 % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
102 % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
103 % \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter
104 % \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle
105 % \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment
106 %
107 % \title{The \Lpack{titling} package\thanks{This
108 % file (\texttt{\dtxfile}) has version number \fileversion, last revised
109 % \filedate.}}
110 %
111 % \author{
112 % Author: Peter Wilson, Herries Press\\
113 % Maintainer: Will Robertson\\
114 % \texttt{will dot robertson at latex-project dot org}
115 % }
116 % \date{\filedate}
117 % \maketitle
118 % \begin{abstract}
119 % The \Lpack{titling} package provides control over the typesetting
120 % of the |\maketitle| and |\thanks| commands.
121 % The values of |\title|, |\author| and
122 % |\date| are also retained, and there may be mutiple titles in a document.
123 % New titling elements may be defined for printing by |\maketitle|.
124 % \end{abstract}
125 % \tableofcontents
126 %
127 %
128 %
129 % \section{Introduction}
130 %
131 % The format for typesetting the |\maketitle| command is fixed in the
132 % standard \LaTeX{} classes. The \Lpack{titling} package provides some
133 % controls for modifying the appearance of the titling information presented
134 % via |\maketitle|.
135 %
136 % This manual is typeset according to the conventions of the
137 % \LaTeX{} \textsc{docstrip} utility which enables the automatic
138 % extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}.
139 %
140 % Section~\ref{sec:usc} describes the usage of the \Lpack{titling}
141 % package and
142 % commented source code is in Section~\ref{sec:code}.
143 %
144 % \section{The \Lpack{titling} package} \label{sec:usc}
145 %
146 % The typeset format of the |\maketitle| command is virtually fixed
147 % within the \LaTeX{} standard classes. The \Lpack{titling} package
148 % provides a set of formatting commands that can be used to modify
149 % the appearance of the titling information; that is, the contents of
150 % the |\title|, |\author| and |date| commands. It also keeps the values
151 % of these commands so that they may be printed again later in the
152 % document.
153 %
154 % The package inhibits the normal automatic cancellation of titling
155 % commands after |\maketitle|. This means that you can have multiple
156 % instances of the same, or perhaps different, titles in one document.
157 % Hooks are provided so that additional titling elements can be defined
158 % and printed by |\maketitle|.
159 %
160 % The |\thanks| command is enhanced to provide various configurations
161 % for both the marker symbol and the layout of the thanks notes.
162 %
163 %
164 %
165 % \subsection{Commands and environments}
166 %
167 % \subsubsection{Restyling the titling}
168 %
169 % The \Lpack{titling} package provides a configurable |\maketitle| command.
170 %
171 % \DescribeMacro{\pretitle}
172 % \DescribeMacro{\posttitle}
173 % \DescribeMacro{\preauthor}
174 % \DescribeMacro{\postauthor}
175 % \DescribeMacro{\predate}
176 % \DescribeMacro{\postdate}
177 % These six commands each have a single argument,
178 % like |\pretitle{|\meta{text}|}|and |\posttitle{|\meta{text}|}|.
179 % The argument to these commands control the typesetting of the
180 % standard elements of the document's |\maketitle|
181 % command. The |\title| is effectively processed between the |\pretitle| and
182 % |\posttitle| commands; that is, like: \\
183 % |{\pretitle \title \posttitle}| \\
184 % and similarly for the |\author| and |\date| commands. The
185 % commands are initialised to mimic the normal result of |\maketitle|
186 % typesetting in the \Lpack{article/report} classes.
187 % For example, the default definitions of the |\...title...|
188 % and |\...author...| commands are:
189 % \par\begin{small}\begin{verbatim}
190 % \pretitle{\begin{center}\LARGE}
191 % \posttitle{\par\end{center}\vskip 0.5em}
192 % \preauthor{\begin{center}
193 % \large \lineskip 0.5em%
194 % \begin{tabular}[t]{c}}
195 % \postauthor{\end{tabular}\par\end{center}}
196 % \predate{\begin{center}\large}
197 % \postdate{\par\end{center}}
198 % \end{verbatim}
199 % \end{small}\par
200 % They can be changed to obtain different effects. For example to get
201 % a right justified sans-serif title and a left justifed small caps
202 % date:
203 % \begin{verbatim}
204 % \pretitle{\begin{flushright}\LARGE\sffamily}
205 % \posttitle{\par\end{flushright}\vskip 0.5em}
206 % \predate{\begin{flushleft}\large\scshape}
207 % \postdate{\par\end{flushleft}}
208 % \end{verbatim}
209 % \textbf{NOTE:} The above commands differ from the similar ones in version~1.0
210 % of this package. So, if you have upgraded from v1.0 to v2.0, beware.
211 %
212 % As another example, the following (slightly edited)
213 % was sent to me by Jason Harrison
214 % (\texttt{[email protected]}) on 2002/02/18.
215 % \begin{quotation}
216 % I'm trying to format my latest conference paper for a conference that
217 % doesn't supply a latex class (only a MSWord example, sigh) and I ran
218 % into a problem that I'm not sure if it's an interaction of the titling
219 % package [it's not] or just no one ever cares because hitting return gets you an
220 % output when latex complains:
221 % \begin{verbatim}
222 % ! Argument of \reserved@a has an extra }.
223 % <inserted text>
224 % \par
225 % l.46 \end{tabular}}
226 % ? x
227 % \end{verbatim}
228 % What I did was to define my
229 % authors list using the following methodology:
230 % \begin{verbatim}
231 % \preauthor{}
232 % \DeclareRobustCommand{\authorthing}{
233 % \begin{center}
234 % \begin{tabular}{ccc}
235 % Jason Harrison & Kellogg S. Booth & Brian D. Fisher \\
236 % \multicolumn{3}{c}{Department of Computer Science} \\
237 % \multicolumn{3}{c}{and} \\
238 % \multicolumn{3}{c}{Media and Graphics Interdisciplinary Centre}\\
239 % \multicolumn{3}{c}{University of British Columbia, Vancouver, BC Canada}
240 % \end{tabular}
241 % \end{center}}
242 % \author{\authorthing}
243 % \postauthor{}
244 % \end{verbatim}
245 %
246 % Thus latex does not complain and I get the formatting I want. Perhaps
247 % you'd add this to the titling documentation for those of us who can't
248 % follow the usual conventions because of the strange conventions of a
249 % strange conference.
250 % \end{quotation}
251 %
252 % Changing the above example a little, when authors are from different
253 % organisations you may be required to flag these. This is one way of doing
254 % that.
255 % \begin{verbatim}
256 % \preauthor{\large}
257 % \DeclareRobustCommand{\authoring}{
258 % \begin{center}
259 % Smith\textsuperscript{\dag} and Wesson\textsuperscript{\#} \\
260 % \textsuperscript{\dag}House, \textsuperscript{\#}Barn \\
261 % The OK Corral
262 % \end{center}}
263 % \author{\authoring}
264 % \postauthor{\par}
265 % \end{verbatim}
266 %
267 %
268 % \DescribeMacro{\droptitle}
269 % The |\maketitle| command puts the title at a particular height on the
270 % page. Unless it is used with the \Lopt{titlepage} option of the standard
271 % classes it starts a new page.
272 % You can change the vertical position of the title via the length
273 % |\droptitle|. Giving this a positive value will lower the title and a
274 % negative value will raise it. The default definition is: \\
275 % |\setlength{\droptitle}{0pt}|.
276 %
277 % \DescribeMacro{\maketitlehooka}
278 % \DescribeMacro{\maketitlehookb}
279 % \DescribeMacro{\maketitlehookc}
280 % \DescribeMacro{\maketitlehookd}
281 % The |\maketitle| command as defined by the \Lpack{titling} package
282 % is essentially
283 % \begin{verbatim}
284 % \renewcommand{\maketitle}{%
285 % \vspace*{\droptitle}
286 % \maketitlehooka
287 % {\pretitle \title \posttitle}
288 % \maketitlehookb
289 % {\preauthor \author \postauthor}
290 % \maketitlehookc
291 % {\predate \date \postdate}
292 % \maketitlehookd
293 % }
294 % \end{verbatim}
295 % The four hook commands are provided so that additional elements may
296 % be added to |\maketitle|. These are initially defined to do nothing
297 % but can be renewed. For example, some publications
298 % want a statement about where an article is published immediately
299 % before the actual titling text. The following defines a command
300 % |\published| that can be used to hold the publishing information
301 % which will then be automatically printed by |\maketitle|.
302 % \begin{verbatim}
303 % \newcommand{\published}[1]{%
304 % \gdef\puB{#1}}
305 % \newcommand{\puB}{}
306 % \renewcommand{\maketitlehooka}{%
307 % \par\noindent \puB}
308 % \end{verbatim}
309 % You can then say:
310 % \begin{verbatim}
311 % \published{Originally published in
312 % \textit{The Journal of ...}\thanks{Reprinted with permission}}
313 % ...
314 % \maketitle
315 % \end{verbatim}
316 % to print both the published and the normal titling information. Note
317 % that nothing extra had to be done in order to use the |\thanks| command
318 % in the argument to the new |\published| command.
319 %
320 %
321 %
322 % \DescribeEnv{titlingpage}
323 % When one of the standard classes is used with the \Lopt{titlepage}
324 % option, |\maketitle| puts the title elements on an unnumbered page
325 % and then starts a new page numbered page 1.
326 % The standard classes also provide
327 % a |titlepage| environment which starts a new unnumbered page and at the
328 % end starts a new page numbered 1. You are entirely responsible
329 % for specify exactly what and where is to go on this title page.
330 % Do not use |\maketitle| within the |titlepage| environment as it
331 % will start yet another page.
332 %
333 % The |titlingpage| environment falls between the \Lopt{titlepage}
334 % option and the |titlepage| environment. Within the |titlingpage|
335 % environment you can use the |\maketitle| command, and any others you wish.
336 % The pagestyle is |empty|;
337 % ^^A given by the value of the |\titlingpagestyle| command;
338 % at the end it starts another ordinary page numbered page 1.
339 %
340 % ^^A \DescribeMacro{\titlingpagestyle}
341 % ^^A The macro |\titlingpagestyle{|\meta{pstyle}|}| sets the page style
342 % ^^A in the |titlingpage| environment to be \meta{pstyle}. This is
343 % ^^A initially set as |\titlingpagestyle{empty}|.
344 %
345 % For example, to put both the title and an abstract on a title page
346 % ^^A with a |plain| pagestyle:
347 % \begin{verbatim}
348 % \begin{document}
349 % \begin{titlingpage}
350 % \setlength{\droptitle}{30pt} % lower the title
351 % \maketitle
352 % \begin{abstract}...\end{abstract}
353 % \end{titlingpage}
354 % \end{verbatim}
355 %
356 % By default, titling information is centered with respect to the
357 % width of the text block.
358 % Occasionally someone asks on the \texttt{comp.text.tex} newsgroup how
359 % to center the titling information on a title page
360 % with respect to the width of the physical
361 % page. If the textblock is centered with respect to the physical page,
362 % then the default centering suffices. If the textblock is not physically
363 % centered, then the titling information either has to be shifted
364 % horizontally or |\maketitle| has to be made to think that the textblock
365 % has been shifted horizontally.
366 %
367 % One solution is to use the |titlingpage|
368 % environment and the \Lopt{chngpage} package\footnote{Available
369 % from CTAN as file \texttt{chngpage.sty}.}, which lets
370 % you temporarily adjust the location of the textblock. Remember that
371 % TeX starts its page measurements at a distance of 1 inch + |\hoffset|
372 % (default 0pt)
373 % in from the left side of the
374 % physical sheet; this is the zero point for the |\evensidemargin| and
375 % the |\oddsidemargin|. Let $H$ be the value of (1 inch + |\hoffset|),
376 % $M$ be the |\...sidemargin|, $T$ be the
377 % |\textwidth| and $P$ be the width of the physical page,
378 % and let $X$ be the distance between the righthand edge of the
379 % text block and the right side of the physical sheet. Then
380 % \[ H + M + T + X = P \]
381 % and the textblock is $H+M$ in from the left side of the page. For
382 % the textblock to be centered on the physical page, we must have
383 % \(X = H+M\). If the textblock is not physically centered, then
384 % the margin value, $M$ can be adjusted to made it so. Let $d$ be the
385 % amount to be added to $M$ to center the textblock. Some simple algebra
386 % leads to
387 % \[ d = (P - T)/2 - M - H \]
388 % as the amount to be added to the |\...sidemargin| to center the textblock.
389 % For example,
390 % assume that the |\textwidth| is 5 inches, the |\...sidemargin|s are
391 % both 2 inches, and |\hoffset| is zero (i.e., $H$ is 1 inch).
392 % Then to center the textblock,
393 % 1.25 inches must be
394 % subtracted from the margin if it is printed on US letterpaper,
395 % where the paper width is 8.5 inches. A different adjustment would
396 % be required
397 % if A4 paper was used instead. See the \Lopt{chngpage} documentation for
398 % details, but a physically centred title can now be achieved by
399 % \begin{verbatim}
400 % \usepackage{chngpage}
401 % ...
402 % \begin{titlingpage}
403 % \chngtext{}{}{-1.25in}{-1.25in}{}
404 % \maketitle
405 % \end{titlingpage}
406 % \end{verbatim}
407 %
408 % \DescribeMacro{\calccentering}
409 % If you don't want to do the above calculations by hand,
410 % |\calccentering{|\meta{length}|}{|\meta{margin}|}| will do it for you.
411 % The \meta{length}
412 % argument must be the name of a pre-existing length command,
413 % including the backslash, and the \meta{margin} is the value of the
414 % appropriate |\evensidemargin| or |\oddsidemargin|. After calling
415 % |\calccentering|, \meta{length} is the amount to be added to the
416 % margin to center the textblock.
417 % An example usage is
418 % \begin{verbatim}
419 % \begin{titlingpage}
420 % \newlength{\addtoeven}
421 % \newlength{\addtoodd}
422 % \calccentering{\addtoeven}{\evensidemargin}
423 % \calccentering{\addtoodd}{\oddsidemargin}
424 % \chngtext{}{}{\addtoeven}{\addtoodd}{}
425 % ....
426 % \end{titlingpage}
427 % \end{verbatim}
428 % The |\calccentering| macro requires the length |\paperwidth| to be
429 % set to the physical width of the paper you will be printing on.
430 % If your paper matches the paper size option in for the document class
431 % then this is done for you.
432 %
433 % You do not necessarily have to define a new length for the purposes
434 % of |\calccentering|. Any existing length will do, such as
435 % |\unitlength|, provided it will be otherwise unused between performing
436 % the calculation and changing the margins (and that you can, if necessary
437 % reset it to its original value --- the default value for |\unitlength|
438 % is 1pt). There are also some lengths provided by the package that you
439 % may consider using, such as |\droptitle|, |\thanksmarkwidth| or
440 % |\thanksmargin|.
441 %
442 %
443 %
444 % \DescribeMacro{\thetitle}
445 % \DescribeMacro{\theauthor}
446 % \DescribeMacro{\thedate}
447 % In the usual document classes, the |\title|, |\author| and |\date|
448 % macros used for |\maketitle| are unavailable once |\maketitle| has been
449 % issued. The package provides the |\thetitle|,
450 % |\theauthor| and |\thedate| commands that can be used for printing
451 % these elements of the title later in the document,
452 % if desired.
453 %
454 % The \Lpack{titling} package prevents the standard classes' habit
455 % of automatically killing the titling
456 % commands after |\maketitle| has been issued. You can have multiple
457 % |\title|, |\author|, |\date| and |\maketitle| commands in your
458 % document if you wish. For example, some reports are issued with
459 % a title page, followed by an executive summary, and then they
460 % have another, possibly modified, title at the start of
461 % the main body of the report. This can be accomplished like this:
462 % \begin{verbatim}
463 % \title{Cover title}
464 % ...
465 % \begin{titlingpage}
466 % \maketitle
467 % \end{titlingpage}
468 % ...
469 % \title{Body title}
470 % \maketitle
471 % ...
472 % \end{verbatim}
473 %
474 % \DescribeMacro{\killtitle}
475 % \DescribeMacro{\keepthetitle}
476 % \DescribeMacro{\emptythanks}
477 % The |\killtitle| macro makes all aspects of titling, including
478 % |\thetitle| etc,
479 % unavailable from the point that it is issued (using this command will save
480 % some macro space if the |\thetitle|, etc., commands are not required).
481 % Using this command is the \Lpack{titling} package's manual version
482 % of the automatic killing performed by the standard classes.
483 % The |\keepthetitle| command performs a similar function, except that
484 % it keeps the |\thetitle|, |\theauthor| and |\thedate| commands, while
485 % killing everything else.
486 % The |\emptythanks| command discards any text from prior use of |\thanks|.
487 % This command is useful when |\maketitle| is used multiple times ---
488 % the |\thanks| commands in each use just stack up the texts for output
489 % at each use, so each subsequent use of |\maketitle| will output all
490 % previous |\thanks| texts together with any new ones. To avoid this,
491 % put |\emptythanks| before each |\maketitle| after the first.
492 %
493 %
494 %
495 % \subsubsection{Restyling the thanks}
496 %
497 % The \Lpack{titling} package provides a configurable |\thanks| command.
498 % As a side effect of modifications to the |\thanks| command, the thanks
499 % text can be one or more paragraphs, unlike the standard |\thanks|
500 % text which is restricted to a single paragraph.
501 %
502 % \DescribeMacro{\thanksmarkseries}
503 % \DescribeMacro{\symbolthanksmark}
504 % In the standard classes, |\thanks{}| are marked with symbols in the
505 % titling and footnotes unless on a titlepage where they are marked with
506 % numbers. The command |\thanksmarkseries{|\meta{format}|}| command
507 % can be used to change the marking style. The \meta{format} argument
508 % is the name of one of the formats for printing a counter. The name
509 % is the same as that of a counter format but without the backslash.
510 % The default matches the standard class defaults. To have the
511 % titlepage marks as symbols instead of numerals do:\\
512 % |\thanksmarkseries{fnsymbol}| \\
513 % or to use lowercase letters do: \\
514 % |\thanksmarkseries{alph}| \\
515 % Just for convenience the |\symbolthanksmark| command sets the series
516 % to be footnote symbols (so you don't have to use the first example above).
517 % Using the standard classes the potential names for \meta{format} are:
518 % |arabic|, |roman|, |Roman|, |alph|, |Alph|, and |fnsymbol|. Other classes
519 % or packages may provide more or fewer names.
520 %
521 % \DescribeMacro{\continuousmarks}
522 % The |\thanks| command uses the footnote counter, and normally the counter
523 % is zeroed after the titling so that the footnote marks start from 1.
524 % If the counter should not be zeroed, then just specify |\continuousmarks|.
525 % This might be required if numerals are used as the thanks markers.
526 %
527 % \DescribeMacro{\thanksheadextra}
528 % \DescribeMacro{\thanksfootextra}
529 % The |\thanksheadextra{|\meta{pre}|}{|\meta{post}|}| command will insert
530 % \meta{pre} and \meta{post} before and after the thanks markers in the
531 % titling block.
532 %
533 % Similarly |\thanksfootextra{|\meta{pre}|}{|\meta{post}|}|
534 % inserts \meta{pre} and \meta{post} before and after the thanks markers
535 % in the footnotes.
536 %
537 % By default \meta{pre} and \meta{post} are empty in
538 % both cases. For example, to put parentheses round the titling markers
539 % and to have a full stop (a period) after the footnote markers do: \\
540 % |\thanksheadextra{(}{)}| and \\
541 % |\thanksfootextra{}{.}|
542 %
543 % \DescribeMacro{\thanksmark}
544 % It is sometimes desireable to have the same thanks text be applied to,
545 % say, four out of six authors, these being the first 3 and the last one.
546 % The command |\thanksmark{|\meta{n}|}| is similar to
547 % |\footnotemark[|\meta{n}|]| in that it prints a thanks mark identical
548 % to that of the \meta{n}'th |\thanks| command. No changes are made
549 % to any thanks in the footnotes.
550 %
551 % \DescribeMacro{\thanksgap}
552 % The marks in the titling block printed by the |\thanks| and |\thanksmark|
553 % commands take zero space. This is acceptable if they come at the end of
554 % a line, but not in the middle of a line. Use the
555 % |\thanksgap{|\meta{length}|}| command immediately after a mid-line
556 % |\thanks| or |\thanksmark| command to add \meta{length} amount of
557 % space before the next word. For example, if there are three authors
558 % from two different institutions: \\
559 % |\author{Alpha\thanks{ABC},| \\
560 % | Omega\thanks{XYZ}\thanksgap{1ex} and | \\
561 % | Beta\thanksmark{1}} |
562 %
563 % \DescribeMacro{\thanksmarkwidth}
564 % The thanks mark in the footnote is typeset right justified in a box
565 % of width |\thanksmarkwidth|. The first line of the thanks text starts
566 % after this box. The initialisation is |\setlength{\thanksmarkwidth}{1.8em}|
567 % giving the default position.
568 %
569 % \DescribeMacro{\thanksmargin}
570 % The value of the length |\thanksmargin| controls the indentation the
571 % second and subsequent lines of the thanks text, with respect to
572 % the end of the mark box. As examples: \\
573 % |\setlength{\thanksmargin}{0em}| will align the left hand ends of
574 % of a multiline thanks text, while: \\
575 % |\setlength{\thanksmargin}{-\thanksmarkwidth}| will left justify
576 % any second and subsequent lines of the thanks text. This last
577 % setting is the initialised value, giving the default appearance.
578 %
579 % \DescribeMacro{\thanksfootmark}
580 % A thanks mark in the footnote region is typeset by |\thanksfootmark|.
581 % The code for this is roughly:
582 % \begin{verbatim}
583 % \newcommand{\thanksfootmark}{%
584 % \hbox to\thanksmarkwidth{\hfil\normalfont%
585 % \thanksscript{\thanksfootpre \thefootnote \thanksfootpost}}}
586 % \end{verbatim}
587 % where |\thanksfootpre| and |\thanksfootpost| are specified via the
588 % |\thanksfootextra| macro. You should not need to change the definition
589 % of |\thanksfootmark|
590 % but you may want to change the default definitions of one or more
591 % of the macros it uses.
592 %
593 % \DescribeMacro{\thanksscript}
594 % Note that the thanks mark, together with the |\...pre| and |\...post|
595 % commands form the argument to the |\thanksscript| command. This
596 % is initially defined as: \\
597 % |\newcommand{\thanksscript}[1]{\textsuperscript{#1}}| \\
598 % so that |\thanksscript| typesets its argument as a superscript, which
599 % is the default for thanks notes. If you would prefer the mark to be
600 % set at the baseline instead, for example, just do: \\
601 % |\renewcommand{\thanksscript}[1]{#1}|, and if you also wanted very
602 % small symbols on the baseline you could do: \\
603 % |\renewcommand{\thanksscript}[1]{\tiny #1}|. Alternatively \\
604 % |\renewcommand{\thanksscript}[1]{#1}| \\
605 % |\thanksfootextra{\bfseries}{.}| \\
606 % will give a bold baseline mark followed by a dot.
607 %
608 % Using combinations of |\thanksscript|, |\thanksmargin|,
609 % |\thanksmarkwidth| and |\thanksfootextra| you can easily define
610 % different layouts for the thanks footnotes. Here are some
611 % sample combinations, but to shorten them I have ignored any
612 % |\renewcommand|s and |\setlength|s, leaving these to be implied
613 % as necessary.
614 % \begin{itemize}
615 % \item Setting |\thanksfootextra{}{\hfill}| left justifies the mark
616 % in its box:
617 % \begin{itemize}
618 % \item |\thanksscript{\llap{#1\space}}|, |\thanksmarkwidth{0em}| and \\
619 % |\thanksmargin{0em}| puts the baseline mark in the margin
620 % and the text left justified.
621 % \item Using |\thanksscript{#1}|, |\thanksmarkwidth{1em}| and \\
622 % |\thanksmargin{-\thanksmarkwidth}| makes the baseline mark
623 % and text left adjusted.
624 % \item |\thanksscript{#1}|, |\thanksmarkwidth{1em}| and
625 % |\thanksmargin{0em}| puts the baseline mark left adjusted
626 % and the text indented and aligned, like this marked
627 % sentence is typeset.
628 % \end{itemize}
629 %
630 % \item Setting |\thanksfootextra{ }| and |\thanksscript{#1}|
631 % right justifies the baseline mark and a space in the mark box:
632 % \begin{itemize}
633 % \item The normal style is
634 % defined by |\thanksmarkwidth{1.8em}| and \\
635 % |\thanksmargin{-\thanksmarkwidth}| which put the mark
636 % indented and the text left adjusted, like a normal indented
637 % paragraph.
638 % \item |\thanksmarkwidth{1.8em}| and
639 % |\thanksmargin{0em}| put the mark indented
640 % and the text indented and aligned.
641 % \end{itemize}
642 %
643 % \end{itemize}
644 %
645 % \DescribeMacro{\makethanksmark}
646 % \DescribeMacro{\makethanksmarkhook}
647 % The macro |\makethanksmark| typesets both the thanks marker (via
648 % |\thanksfootmark|) and the thanks text. You probably will not need
649 % to change its default definition. Just in case, though, |\makethanksmark|
650 % calls the macro |\makethanksmarkhook| before it does any typesetting.
651 % The default definition of this is: \\
652 % |\newcommand{\makethanksmarkhook}{}|, which does nothing.
653 %
654 % You can redefine |\makethanksmarkhook| to do something useful. For
655 % example, if you wanted a slightly bigger baseline skip you could do: \\
656 % |\renewcommand{\makethanksmarkhook}{\fontsize{8}{11}\selectfont}| \\
657 % where the numbers |8| and |11| specify the point size of the font
658 % and the baseline skip
659 % respectively. In this example 8pt is the normal |\footnotesize| in
660 % a 10pt document, and 11pt is the baselineskip for |\footnotesize|
661 % text in an 11pt document (the baseline skip is 9.5pt in a 10pt document);
662 % adjust these numbers to suit.
663 %
664 % \DescribeMacro{\thanksrule}
665 % \DescribeMacro{\usethanksrule}
666 % \DescribeMacro{\cancelthanksrule}
667 % By default, there is no rule above |\thanks|
668 % text that appears in a |titlingpage| environment.
669 % If you want a rule in that environment, put |\usethanksrule|
670 % before the |\maketitle| command, which will then print a rule according
671 % to the current definition of |\thanksrule|.
672 % |\thanksrule| is initialised to be a copy of |\footnoterule| as it
673 % is defined at the
674 % end of the preamble. The definition of |\thanksrule| can be changed
675 % after |\begin{document}|. If the definition of |\thanksrule| is modified
676 % and a |\usethanksrule| command has been issued, then the redefined
677 % rule may also be used for footnotes. Issuing the command
678 % |\cancelthanksrule| will cause the normal |\footnoterule| definition
679 % to be used from thereon; another |\usethanksrule|
680 % command can be issued later
681 % if you want to swap back again.
682 %
683 % The parameters for the vertical positioning of footnotes and thanks notes,
684 % and the default |\footnoterule| are described below. You may need to
685 % change one or more of these if the vertical spacings of footnotes
686 % and thanks notes are meant to be different.
687 %
688 % \DescribeMacro{\footnotesep}
689 % \DescribeMacro{\skip\footins}
690 % The length |\footnotesep| controls the vertical spacing between footnotes
691 % (and thanks notes),
692 % and is initialised by the class to give no extra spacing for a
693 % |\footnotesize| font. You can change the spacing by \\
694 % |\addtolength{\footnotesep}{...}| \\
695 % The length |\skip\footins| defines the vertical spacing between the
696 % bottom of the main text and the top of the first line of the first
697 % footnote. Likewise this can be changed by \\
698 % |\addtolength{\skip\footins}{...}| \\
699 % The total vertical distance between the bottom of the main text and
700 % the baseline of the first line of the first footnote is
701 % |\footnotesep + \skip\footins|.
702 %
703 %
704 % \DescribeMacro{\footnoterule}
705 % The |\footnoterule| command is defined in the LaTeX kernel and
706 % redefined in the standard classes. An `@less' definition, which is slightly
707 % less efficient than that in the classes, is:
708 % \begin{verbatim}
709 % \renewcommand{\footnoterule}{%
710 % \kern -3pt % call this kerna
711 % \hrule height 0.4pt width 0.4\columnwidth
712 % \kern 2.6pt % call this kernb
713 % }
714 % \end{verbatim}
715 % This produces a horizontal rule from the left margin to 40\% of the
716 % |\columnwidth| with thickness 0.4pt. The rule must not take up any
717 % vertical space, which means that |kerna + kernb| must equal the thickness
718 % of the rule. The rule is located a distance |\skip\footins + kerna|
719 % below the bottom of the main text. So, to move the rule upwards, decrease
720 % the value of |kerna| and increase that of |kernb|, and the reverse to
721 % move the rule downwards.
722 %
723 %
724 %
725 % \DescribeMacro{\appendiargdef}
726 % This is only noted here as someone may find it useful
727 % in another context. Get the \Lpack{patchcmd}
728 % package~\cite{PATCHCMD} if you need
729 % to make other additions to definitions.
730 % The internal command |\appendiargdef{|\meta{macro}|}{|\meta{stuff}|}|
731 % appends \meta{stuff} at the end of the current definition of \meta{macro},
732 % where \meta{macro} is the name of a macro (including the backslash) which
733 % takes a single argument. For example the following are two equivalent
734 % definitions of |\mymacro|:
735 % \par\begin{small}\begin{verbatim}
736 % \newcommand{\mymacro}[1]{#1 is a violinist}
737 % \appendiargdef{\mymacro}{ in spite of being tone deaf}
738 % % or
739 % \newcommand{\mymacro}[1]{# is a violinist in spite of being tone deaf}
740 % \end{verbatim}
741 % \end{small}\par
742 %
743 % The usual advice about creating a one-column |abstract| in a two-column
744 % document is to write code like this:
745 % \par\begin{small}\begin{verbatim}
746 % \documentclass[twocolumn...]{...}
747 % ...
748 % \twocolumn[
749 % \begin{@twocolumnfalse}
750 % \maketitle % need full-width title
751 % \begin{abstract}
752 % abstract text...
753 % \end{abstract}
754 % \end{@twocolumnfalse}
755 % ]
756 % ... hand make footnotes for any \thanks commands
757 % ...
758 % \end{verbatim}
759 % \end{small}\par
760 % The \Lpack{titling} package gives no assistance for doing this, but the
761 % \Lpack{abstract} package~\cite{ABSTRACT} provides a command that caters for the somewhat
762 % non-intuitive
763 % \texttt{... hand make footnotes ...} aspect.
764 %
765 %
766 % \StopEventually{
767 % \bibliographystyle{alpha}
768 % \begin{thebibliography}{GMS94}
769 %
770 % \bibitem[Dow00]{PATCHCMD}
771 % Michael J.~Downes.
772 % \newblock \emph{{The patchcmd package}}.
773 % \newblock July, 2000.
774 % \newblock (Available from CTAN in subdirectory \texttt{/patchcmd})
775 %
776 % \bibitem[GMS94]{GOOSSENS94}
777 % Michel Goossens, Frank Mittelbach, and Alexander Samarin.
778 % \newblock \emph{{The LaTeX Companion}}.
779 % \newblock Addison-Wesley Publishing Company, 1994.
780 %
781 % \bibitem[Wil01]{ABSTRACT}
782 % Peter Wilson.
783 % \newblock \emph{{The abstract package}}.
784 % \newblock February, 2001.
785 % \newblock (Available from CTAN in subdirectory \texttt{/abstract})
786 %
787 % \end{thebibliography}
788 % }
789 %
790 %
791 %
792 % \section{The package code} \label{sec:code}
793 %
794 % To try and avoid name clashes, all the internal commands include
795 % the string |@bs| (this code was initially part of the \Lpack{abstract}
796 % package).
797 %
798 % \subsection{Preliminaries}
799 %
800 % Announce the name and version of the package, which requires
801 % \LaTeXe.
802 % \begin{macrocode}
803 %<*usc>
804 \NeedsTeXFormat{LaTeX2e}
805 \ProvidesPackage{titling}[2009/09/04 v2.1d maketitle typesetting]
806
807 % \end{macrocode}
808 %
809 % The original code for
810 % |\maketitle| is shown in Section~\ref{sec:app}.
811 % Changes to |\maketitle| and friends are defined here.
812 %
813 % \begin{macro}{\pretitle}
814 % \begin{macro}{\@bspretitle}
815 % \begin{macro}{\posttitle}
816 % \begin{macro}{\@bsposttitle}
817 % \begin{macro}{\preauthor}
818 % \begin{macro}{\@bspreauthor}
819 % \begin{macro}{\postauthor}
820 % \begin{macro}{\@bspostauthor}
821 % \begin{macro}{\predate}
822 % \begin{macro}{\@bspredate}
823 % \begin{macro}{\postdate}
824 % \begin{macro}{\@bspostdate}
825 % To provide some flexibilty in the titling style of the document,
826 % user level commands are provided that can be changed to reconfigure
827 % the appearance resulting from |\maketitle|.
828 % \changes{v2.0}{2001/02/24}{Revised and replaced the title configuration commands}
829 % \begin{macrocode}
830 \newcommand{\pretitle}[1]{\def\@bspretitle{#1}}
831 \newcommand{\posttitle}[1]{\def\@bsposttitle{#1}}
832 \newcommand{\preauthor}[1]{\def\@bspreauthor{#1}}
833 \newcommand{\postauthor}[1]{\def\@bspostauthor{#1}}
834 \newcommand{\predate}[1]{\def\@bspredate{#1}}
835 \newcommand{\postdate}[1]{\def\@bspostdate{#1}}
836
837 % \end{macrocode}
838 % \end{macro}
839 % \end{macro}
840 % \end{macro}
841 % \end{macro}
842 % \end{macro}
843 % \end{macro}
844 % \end{macro}
845 % \end{macro}
846 % \end{macro}
847 % \end{macro}
848 % \end{macro}
849 % \end{macro}
850 %
851 % These are defined initially
852 % to mimic the normal \LaTeX{} style.
853 % \begin{macrocode}
854 \if@titlepage
855 \pretitle{\begin{center}\LARGE}
856 \posttitle{\par\end{center}\vskip 2em}
857 \preauthor{\begin{center}
858 \large \lineskip .75em%
859 \begin{tabular}[t]{c}}
860 \postauthor{\end{tabular}\par\end{center}}
861 \predate{\begin{center}\large}
862 \postdate{\par\end{center}}
863 \else
864 \pretitle{\begin{center}\LARGE}
865 \posttitle{\par\end{center}\vskip 0.5em}
866 \preauthor{\begin{center}
867 \large \lineskip .5em%
868 \begin{tabular}[t]{c}}
869 \postauthor{\end{tabular}\par\end{center}}
870 \predate{\begin{center}\large}
871 \postdate{\par\end{center}}
872 \fi
873
874 % \end{macrocode}
875 %
876 % \begin{macro}{\maketitlehooka}
877 % \begin{macro}{\maketitlehookb}
878 % \begin{macro}{\maketitlehookc}
879 % \begin{macro}{\maketitlehookd}
880 % The four hooks which will be called by |\maketitle|. These are initially
881 % vacuous.
882 % \changes{v2.1}{2001/03/23}{Added the four \cs{maketitlehook} commands}
883 % \begin{macrocode}
884 \newcommand{\maketitlehooka}{}
885 \newcommand{\maketitlehookb}{}
886 \newcommand{\maketitlehookc}{}
887 \newcommand{\maketitlehookd}{}
888
889 % \end{macrocode}
890 % \end{macro}
891 % \end{macro}
892 % \end{macro}
893 % \end{macro}
894 %
895 %
896 % \begin{macro}{\thanksmarkseries}
897 % \begin{macro}{\@bsmarkseries}
898 % \begin{macro}{\symbolthanksmark}
899 % These are for specifying the kind of series for thanks markers.
900 % \changes{v2.0}{2001/02/24}{Added all the controls for the \cs{thanks} command.}
901 % \begin{macrocode}
902 \newcommand{\thanksmarkseries}[1]{%
903 \def\@bsmarkseries{\renewcommand{\thefootnote}{\@nameuse{#1}{footnote}}}}
904 \newcommand{\symbolthanksmark}{\thanksmarkseries{\fnsymbol}}
905 % \end{macrocode}
906 % \end{macro}
907 % \end{macro}
908 % \end{macro}
909 %
910 % \begin{macro}{\continuousmarks}
911 % \begin{macro}{\@bscontmark}
912 % These are for (non) zeroing of the footnote counter.
913 % \begin{macrocode}
914 \newcommand{\@bscontmark}{\setcounter{footnote}{0}}
915 \newcommand{\continuousmarks}{\def\@bscontmark{}}
916 % \end{macrocode}
917 % \end{macro}
918 % \end{macro}
919 %
920 % \begin{macro}{\thanksheadextra}
921 % \begin{macro}{\@bsthanksheadpre}
922 % \begin{macro}{\@bsthanksheadpost}
923 % These are for inserting stuff before and after a mark in the titling.
924 % \begin{macrocode}
925 \newcommand{\thanksheadextra}[2]{%
926 \def\@bsthanksheadpre{#1}%
927 \def\@bsthanksheadpost{#2}}
928 % \end{macrocode}
929 % \end{macro}
930 % \end{macro}
931 % \end{macro}
932 %
933 % \begin{macro}{\thanksfootextra}
934 % \begin{macro}{\thanksfootpre}
935 % \begin{macro}{\thanksfootpost}
936 % These are for inserting stuff before and after a thanks mark in the
937 % footnoting.
938 % \begin{macrocode}
939 \newcommand{\thanksfootextra}[2]{%
940 \def\thanksfootpre{#1}%
941 \def\thanksfootpost{#2}}
942
943 % \end{macrocode}
944 % \end{macro}
945 % \end{macro}
946 % \end{macro}
947 %
948 % \begin{macro}{\thanksmark}
949 % This adds a thanks mark. The |\footnotemark| could have been used directly
950 % but it is fragile in a moving argument.
951 % \begin{macrocode}
952 \DeclareRobustCommand{\thanksmark}[1]{\footnotemark[#1]}
953 % \end{macrocode}
954 % \end{macro}
955 %
956 % \begin{macro}{\thanksgap}
957 % This specifies some horizontal space.
958 % \begin{macrocode}
959 \newcommand{\thanksgap}[1]{\hspace{#1}}
960 % \end{macrocode}
961 % \end{macro}
962 %
963 % \begin{macro}{\tamark}
964 % This stores the current definition of |\@thefnmark|. For some reason
965 % using |\@thefnmark| directly only gave the last value.
966 % \begin{macrocode}
967 \newcommand{\tamark}{\@thefnmark}
968
969 % \end{macrocode}
970 % \end{macro}
971 %
972 % \begin{macro}{\thanksmarkwidth}
973 % A length determining the size of the box for typesetting
974 % a thanks marker.
975 % \begin{macrocode}
976 \newlength{\thanksmarkwidth}
977 % \end{macrocode}
978 % \end{macro}
979 %
980 % \begin{macro}{\thanksmargin}
981 % A length determining the inset of thanks footnotes.
982 % \begin{macrocode}
983 \newlength{\thanksmargin}
984 % \end{macrocode}
985 % \end{macro}
986 %
987 % \begin{macro}{\thanksscript}
988 % A wrapper round the actual mark stuff to be typeset. This is
989 % initialised to give a superscript mark.
990 % \begin{macrocode}
991 \newcommand{\thanksscript}[1]{\textsuperscript{#1}}
992 % \end{macrocode}
993 % \end{macro}
994 %
995 % \begin{macro}{\makethanksmarkhook}
996 % A vacuous macro used as a hook into |\makethanksmark|.
997 % \begin{macrocode}
998 \newcommand{\makethanksmarkhook}{}
999 % \end{macrocode}
1000 % \end{macro}
1001 %
1002 % \begin{macro}{\thanksfootmark}
1003 % This typesets the thanks footnote mark.
1004 % \changes{v2.1}{2001/03/23}{Changed \cs{thanksfootmark} definition}
1005 % \begin{macrocode}
1006
1007 \newcommand{\thanksfootmark}{%
1008 \hb@xt@\thanksmarkwidth{\hfil\normalfont\thanksscript{%
1009 \thanksfootpre \tamark \thanksfootpost}}}
1010
1011 % \end{macrocode}
1012 % \end{macro}
1013 %
1014 % \begin{macro}{\makethanksmark}
1015 % This sets the general indentations for the thanks footnote,
1016 % and typesets the mark. The code is a simplified version of that
1017 % for typeseeting ToC entries.
1018 % \changes{v2.1}{2001/03/23}{Changed definition of \cs{makethanksmark}}
1019 % \begin{macrocode}
1020 \newcommand{\makethanksmark}{%
1021 \leavevmode%
1022 \makethanksmarkhook\relax
1023 \parindent 1em\noindent
1024 \leftskip\thanksmargin\relax
1025 \advance\leftskip \thanksmarkwidth \null\nobreak\hskip -\leftskip
1026 \thanksfootmark
1027 }
1028
1029 % \end{macrocode}
1030 % \end{macro}
1031 %
1032 % \begin{macro}{\usethanksrule}
1033 % \begin{macro}{\cancelhanksrule}
1034 % Simple macros that let |\footnoterule| to another rule definition.
1035 % \begin{macrocode}
1036 \newcommand{\usethanksrule}{\let\footnoterule\thanksrule}
1037 \newcommand{\cancelthanksrule}{\let\footnoterule\@bsfootnoterule}
1038
1039 % \end{macrocode}
1040 % \end{macro}
1041 % \end{macro}
1042 %
1043 %
1044 % Now set up the thanks defaults.
1045 % \begin{macrocode}
1046 \if@titlepage
1047 \thanksmarkseries{arabic} % normal footnote numbers
1048 \else
1049 \thanksmarkseries{fnsymbol}
1050 \fi
1051 \thanksheadextra{}{}
1052 \thanksfootextra{}{}
1053 \setlength{\thanksmarkwidth}{1.8em}
1054 \setlength{\thanksmargin}{-\thanksmarkwidth}
1055
1056 % \end{macrocode}
1057 % \begin{macro}{\thanksrule}
1058 % \begin{macro}{\@bsfootnoterule}
1059 % These are saved versions of the |\footnoterule| definition as it
1060 % is at the end of the preamble.
1061 % \begin{macrocode}
1062 \AtBeginDocument{%
1063 \let\thanksrule\footnoterule
1064 \let\@bsfootnoterule\footnoterule
1065 }
1066
1067 % \end{macrocode}
1068 % \end{macro}
1069 % \end{macro}
1070 %
1071 % \begin{macro}{\droptitle}
1072 % A titling block has |\droptitle| amount of additional vertical space
1073 % above it (normally zero).
1074 % \begin{macrocode}
1075 \newlength{\droptitle}
1076 \setlength{\droptitle}{0pt}
1077
1078 % \end{macrocode}
1079 % \end{macro}
1080 %
1081 % \begin{macro}{\maketitle}
1082 % The following is a
1083 % modification of |\maketitle| as in the \Lpack{article}, \Lpack{report},
1084 % and \Lpack{book} classes
1085 % (see Section~\ref{sec:app} for the original definition).
1086 % \changes{v1.2}{2001/03/23}{Added the four \cs{maketitlehook} commands
1087 % to \cs{maketitle}}
1088 % \begin{macrocode}
1089 \providecommand{\maketitle}{}
1090 \if@titlepage
1091 \renewcommand{\maketitle}{\begin{titlepage}%
1092 \let\footnotesize\small
1093 \let\footnoterule\relax
1094 \let \footnote \thanks
1095 \@bsmarkseries
1096 \def\@makefnmark{\rlap{\@textsuperscript{%
1097 \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
1098 \long\def\@makefntext##1{\makethanksmark ##1}
1099 \null\vfil
1100 \vskip 60\p@
1101 \vspace*{\droptitle}
1102 \maketitlehooka
1103 {\@bspretitle \@title \@bsposttitle}
1104 \maketitlehookb
1105 {\@bspreauthor \@author \@bspostauthor}
1106 \maketitlehookc
1107 {\@bspredate \@date \@bspostdate}
1108 \maketitlehookd
1109 \par
1110 \@thanks
1111 \vfil\null
1112 \end{titlepage}%
1113 \@bscontmark % \setcounter{footnote}{0}%
1114 %%% \@bsmtitlempty
1115 } % end titlepage defs
1116 \else
1117 \renewcommand{\maketitle}{\par
1118 \begingroup
1119 \@bsmarkseries
1120 \def\@makefnmark{\rlap{\@textsuperscript{%
1121 \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
1122 \long\def\@makefntext##1{\makethanksmark ##1}
1123 \if@twocolumn
1124 \ifnum \col@number=\@ne
1125 \@maketitle
1126 \else
1127 \twocolumn[\@maketitle]%
1128 \fi
1129 \else
1130 \newpage
1131 \global\@topnum\z@
1132 \@maketitle
1133 \fi
1134 \thispagestyle{plain}\@thanks
1135 \endgroup
1136 \@bscontmark % \setcounter{footnote}{0}%
1137 %%% \@bsmtitlempty
1138 } % end non-titlepage
1139 % \end{macrocode}
1140 % \begin{macro}{\@maketitle}
1141 % I use |\def\@maketitle| to account for the cases where the main class
1142 % does not have titling commands, and to ensure an existing |\@maketitle|
1143 % gets overridden.
1144 % \changes{v1.2}{2001/03/23}{Added the four \cs{maketitlehook} commands
1145 % to \cs{@maketitle}}
1146 % \begin{macrocode}
1147
1148 \def\@maketitle{%
1149 \newpage
1150 \null
1151 \vskip 2em%
1152 \vspace*{\droptitle}
1153 \maketitlehooka
1154 {\@bspretitle \@title \@bsposttitle}
1155 \maketitlehookb
1156 {\@bspreauthor \@author \@bspostauthor}
1157 \maketitlehookc
1158 {\@bspredate \@date \@bspostdate}
1159 \maketitlehookd
1160 \par
1161 \vskip 1.5em}
1162 \fi
1163
1164 % \end{macrocode}
1165 % \end{macro}
1166 % \end{macro}
1167 %
1168 % \begin{environment}{titlingpage}
1169 % The |titlingpage| environment sets the pagestyle to be empty,
1170 % disables the footnote rule and ensures that the page is single
1171 % column. At the end it switches back to twocolumn if neccessary,
1172 % and then starts a new page as number 1.
1173 % \begin{macrocode}
1174 \newenvironment{titlingpage}%
1175 {%
1176 \let\footnoterule\relax
1177 \let\footnotesize\small
1178 \if@twocolumn
1179 \@restonecoltrue\onecolumn
1180 \else
1181 \@restonecolfalse
1182 \fi
1183 \thispagestyle{empty}
1184 \setcounter{page}\@ne
1185 }{%
1186 \thispagestyle{empty}
1187 \if@restonecol\twocolumn \else \newpage \fi
1188 \if@twoside\else \setcounter{page}\@ne\fi}
1189
1190 % \end{macrocode}
1191 % \end{environment}
1192 %
1193 % \begin{macro}{\calccentering}
1194 % This macro calculates the amount to be added to a |...sidemargin|
1195 % in order to center the textblock. Call as \\
1196 % |\calccentering{\length}{...sidemargin}| and it sets |\length|
1197 % to the required value.
1198 % \changes{v2.1}{2001/03/23}{Added \cs{calccentering} command}
1199 % \begin{macrocode}
1200 \newcommand{\calccentering}[2]{
1201 #1 = \paperwidth
1202 \advance #1 by -\textwidth
1203 \divide #1 by \tw@
1204 \advance #1 by -#2
1205 \advance #1 by -\hoffset
1206 \advance #1 by -1in
1207 }
1208
1209 % \end{macrocode}
1210 % \end{macro}
1211 %
1212 % \begin{macro}{\emptythanks}
1213 % This macro discards all prior |\thanks| texts.
1214 % \changes{v2.1}{2001/03/23}{Added \cs{emptythanks} command}
1215 % \begin{macrocode}
1216 \newcommand{\emptythanks}{\global\let\@thanks\@empty}
1217
1218 % \end{macrocode}
1219 % \end{macro}
1220 %
1221 %
1222 % \begin{macro}{\@bsmtitlempty}
1223 % |\@bsmtitlempty| is a helper macro to save some macro space.
1224 % It empties some elements of |\maketitle|.
1225 % \begin{macrocode}
1226 \newcommand{\@bsmtitlempty}{%
1227 \global\let\maketitle\relax
1228 \global\let\@maketitle\relax
1229 \global\let\title\relax
1230 \global\let\author\relax
1231 \global\let\date\relax
1232 \global\let\thanksmarkseries\relax
1233 \global\let\thanksheadextra\relax
1234 \global\let\thanksfootextra\relax
1235 \global\let\thanksmark\relax
1236 \global\let\thanksgap\relax
1237 }
1238
1239 % \end{macrocode}
1240 % \end{macro}
1241 %
1242 % \begin{macro}{\keepthetitle}
1243 % This macro undefines all the titling commands except for
1244 % |\thetitle|, |\theauthor| and |\thedate|.
1245 % \changes{v2.1}{2001/03/23}{Added \cs{keepthetitle} command}
1246 % \changes{v2.1}{2001/03/23}{Moved \cs{@bsmtitlempty} from \cs{maketitle}
1247 % to \cs{keepthetitle}}
1248 % \begin{macrocode}
1249 \newcommand{\keepthetitle}{%
1250 \@bsmtitlempty
1251 \global\let\thanks\relax
1252 \global\let\and\relax
1253 \global\let\@thanks\@empty
1254 \global\let\@title\@empty
1255 \global\let\@author\@empty
1256 \global\let\@date\@empty
1257 }
1258
1259 % \end{macrocode}
1260 % \end{macro}
1261 %
1262 % \begin{macro}{\killtitle}
1263 % |\killtitle| undefines the remaining macros of |\maketitle|.
1264 % \changes{v2.1}{2001/03/23}{\cs{killtitle} calls \cs{keepthetitle} to
1265 % do most of the work}
1266 % \begin{macrocode}
1267 \providecommand{\killtitle}{}
1268 \renewcommand{\killtitle}{%
1269 \keepthetitle
1270 \global\let\thetitle\relax
1271 \global\let\theauthor\relax
1272 \global\let\thedate\relax
1273 }
1274
1275 % \end{macrocode}
1276 % \end{macro}
1277 %
1278 % \begin{macro}{\appendiargdef}
1279 % The code is copied from the \Lpack{abstract} package.
1280 % \begin{macrocode}
1281 \providecommand{\appendiargdef}[2]{\begingroup
1282 \toks@\expandafter{#1{##1}#2}%
1283 \edef\@bsx{\endgroup \def\noexpand#1####1{\the\toks@}}%
1284 \@bsx}
1285
1286 % \end{macrocode}
1287 % \end{macro}
1288 %
1289 % \begin{macro}{\thetitle}
1290 % \begin{macro}{\theauthor}
1291 % \begin{macro}{\thedate}
1292 % In order to make the |\title|, etc., values available for printing
1293 % their definitions need extending to save their arguments
1294 % (see Section~\ref{sec:app} for their
1295 % original definitions). We have to make sure that extraneous material,
1296 % like |\thanks|, is excluded from the saved texts.
1297 % \begin{macrocode}
1298 \appendiargdef{\title}{%
1299 \begingroup
1300 \renewcommand{\thanks}[1]{}
1301 \renewcommand{\thanksmark}[1]{}
1302 \renewcommand{\thanksgap}[1]{}
1303 \protected@xdef\thetitle{#1}
1304 \endgroup}
1305 \appendiargdef{\author}{%
1306 \begingroup
1307 \renewcommand{\thanks}[1]{}
1308 \renewcommand{\and}{\unskip, }
1309 \renewcommand{\thanksmark}[1]{}
1310 \renewcommand{\thanksgap}[1]{}
1311 \protected@xdef\theauthor{#1}
1312 \endgroup}
1313 \appendiargdef{\date}{%
1314 \begingroup
1315 \renewcommand{\thanks}[1]{}
1316 \renewcommand{\thanksmark}[1]{}
1317 \renewcommand{\thanksgap}[1]{}
1318 \protected@xdef\thedate{#1}
1319 \endgroup}
1320
1321 % \end{macrocode}
1322 % \end{macro}
1323 % \end{macro}
1324 % \end{macro}
1325 %
1326 % The end of this package.
1327 % \begin{macrocode}
1328 %</usc>
1329 % \end{macrocode}
1330 %
1331 % \appendix
1332 % \section{Original code for making a title} \label{sec:app}
1333 %
1334 % These are the kernel commands (from \file{ltsect.dtx}) for the elements
1335 % of |\maketitle|.
1336 % \par\begin{small}\begin{verbatim}
1337 % \def\title#1{\gdef\@title{#1}}
1338 % \def\@title{\@latex@error{No \noexpand\title given}\@ehc}
1339 % \def\author#1{\gdef\@author{#1}}
1340 % \def\@author{\@latex@warning@no@line{No \noexpand\author given}}
1341 % \def\date#1{\gdef\@date{#1}}
1342 % \def\@date{\today}
1343 % \def\thanks#1{\footnotemark
1344 % \protected@xdef\@thanks{\@thanks
1345 % \protect\footnotetext[\the\c@footnote]{#1}}%
1346 % }
1347 % \let\@thanks\@empty
1348 % \def\and{% % \begin{tabular}
1349 % \end{tabular}%
1350 % \hskip 1em \@plus.17fil%
1351 % \begin{tabular}[t]{c}}% % \end{tabular}
1352 % \end{verbatim}
1353 % \par\end{small}
1354 %
1355 %
1356 % This is the version of
1357 % |\maketitle| and |\@maketitle| from \file{classes.dtx}.
1358 % \par\begin{small}\begin{verbatim}
1359 % \if@titlepage
1360 % \newcommand{\maketitle}{\begin{titlepage}%
1361 % \let\footnotesize\small
1362 % \let\footnoterule\relax
1363 % \let \footnote \thanks
1364 % \null\vfil
1365 % \vskip 60\p@
1366 % \begin{center}%
1367 % {\LARGE \@title \par}%
1368 % \vskip 3em%
1369 % {\large
1370 % \lineskip .75em%
1371 % \begin{tabular}[t]{c}%
1372 % \@author
1373 % \end{tabular}\par}
1374 % \vskip 1.5em%
1375 % {\large \@date \par}%
1376 % \end{center}\par
1377 % \@thanks
1378 % \vfil\null
1379 % \end{titlepage}%
1380 % \setcounter{footnote}{0}%
1381 % \global\let\thanks\relax
1382 % \global\let\maketitle\relax
1383 % \global\let\@maketitle\relax
1384 % \global\let\@thanks\@empty
1385 % \global\let\@author\@empty
1386 % \global\let\@date\@empty
1387 % \global\let\@title\@empty
1388 % \global\let\title\relax
1389 % \global\let\author\relax
1390 % \global\let\date\relax
1391 % \global\let\and\relax
1392 % }
1393 % \else
1394 % \newcommand{\maketitle}{\par
1395 % \begingroup
1396 % \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
1397 % \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
1398 % \long\def\@makefntext##1{\parindent 1em\noindent
1399 % \hb@[email protected]{%
1400 % \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
1401 % \if@twocolumn
1402 % \ifnum \col@number=\@ne
1403 % \@maketitle
1404 % \else
1405 % \twocolumn[\@maketitle]%
1406 % \fi
1407 % \else
1408 % \newpage
1409 % \global\@topnum\z@
1410 % \@maketitle
1411 % \fi
1412 % \thispagestyle{plain}\@thanks
1413 % \endgroup
1414 % \setcounter{footnote}{0}%
1415 % \global\let\thanks\relax
1416 % \global\let\maketitle\relax
1417 % \global\let\@maketitle\relax
1418 % \global\let\@thanks\@empty
1419 % \global\let\@author\@empty
1420 % \global\let\@date\@empty
1421 % \global\let\@title\@empty
1422 % \global\let\title\relax
1423 % \global\let\author\relax
1424 % \global\let\date\relax
1425 % \global\let\and\relax
1426 % }
1427 %
1428 % \def\@maketitle{%
1429 % \newpage
1430 % \null
1431 % \vskip 2em%
1432 % \begin{center}%
1433 % \let \footnote \thanks
1434 % {\LARGE \@title \par}%
1435 % \vskip 1.5em%
1436 % {\large
1437 % \lineskip .5em%
1438 % \begin{tabular}[t]{c}%
1439 % \@author
1440 % \end{tabular}\par}
1441 % \vskip 1em%
1442 % {\large \@date}%
1443 % \end{center}
1444 % \par
1445 % \vskip 1.5em}
1446 % \fi
1447 %
1448 % \end{verbatim}
1449 % \end{small}\par
1450 %
1451 %
1452 %
1453 %
1454 % \Finale
1455 % \PrintIndex
1456 %
1457 \endinput
1458
1459 %% \CharacterTable
1460 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
1461 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
1462 %% Digits \0\1\2\3\4\5\6\7\8\9
1463 %% Exclamation \! Double quote \" Hash (number) \#
1464 %% Dollar \$ Percent \% Ampersand \&
1465 %% Acute accent \' Left paren \( Right paren \)
1466 %% Asterisk \* Plus \+ Comma \,
1467 %% Minus \- Point \. Solidus \/
1468 %% Colon \: Semicolon \; Less than \<
1469 %% Equals \= Greater than \> Question mark \?
1470 %% Commercial at \@ Left bracket \[ Backslash \\
1471 %% Right bracket \] Circumflex \^ Underscore \_
1472 %% Grave accent \` Left brace \{ Vertical bar \|
1473 %% Right brace \} Tilde \~}
1474
1475