diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-18 17:27:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-18 17:27:43 +0000 |
commit | 61d228804ad353fb8002d4f42e1b72727640ba8e (patch) | |
tree | cec93ecd8d035e799a188f5852bb11c124f780cf /Master/texmf-dist/tex/latex/titlepic/titlepic.sty | |
parent | 631b6655bbfd0b59762273a7e4ce27877f7f44dd (diff) |
new latex package titlepic (3aug09)
git-svn-id: svn://tug.org/texlive/trunk@14750 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/titlepic/titlepic.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/titlepic/titlepic.sty | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/titlepic/titlepic.sty b/Master/texmf-dist/tex/latex/titlepic/titlepic.sty new file mode 100644 index 00000000000..974885c8998 --- /dev/null +++ b/Master/texmf-dist/tex/latex/titlepic/titlepic.sty @@ -0,0 +1,68 @@ +% titlepic.sty is a LaTeX package to show a picture on the cover produced by \maketitle. +% By Thomas ten Cate <ttencate@gmail.com>. Free software, no warranty of any kind. +% +% Version history: +% 1.1: now more self-contained, comes with a PDF manual +% 1.0: first release +% +% ----------------------------------------------------------------------------- + +% No idea whether it works on older LaTeXes. +\NeedsTeXFormat{LaTeX2e} + +% Package identification and version number. +\ProvidesPackage{titlepic}[2009/08/03 1.1 Package to display a picture on the title page] + +% Declare the options. +\DeclareOption{tt}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vskip 3em}} +\DeclareOption{tc}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vfil}} +\DeclareOption{cc}{\gdef\@tptopspace{\null\vfil}\gdef\@tpsepspace{\vskip 3em}} +\ExecuteOptions{cc} +\ProcessOptions + +% Define the sole command introduced by this package. +% Very similar to the definition of \title, etc. +\def\titlepic#1{\gdef\@titlepic{#1}} +\def\@titlepic{\@empty} % default: no picture + +% If a title page was requested from the document class (article/report/book), +% override \maketitle to show our picture. +\if@titlepage +\renewcommand\maketitle{ + \begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \@tptopspace% + \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 + \@tpsepspace% + {\centering\@titlepic\par} + \vfil + \@thanks + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\@titlepic\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + \global\let\titlepic\relax +} +\fi |