summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/coverpage/CoverPage.sty
blob: d1d497aedc79349a89f98cc72c77874649888b5b (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
%%
%% This is file `CoverPage.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% CoverPage.dtx  (with options: `CoverPage')
%% 
%% LaTeX package for generating a cover page for scientific papers. This
%% cover page contains bibliographical information and a copyright notice.
%% 
%% Copyright (C) 2006 Matthias Mühlich
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{CoverPage}%
  [2006/02/23 v1.01  automatic cover page generation  (MM)]
\RequirePackage{keyval}
\RequirePackage{textcomp}
\RequirePackage{url}
\RequirePackage{verbatim}
\newif\ifCP@nobib\CP@nobibfalse
\gdef\CP@BibRef{See also \BibTeX{} entry below.}
\gdef\CP@In{in:}
\let\CP@AdvancePageTwoSided\relax
\DeclareOption{german}{\gdef\CP@BibRef{Siehe auch \BibTeX{} Eintrag unten.}}
\DeclareOption{english}{\gdef\CP@BibRef{See also \BibTeX{} entry below.}}
\DeclareOption{twoside}{\gdef\CP@AdvancePageTwoSided{\setbox255\vbox{}\shipout\box255}}
\DeclareOption{nobib}{\CP@nobibtrue}
\ProcessOptions\relax
\newdimen\CP@CoverPageWidth
\newdimen\CP@CoverPageHeight
\CP@CoverPageWidth=\paperwidth
\CP@CoverPageHeight=\paperheight
\advance\CP@CoverPageWidth by -1.5in
\advance\CP@CoverPageHeight by -1.5in
\def\CP@Title{title undefined}
\def\CP@Author{author undefined}
\def\CP@Institute{institute undefined}
\def\CP@InSource{source undefined}
\def\CP@Copyright{\textcopyright{} copyright by the author(s)}
\def\CP@Year{(unknown year)}
\def\CP@Source{(unknown source)}
\@ifundefined{BibTeX}
   {\def\BibTeX{{\rmfamily B\kern-.05em%
    \textsc{i\kern-.025em b}\kern-.08em%
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
\gdef\CP@ParseArg{dummy,}
\ifCP@nobib
\else
  \IfFileExists{\jobname.BibTeX.txt}{%
    \bgroup
      \catcode`\@0
      \bgroup
        \def\inproceedings##1{\xdef\CP@ParseArg{##1}}%
        \def\article##1{\xdef\CP@ParseArg{##1}}%
        \def\incollection##1{\xdef\CP@ParseArg{##1}}%
        \def\misc##1{\xdef\CP@ParseArg{##1}}%
        \input{\jobname.BibTeX.txt}%
      \egroup
    \egroup
  }{%
    \PackageError{CoverPage}{No BibTeX file (\jobname.BibTeX.txt) found!}%
      {you must provide a \jobname.BibTeX.txt file}%
  }
\fi
\def\CP@SourceGiven{\gdef\CP@InSource{\CP@In\ \CP@Source. \CP@BibRef}}
\define@key{CoverPage}{booktitle}{\gdef\CP@Source{#1}\CP@SourceGiven}
\define@key{CoverPage}{journal}{\gdef\CP@Source{#1}\CP@SourceGiven}
\define@key{CoverPage}{title}{\gdef\CP@Title{#1}}
\define@key{CoverPage}{author}{\gdef\CP@Author{#1}}
\define@key{CoverPage}{institute}{\gdef\CP@Institute{#1}}
\define@key{CoverPage}{insource}{\gdef\CP@InSource{#1}}
\define@key{CoverPage}{copyright}{\gdef\CP@Copyright{#1}}
\define@key{CoverPage}{year}{\gdef\CP@Year{#1}}
\define@key{CoverPage}{publisher}{%
  \edef\CP@Publisher{#1}%
  \def\CP@Compare{Springer}%
  \ifx\CP@Publisher\CP@Compare
    \gdef\CP@Copyright{\textcopyright\ \CP@Year\ Springer-Verlag.\\
      See also LNCS-Homepage: \url{http://www.springeronline.com/lncs}}%
  \else
    \def\CP@Compare{IEEE}%
    \ifx\CP@Publisher\CP@Compare
      \gdef\CP@Copyright{\textcopyright\ \CP@Year\ IEEE. Personal use of this
        material is permitted. However, permission to reprint/republish this
        material for advertising or promotional purposes or for creating new
        collective works for resale or redistribution to servers or lists, or
        to reuse any copyrighted component of this work in other works must
        be obtained from the IEEE.}%
    \else
      \def\CP@Compare{SPIE}%
      \ifx\CP@Publisher\CP@Compare
        \gdef\CP@Copyright{\textcopyright\ \CP@Year\ Society of Photo-Optical
          Instrumentation Engineers. This paper was published in \CP@Source\
          and is made available as an electronic reprint with permission of
          SPIE. One print or electronic copy may be made for personal use only.
          Systematic or multiple reproduction, distribution to multiple
          locations via electronic or other means, duplication of any material
          in this paper for a fee or for commercial purposes, or modification
          of the content of the paper are prohibited.}%
      \else
        \def\CP@Compare{Kluwer}%
        \ifx\CP@Publisher\CP@Compare
          \gdef\CP@Copyright{\textcopyright\ \CP@Year\ Kluwer Academic Publishers}%
        \else
          \CPPublisherCheck
        \fi
      \fi
    \fi
  \fi
}
\def\CPPublisherCheck{\relax}
\gdef\CPProcessBibEntry{%
    \edef\temp{\noexpand\CP@killBibTeXKeyword\CP@ParseArg\par}%
    \def\CP@killBibTeXKeyword##1,##2\par{##2}%
    \edef\tempii{\noexpand\setkeys{CoverPage}{\temp}}%
    \bgroup
        \def\KV@errx##1{\relax}% keyval: ignore unknown keys
        \tempii
    \egroup
}
\newcommand{\CP@PrintCoverPage}{\bgroup\global\setbox255\vbox{%
    \vspace*{-.25in}%
    \noindent\hspace*{-.25in}%
    \rlap{\begin{minipage}[t][\CP@CoverPageHeight][c]{\CP@CoverPageWidth}%
        {\CoverPageHeader}%
        \vfill%
        {\CoverPageBody}%
        \vfill%
        {\CoverPageFooter}%
    \end{minipage}}%
}\egroup\shipout\box255}
\AtBeginDocument{\CP@PrintCoverPage\CP@AdvancePageTwoSided}
\newcommand{\CPTitleFont}{\Huge\sffamily\bfseries\upshape}
\newcommand{\CPAuthorFont}{\LARGE\sffamily\mdseries\upshape}
\newcommand{\CPInstituteFont}{\Large\sffamily\mdseries\upshape}
\newcommand{\CPInSourceFont}{\large\sffamily\mdseries\upshape}
\newcommand{\CPCopyrightFont}{\large\sffamily\mdseries\upshape}
\newcommand{\CoverPageSetup}[1]{\setkeys{CoverPage}{#1}}
\newcommand{\CoverPageHeader}{}
\newcommand{\CoverPageBody}{%
    \parbox{\linewidth}{%
        \centering%
        \rule{\linewidth}{1.5pt}\par
        \vspace*{2mm}
        {\CPTitleFont\CP@Title\par}
        \vspace{5mm}
        {\CPAuthorFont\CP@Author\par}
        \vspace{1mm}
        {\CPInstituteFont\CP@Institute\par}
        \vspace{5mm}
        {\CPInSourceFont\CP@InSource\par}
        \vspace*{2mm}
        \rule{\linewidth}{1.5pt}\par
    }%
}
\newcommand{\CoverPageFooter}{%
    \normalfont
    \ifCP@nobib
    \else
        \noindent\textsf{\large \BibTeX:}
        {\small\verbatiminput{\jobname.BibTeX.txt}\par}%
        \vspace{5mm}%
    \fi
    {\CPCopyrightFont\CP@Copyright\par}
    \vspace{10mm}
    {\CoverPageFooterInfo\hfill\CoverPageFooterLogo}
}
\newcommand{\CoverPageFooterInfo}{%
    \parbox[b]{.5\textwidth}{%
        \tiny document created on: \today\\
        created from file: \texttt{\jobname.tex}\\
        cover page automatically created with \texttt{CoverPage.sty}\\
        (available at your favourite CTAN mirror)%
    }%
}
\newcommand{\CoverPageFooterLogo}{}
\CPProcessBibEntry
\IfFileExists{CoverPage.cfg}%
    {\input{CoverPage.cfg}}%
    {\PackageWarning{CoverPage}{No config file (CoverPage.cfg) found!}}
\endinput
%%
%% End of file `CoverPage.sty'.