1 % Front page for Unified Process Methodology
3 % Copyright (c) 2006-2009 Stephane GALLAND <galland@arakhne.org>
5 % This program is free library; you can redistribute it and/or modify
6 % it under the terms of the GNU Lesser General Public License as
7 % published by the Free Software Foundation; either version 3 of the
8 % License, or any later version.
10 % This library is distributed in the hope that it will be useful, but
11 % WITHOUT ANY WARRANTY; without even the implied warranty of
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 % Lesser General Public License for more details.
15 % You should have received a copy of the GNU Lesser General Public
16 % License along with this library; see the file COPYING. If not,
17 % write to the Free Software Foundation, Inc., 59 Temple Place - Suite
18 % 330, Boston, MA 02111-1307, USA.
21 \global\edef\upm@package@fp@ver{2009/10/30}
23 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
24 \ProvidesPackage{upmethodology-frontpage}[\upm@package@fp@ver]
26 \RequirePackage{upmethodology-p-common}
30 \def\upm@front@lang@english{
31 \gdef\upm@lang@@{\message{**** upmethodology-frontpage is using English language ****}}%
32 \gdef\upm@lang@front@authors{\upm@lang@document@authors}
34 \def\upm@front@lang@french{
35 \gdef\upm@lang@@{\message{**** upmethodology-frontpage is using French language ****}}%
36 \gdef\upm@lang@front@authors{\upm@lang@document@authors}
38 %----------------------------------------
40 %----------------------------------------
41 \DeclareOption{french}{%
42 \upm@front@lang@french
44 \DeclareOption{francais}{%
45 \upm@front@lang@french
47 \DeclareOption{english}{%
48 \upm@front@lang@english
50 \ExecuteOptions{english}
54 \RequirePackage{upmethodology-extension}
55 \RequirePackage{upmethodology-document}
57 % Declare the temporary dimensions
58 \newdimen\upm@front@tmpa
59 \newdimen\upm@front@tmpb
63 \def\upm@front@force@single@spacing#1{{\begin{singlespace}#1\end{singlespace}}}
64 \def\upm@front@maintitle@fmt#1{\Huge \scshape #1}
65 \def\upm@front@project@fmt#1{\textbf{\Large #1}}
66 \def\upm@front@subproject@fmt#1{\textbf{\large #1}}
67 \def\upm@front@document@fmt#1{\textbf{\normalsize #1}}
68 \def\upm@front@info@fmt#1{{\normalsize #1}}
69 \def\upm@front@author@fmt#1{%
70 \begin{upmfontsize}{\small}#1\end{upmfontsize}%
74 % Define the command to put the title with a classic layout
75 \newcommand{\upm@front@layout@classic}{%
76 \message{************ USE CLASSIC FRONT COVER}
80 % Illustration picture
81 \Ifelsedefined{frontillustration}{%
82 \noindent\expandafter\includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}
84 \Ifdefined{logo}{\noindent\vfill\expandafter\includegraphics[width=.4\linewidth]{\Get{logo}}}%
89 \upm@front@force@single@spacing{\upm@front@maintitle@fmt{\theupmproject}}
93 \noindent\rule{\linewidth}{1mm} \\
94 \noindent\raggedleft\upm@front@project@fmt{\theupmproject} \\
95 \Ifnotempty{\theupmsubproject}{\noindent\raggedleft\upm@front@subproject@fmt{\theupmsubproject}\\}
97 \noindent\raggedleft\upm@front@document@fmt{\theupmdocname} \\
98 \noindent\rule{\linewidth}{1mm} \\
102 % Document information
103 \noindent\raggedleft\begin{tabular}{rr}
104 \upm@front@info@fmt{\upm@lang@docref:} & \upm@front@info@fmt{\theupmdocref} \\
105 \upm@front@info@fmt{\upm@lang@version:} & \upm@front@info@fmt{\theupmversion} \\
106 \upm@front@info@fmt{\upm@lang@lastupdate@short:} & \upm@front@info@fmt{\theupmdate} \\
107 \upm@front@info@fmt{\upm@lang@status:} & \upm@front@info@fmt{\theupmstatus} \\
111 \Ifelsedefined{frontillustration}{%
112 \Ifelsedefined{logo}{%
113 \noindent\begin{tabularx}{\linewidth}{l>{\raggedleft}X}%
114 \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}} & %
115 \upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
118 \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
121 \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
130 % Define the command to put the title with a classic layout
131 \newcommand{\upm@front@layout@modern}{%
132 \message{************ USE MODERN FRONT COVER}
135 \upm@front@maintitle@fmt{\theupmproject} \\
136 \noindent\rule{\linewidth}{.5mm} \\
139 \Ifnotempty{\theupmsubproject}{\noindent\raggedright\upm@front@subproject@fmt{\theupmsubproject}\\}
141 \noindent\raggedright\upm@front@force@single@spacing{\upm@front@document@fmt{\theupmdocname}}
147 \Ifelsedefined{frontillustration}{%
149 \includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}%
153 \upm@front@tmpa=\linewidth
154 \advance\upm@front@tmpa-.4\linewidth
155 \put(\strip@pt\upm@front@tmpa,75){
156 \begin{tabular*}{.4\linewidth}{lr}
157 \upm@front@info@fmt{\upm@lang@docref:} & \upm@front@info@fmt{\theupmdocref} \\
158 \upm@front@info@fmt{\upm@lang@version:} & \upm@front@info@fmt{\theupmversion} \\
159 \upm@front@info@fmt{\upm@lang@lastupdate@short:} & \upm@front@info@fmt{\theupmdate} \\
160 \upm@front@info@fmt{\upm@lang@status:} & \upm@front@info@fmt{\theupmstatus} \\
163 \upm@front@tmpa=\linewidth
164 \advance\upm@front@tmpa-.3\linewidth
166 \put(\strip@pt\upm@front@tmpa,-50){
167 \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}}%
176 \newcommand{\upm@front@setfrontlayout}[2]{%
177 \ifthenelse{\equal{#1}{classic}}{%
178 \Set{frontillustrationsize}{.6}%
179 \global\let\upm@front@layout\upm@front@layout@classic%
181 \ifthenelse{\equal{#1}{modern}}{%
182 \Set{frontillustrationsize}{1}
183 \global\let\upm@front@layout\upm@front@layout@modern%
185 \ifthenelse{\equal{#1}{custom}}{#2}{\errmessage{invalid front layout theme: #1}}%
191 % Set the front page layout as the classic layout theme
192 %\setfrontcover{layout_name}
193 \newcommand{\setfrontcover}[1]{%
194 \upm@front@setfrontlayout{#1}{\errmessage{invalid front layout theme: #1}}%
196 \newcommand{\setfrontlayout}[1]{\errmessage{"\string\setfrontlayout" is deprecated. Use "\string\setfrontcover" insteed}}
198 \setfrontcover{classic}
200 \renewcommand{\maketitle}{%
201 \Ifdefined{frontpage}{
202 \upm@front@setfrontlayout{\Get{frontpage}}{%
203 \message{************ USE CUSTOM FRONT COVER}
204 \gdef\upm@front@layout{%
206 \Get{frontpage@custom}%
212 \newcommand{\makefrontcover}{\maketitle}
215 % Set the illustration figure on the front page
216 %\setfrontillustration[size_factor]{filename}
217 \newcommand{\setfrontillustration}[2][1]{%
218 \Set{frontillustrationsize}{#1}%
219 \Set{frontillustration}{#2}%
223 % Clear the illustration figure on the front page
224 %\clearfrontillustration
225 \newcommand{\clearfrontillustration}{%
226 \Set{frontillustrationsize}{1}%
227 \Unset{frontillustration}%