1 % Front page for Unified Process Methodology
3 % Copyright (c) 2006-2015 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{2015/06/26}
23 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
24 \ProvidesPackage{upmethodology-frontpage}[\upm@package@fp@ver]
26 \RequirePackage{upmethodology-p-common}
28 %----------------------------------------
30 %----------------------------------------
31 \def\upm@front@lang@english{
32 \gdef\upm@lang@@{\message{**** upmethodology-frontpage is using English language ****}}%
33 \gdef\upm@lang@front@authors{\upm@lang@document@authors}
35 \def\upm@front@lang@french{
36 \gdef\upm@lang@@{\message{**** upmethodology-frontpage is using French language ****}}%
37 \gdef\upm@lang@front@authors{\upm@lang@document@authors}
40 %----------------------------------------
42 %----------------------------------------
43 \DeclareOption{french}{%
44 \upm@front@lang@french
46 \DeclareOption{francais}{%
47 \upm@front@lang@french
49 \DeclareOption{english}{%
50 \upm@front@lang@english
52 \ExecuteOptions{english}
56 \RequirePackage{upmethodology-extension}
57 \RequirePackage{upmethodology-document}
59 % Declare the temporary dimensions
60 \newdimen\upm@front@tmpa
61 \newdimen\upm@front@tmpb
63 %----------------------------------------
65 %----------------------------------------
66 \def\upm@front@force@single@spacing#1{{\begin{singlespace}#1\end{singlespace}}}
67 \def\upm@front@maintitle@fmt#1{\Huge \scshape #1}
68 \def\upm@front@project@fmt#1{\textbf{\Large #1}}
69 \def\upm@front@subproject@fmt#1{\textbf{\large #1}}
70 \def\upm@front@document@fmt#1{\textbf{\normalsize #1}}
71 \def\upm@front@info@fmt#1{{\normalsize #1}}
72 \def\upm@front@author@fmt#1{%
73 \begin{upmfontsize}{\small}#1\end{upmfontsize}%
76 %----------------------------------------
77 % Define the command to put the title with a classic layout
78 %----------------------------------------
79 \newcommand{\upm@front@layout@classic}{%
80 \message{************ USE CLASSIC FRONT COVER}
84 % Illustration picture
85 \Ifelsedefined{frontillustration}{%
86 \noindent\expandafter\includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}
88 \Ifdefined{logo}{\noindent\vfill\expandafter\includegraphics[width=.4\linewidth]{\Get{logo}}}%
93 \upm@front@force@single@spacing{\upm@front@maintitle@fmt{\theupmproject}}
97 \noindent\rule{\linewidth}{1mm} \\
98 \noindent\raggedleft\upm@front@project@fmt{\theupmproject} \\
99 \Ifnotempty{\theupmsubproject}{\noindent\raggedleft\upm@front@subproject@fmt{\theupmsubproject}\\}
101 \noindent\raggedleft\upm@front@document@fmt{\theupmdocname} \\
102 \noindent\rule{\linewidth}{1mm} \\
106 % Document information
107 \noindent\raggedleft\begin{tabular}{rr}
108 \upm@front@info@fmt{\upm@lang@docref:} & \upm@front@info@fmt{\theupmdocref} \\
109 \upm@front@info@fmt{\upm@lang@version:} & \upm@front@info@fmt{\theupmversion} \\
110 \upm@front@info@fmt{\upm@lang@lastupdate@short:} & \upm@front@info@fmt{\theupmdate} \\
111 \upm@front@info@fmt{\upm@lang@status:} & \upm@front@info@fmt{\theupmstatus} \\
115 \Ifelsedefined{frontillustration}{%
116 \Ifelsedefined{logo}{%
117 \noindent\begin{tabularx}{\linewidth}{l>{\raggedleft}X}%
118 \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}} & %
119 \upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
122 \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
125 \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
133 %----------------------------------------
134 % Define the command to put the title with a classic layout
135 %----------------------------------------
136 \newcommand{\upm@front@layout@modern}{%
137 \message{************ USE MODERN FRONT COVER}
140 \upm@front@maintitle@fmt{\theupmproject} \\
141 \noindent\rule{\linewidth}{.5mm} \\
144 \Ifnotempty{\theupmsubproject}{\noindent\raggedright\upm@front@subproject@fmt{\theupmsubproject}\\}
146 \noindent\raggedright\upm@front@force@single@spacing{\upm@front@document@fmt{\theupmdocname}}
152 \Ifelsedefined{frontillustration}{%
154 \includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}%
158 \upm@front@tmpa=\linewidth
159 \advance\upm@front@tmpa-.4\linewidth
160 \put(\strip@pt\upm@front@tmpa,75){
161 \begin{tabular*}{.4\linewidth}{lr}
162 \upm@front@info@fmt{\upm@lang@docref:} & \upm@front@info@fmt{\theupmdocref} \\
163 \upm@front@info@fmt{\upm@lang@version:} & \upm@front@info@fmt{\theupmversion} \\
164 \upm@front@info@fmt{\upm@lang@lastupdate@short:} & \upm@front@info@fmt{\theupmdate} \\
165 \upm@front@info@fmt{\upm@lang@status:} & \upm@front@info@fmt{\theupmstatus} \\
168 \upm@front@tmpa=\linewidth
169 \advance\upm@front@tmpa-.3\linewidth
171 \put(\strip@pt\upm@front@tmpa,-50){
172 \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}}%
181 \newcommand{\upm@front@setfrontlayout}[2]{%
182 \ifthenelse{\equal{#1}{classic}}{%
183 \Set{frontillustrationsize}{.6}%
184 \global\let\upm@front@layout\upm@front@layout@classic%
186 \ifthenelse{\equal{#1}{modern}}{%
187 \Set{frontillustrationsize}{1}
188 \global\let\upm@front@layout\upm@front@layout@modern%
190 \ifthenelse{\equal{#1}{custom}}{#2}{\errmessage{invalid front layout theme: #1}}%
195 %----------------------------------------
196 % Set the front page layout as the classic layout theme
197 %----------------------------------------
198 %\setfrontcover{layout_name}
199 \newcommand{\setfrontcover}[1]{%
200 \upm@front@setfrontlayout{#1}{\errmessage{invalid front layout theme: #1}}%
202 \newcommand{\setfrontlayout}[1]{\errmessage{"\string\setfrontlayout" is deprecated. Use "\string\setfrontcover" insteed}}
204 \setfrontcover{classic}
206 \renewcommand{\maketitle}{%
207 \Ifdefined{frontpage}{
208 \upm@front@setfrontlayout{\Get{frontpage}}{%
209 \message{************ USE CUSTOM FRONT COVER}
210 \gdef\upm@front@layout{%
212 \Get{frontpage@custom}%
218 \newcommand{\makefrontcover}{\maketitle}
220 %----------------------------------------
221 % Set the illustration figure on the front page
222 %----------------------------------------
223 %\setfrontillustration[size_factor]{filename}
224 \newcommand{\setfrontillustration}[2][1]{%
225 \Set{frontillustrationsize}{#1}%
226 \Set{frontillustration}{#2}%
229 %----------------------------------------
230 % Clear the illustration figure on the front page
231 %----------------------------------------
232 %\clearfrontillustration
233 \newcommand{\clearfrontillustration}{%
234 \Set{frontillustrationsize}{1}%
235 \Unset{frontillustration}%
238 %----------------------------------------
239 % SUPPORT FOR TIKZEXTERNAL
240 %----------------------------------------
243 \@ifundefined{tikzexternalrealjob}{}{%
244 \message{*** Overriding the document specification for TikZ externalizer.}%
245 \ifthenelse{\equal{\jobname}{\tikzexternalrealjob}}{}{%