1 % titlepic.sty is a LaTeX package to show a picture on the cover produced by \maketitle.
2 % By Thomas ten Cate <ttencate@gmail.com>. Free software, no warranty of any kind.
5 % 1.1: now more self-contained, comes with a PDF manual
8 % -----------------------------------------------------------------------------
10 % No idea whether it works on older LaTeXes.
11 \NeedsTeXFormat{LaTeX2e}
13 % Package identification and version number.
14 \ProvidesPackage{titlepic}[2009/08/03 1.1 Package to display a picture on the title page]
16 % Declare the options.
17 \DeclareOption{tt}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vskip 3em}}
18 \DeclareOption{tc}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vfil}}
19 \DeclareOption{cc}{\gdef\@tptopspace{\null\vfil}\gdef\@tpsepspace{\vskip 3em}}
23 % Define the sole command introduced by this package.
24 % Very similar to the definition of \title, etc.
25 \def\titlepic#1{\gdef\@titlepic{#1}}
26 \def\@titlepic{\@empty} % default: no picture
28 % If a title page was requested from the document class (article/report/book),
29 % override \maketitle to show our picture.
31 \renewcommand\maketitle{
33 \let\footnotesize\small
34 \let\footnoterule\relax
35 \let \footnote \thanks
38 {\LARGE \@title \par}%
42 \begin{tabular}[t]{c}%
47 {\large \@date \par}% % Set date in \large size.
50 {\centering\@titlepic\par}
54 \setcounter{footnote}{0}%
55 \global\let\thanks\relax
56 \global\let\maketitle\relax
57 \global\let\@thanks\@empty
58 \global\let\@author\@empty
59 \global\let\@date\@empty
60 \global\let\@title\@empty
61 \global\let\@titlepic\@empty
62 \global\let\title\relax
63 \global\let\author\relax
64 \global\let\date\relax
66 \global\let\titlepic\relax