2 %% This is file `titling.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% titling.dtx (with options: `usc')
9 %% -----------------------------------------------------------------
10 %% Author: Peter Wilson (Herries Press)
11 %% Maintainer: Will Robertson (will dot robertson at latex-project dot org)
12 %% Copyright 2000--2004 Peter R. Wilson
14 %% This work may be distributed and/or modified under the
15 %% conditions of the LaTeX Project Public License, either
16 %% version 1.3c of this license or (at your option) any
17 %% later version: <http://www.latex-project.org/lppl.txt>
19 %% This work has the LPPL maintenance status "maintained".
20 %% The Current Maintainer of this work is Will Robertson.
22 %% This work consists of the files listed in the README file.
23 %% -----------------------------------------------------------------
25 \NeedsTeXFormat{LaTeX2e}
26 \ProvidesPackage{titling}[2009/09/04 v2.1d maketitle typesetting]
28 \newcommand{\pretitle}[1]{\def\@bspretitle{#1}}
29 \newcommand{\posttitle}[1]{\def\@bsposttitle{#1}}
30 \newcommand{\preauthor}[1]{\def\@bspreauthor{#1}}
31 \newcommand{\postauthor}[1]{\def\@bspostauthor{#1}}
32 \newcommand{\predate}[1]{\def\@bspredate{#1}}
33 \newcommand{\postdate}[1]{\def\@bspostdate{#1}}
36 \pretitle{\begin{center}\LARGE}
37 \posttitle{\par\end{center}\vskip 2em}
38 \preauthor{\begin{center}
39 \large \lineskip .75em%
40 \begin{tabular}[t]{c}}
41 \postauthor{\end{tabular}\par\end{center}}
42 \predate{\begin{center}\large}
43 \postdate{\par\end{center}}
45 \pretitle{\begin{center}\LARGE}
46 \posttitle{\par\end{center}\vskip 0.5em}
47 \preauthor{\begin{center}
48 \large \lineskip .5em%
49 \begin{tabular}[t]{c}}
50 \postauthor{\end{tabular}\par\end{center}}
51 \predate{\begin{center}\large}
52 \postdate{\par\end{center}}
55 \newcommand{\maketitlehooka}{}
56 \newcommand{\maketitlehookb}{}
57 \newcommand{\maketitlehookc}{}
58 \newcommand{\maketitlehookd}{}
60 \newcommand{\thanksmarkseries}[1]{%
61 \def\@bsmarkseries{\renewcommand{\thefootnote}{\@nameuse{#1}{footnote}}}}
62 \newcommand{\symbolthanksmark}{\thanksmarkseries{\fnsymbol}}
63 \newcommand{\@bscontmark}{\setcounter{footnote}{0}}
64 \newcommand{\continuousmarks}{\def\@bscontmark{}}
65 \newcommand{\thanksheadextra}[2]{%
66 \def\@bsthanksheadpre{#1}%
67 \def\@bsthanksheadpost{#2}}
68 \newcommand{\thanksfootextra}[2]{%
69 \def\thanksfootpre{#1}%
70 \def\thanksfootpost{#2}}
72 \DeclareRobustCommand{\thanksmark}[1]{\footnotemark[#1]}
73 \newcommand{\thanksgap}[1]{\hspace{#1}}
74 \newcommand{\tamark}{\@thefnmark}
76 \newlength{\thanksmarkwidth}
77 \newlength{\thanksmargin}
78 \newcommand{\thanksscript}[1]{\textsuperscript{#1}}
79 \newcommand{\makethanksmarkhook}{}
81 \newcommand{\thanksfootmark}{%
82 \hb@xt@\thanksmarkwidth{\hfil\normalfont\thanksscript{%
83 \thanksfootpre \tamark \thanksfootpost}}}
85 \newcommand{\makethanksmark}{%
87 \makethanksmarkhook\relax
88 \parindent 1em\noindent
89 \leftskip\thanksmargin\relax
90 \advance\leftskip \thanksmarkwidth \null\nobreak\hskip -\leftskip
94 \newcommand{\usethanksrule}{\let\footnoterule\thanksrule}
95 \newcommand{\cancelthanksrule}{\let\footnoterule\@bsfootnoterule}
98 \thanksmarkseries{arabic} % normal footnote numbers
100 \thanksmarkseries{fnsymbol}
104 \setlength{\thanksmarkwidth}{1.8em}
105 \setlength{\thanksmargin}{-\thanksmarkwidth}
108 \let\thanksrule\footnoterule
109 \let\@bsfootnoterule\footnoterule
112 \newlength{\droptitle}
113 \setlength{\droptitle}{0pt}
115 \providecommand{\maketitle}{}
117 \renewcommand{\maketitle}{\begin{titlepage}%
118 \let\footnotesize\small
119 \let\footnoterule\relax
120 \let \footnote \thanks
122 \def\@makefnmark{\rlap{\@textsuperscript{%
123 \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
124 \long\def\@makefntext##1{\makethanksmark ##1}
129 {\@bspretitle \@title \@bsposttitle}
131 {\@bspreauthor \@author \@bspostauthor}
133 {\@bspredate \@date \@bspostdate}
139 \@bscontmark % \setcounter{footnote}{0}%
141 } % end titlepage defs
143 \renewcommand{\maketitle}{\par
146 \def\@makefnmark{\rlap{\@textsuperscript{%
147 \normalfont\@bsthanksheadpre \tamark \@bsthanksheadpost}}}%
148 \long\def\@makefntext##1{\makethanksmark ##1}
150 \ifnum \col@number=\@ne
153 \twocolumn[\@maketitle]%
160 \thispagestyle{plain}\@thanks
162 \@bscontmark % \setcounter{footnote}{0}%
164 } % end non-titlepage
172 {\@bspretitle \@title \@bsposttitle}
174 {\@bspreauthor \@author \@bspostauthor}
176 {\@bspredate \@date \@bspostdate}
182 \newenvironment{titlingpage}%
184 \let\footnoterule\relax
185 \let\footnotesize\small
187 \@restonecoltrue\onecolumn
191 \thispagestyle{empty}
192 \setcounter{page}\@ne
194 \thispagestyle{empty}
195 \if@restonecol\twocolumn \else \newpage \fi
196 \if@twoside\else \setcounter{page}\@ne\fi}
198 \newcommand{\calccentering}[2]{
200 \advance #1 by -\textwidth
203 \advance #1 by -\hoffset
207 \newcommand{\emptythanks}{\global\let\@thanks\@empty}
209 \newcommand{\@bsmtitlempty}{%
210 \global\let\maketitle\relax
211 \global\let\@maketitle\relax
212 \global\let\title\relax
213 \global\let\author\relax
214 \global\let\date\relax
215 \global\let\thanksmarkseries\relax
216 \global\let\thanksheadextra\relax
217 \global\let\thanksfootextra\relax
218 \global\let\thanksmark\relax
219 \global\let\thanksgap\relax
222 \newcommand{\keepthetitle}{%
224 \global\let\thanks\relax
225 \global\let\and\relax
226 \global\let\@thanks\@empty
227 \global\let\@title\@empty
228 \global\let\@author\@empty
229 \global\let\@date\@empty
232 \providecommand{\killtitle}{}
233 \renewcommand{\killtitle}{%
235 \global\let\thetitle\relax
236 \global\let\theauthor\relax
237 \global\let\thedate\relax
240 \providecommand{\appendiargdef}[2]{\begingroup
241 \toks@\expandafter{#1{##1}#2}%
242 \edef\@bsx{\endgroup \def\noexpand#1####1{\the\toks@}}%
245 \appendiargdef{\title}{%
247 \renewcommand{\thanks}[1]{}
248 \renewcommand{\thanksmark}[1]{}
249 \renewcommand{\thanksgap}[1]{}
250 \protected@xdef\thetitle{#1}
252 \appendiargdef{\author}{%
254 \renewcommand{\thanks}[1]{}
255 \renewcommand{\and}{\unskip, }
256 \renewcommand{\thanksmark}[1]{}
257 \renewcommand{\thanksgap}[1]{}
258 \protected@xdef\theauthor{#1}
260 \appendiargdef{\date}{%
262 \renewcommand{\thanks}[1]{}
263 \renewcommand{\thanksmark}[1]{}
264 \renewcommand{\thanksgap}[1]{}
265 \protected@xdef\thedate{#1}
270 %% End of file `titling.sty'.