summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-11-17 18:02:43 +0000
committerKarl Berry <karl@freefriends.org>2009-11-17 18:02:43 +0000
commit592922d263ef31c47620333f40281f722a5b4e2e (patch)
treef2cf6e71567420254ee534f7f66fb531c72f75fd /Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty
parent8caf232ea678d2a7c51b476be84aec1fc9e17423 (diff)
upmethodology 20091102 (2nov09)
git-svn-id: svn://tug.org/texlive/trunk@16051 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty')
-rw-r--r--Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty119
1 files changed, 75 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty
index 0f35ac7e19d..ded8bcfa8fe 100644
--- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty
+++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-frontpage.sty
@@ -1,6 +1,6 @@
% Front page for Unified Process Methodology
%
-% Copyright (c) 2006-2007 Stephane GALLAND <galland@arakhne.org>
+% Copyright (c) 2006-2009 Stephane GALLAND <galland@arakhne.org>
%
% This program is free library; you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
@@ -19,17 +19,23 @@
%
% Creation date: 2006-04-11
% Modifications:
+% 2009-10-30 Clean code.
+% 2009-10-29 Major bug fix: invert order of the \setfrontillustration parameters.
+% 2009-10-27 Clean the extension API.
+% 2009-10-22 Add support for front page from UPM extensions.
% 2007-07-05 Add people name formatting function.
% 2007-07-03 Force single spacing inside the title.
% 2007-03-19 Add localization.
% 2006-04-19 Add version number.
%
-\global\edef\upm@package@fp@ver{2007/07/04}
+\global\edef\upm@package@fp@ver{2009/10/30}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-frontpage}[\upm@package@fp@ver]
+\RequirePackage{upmethodology-p-common}
+
%-----
% Locales
\def\upm@front@lang@english{
@@ -56,11 +62,7 @@
\ProcessOptions
\upm@lang@@
-\RequirePackage{xspace}
-\RequirePackage{tabularx}
-\RequirePackage{graphicx}
-\RequirePackage{setspace}
-
+\RequirePackage{upmethodology-extension}
\RequirePackage{upmethodology-document}
% Declare the temporary dimensions
@@ -82,15 +84,16 @@
%-----
% Define the command to put the title with a classic layout
\newcommand{\upm@front@layout@classic}{%
+ \message{************ USE CLASSIC FRONT COVER}
\begin{titlepage}%
\begin{center}
% Illustration picture
- \ifx\upm@front@illustration\relax
- \noindent\vfill\includegraphics[width=.4\linewidth]{\theupmdoclogo}
- \else
- \noindent\expandafter\includegraphics[width=\upm@front@illustration@size\expandafter\linewidth]{\upm@front@illustration}
- \fi
+ \Ifelsedefined{frontillustration}{%
+ \noindent\expandafter\includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}
+ }{%
+ \Ifdefined{logo}{\noindent\vfill\expandafter\includegraphics[width=.4\linewidth]{\Get{logo}}}%
+ }%
% Project name
\vspace{1cm}
@@ -100,7 +103,7 @@
% Document title
\noindent\rule{\linewidth}{1mm} \\
\noindent\raggedleft\upm@front@project@fmt{\theupmproject} \\
- \upm@ifnotempty{\theupmsubproject}{\noindent\raggedleft\upm@front@subproject@fmt{\theupmsubproject}\\}
+ \Ifnotempty{\theupmsubproject}{\noindent\raggedleft\upm@front@subproject@fmt{\theupmsubproject}\\}
\vspace{.5cm}
\noindent\raggedleft\upm@front@document@fmt{\theupmdocname} \\
\noindent\rule{\linewidth}{1mm} \\
@@ -116,14 +119,18 @@
\end{tabular}
\vfill
- \ifx\upm@front@illustration\relax
- \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\
- \else
- \noindent\begin{tabularx}{\linewidth}{l>{\raggedleft}X}
- \includegraphics[width=.3\linewidth]{\theupmdoclogo} &
- \upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\
- \end{tabularx}
- \fi
+ \Ifelsedefined{frontillustration}{%
+ \Ifelsedefined{logo}{%
+ \noindent\begin{tabularx}{\linewidth}{l>{\raggedleft}X}%
+ \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}} & %
+ \upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
+ \end{tabularx}%
+ }{%
+ \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
+ }%
+ }{%
+ \noindent\raggedleft\upm@front@author@fmt{\upm@lang@front@authors:~\theauthorlist} \\%
+ }%
\end{center}
\end{titlepage}
@@ -133,13 +140,14 @@
%-----
% Define the command to put the title with a classic layout
\newcommand{\upm@front@layout@modern}{%
+ \message{************ USE MODERN FRONT COVER}
\begin{titlepage}%
% Project name
\upm@front@maintitle@fmt{\theupmproject} \\
\noindent\rule{\linewidth}{.5mm} \\
% Document title
- \upm@ifnotempty{\theupmsubproject}{\noindent\raggedright\upm@front@subproject@fmt{\theupmsubproject}\\}
+ \Ifnotempty{\theupmsubproject}{\noindent\raggedright\upm@front@subproject@fmt{\theupmsubproject}\\}
\vspace{.5cm}
\noindent\raggedright\upm@front@force@single@spacing{\upm@front@document@fmt{\theupmdocname}}
@@ -147,12 +155,12 @@
\vbox{
\begin{picture}(0,0)
- \ifx\upm@front@illustration\relax
- \else
- \put(-110,-100){
- \includegraphics[width=\upm@front@illustration@size\expandafter\linewidth]{\upm@front@illustration}
+ \Ifelsedefined{frontillustration}{%
+ \put(-110,-100){%
+ \includegraphics[width=\Get{frontillustrationsize}\expandafter\linewidth]{\Get{frontillustration}}%
+ }%
+ }{%
}
- \fi
\upm@front@tmpa=\linewidth
\advance\upm@front@tmpa-.4\linewidth
\put(\strip@pt\upm@front@tmpa,75){
@@ -165,8 +173,10 @@
}
\upm@front@tmpa=\linewidth
\advance\upm@front@tmpa-.3\linewidth
- \put(\strip@pt\upm@front@tmpa,-50){
- \includegraphics[width=.3\linewidth]{\theupmdoclogo}%
+ \Ifdefined{logo}{
+ \put(\strip@pt\upm@front@tmpa,-50){
+ \expandafter\includegraphics[width=.3\linewidth]{\Get{logo}}%
+ }
}
\end{picture}
@@ -174,37 +184,58 @@
\end{titlepage}
}
-%----
-% Set the front page layout as the classic layout theme
-%\setfrontlayout{layout_name}
-\newcommand{\setfrontlayout}[1]{%
+\newcommand{\upm@front@setfrontlayout}[2]{%
\ifthenelse{\equal{#1}{classic}}{%
- \gdef\upm@front@illustration@size{.6}
+ \Set{frontillustrationsize}{.6}%
\global\let\upm@front@layout\upm@front@layout@classic%
}{%
\ifthenelse{\equal{#1}{modern}}{%
- \gdef\upm@front@illustration@size{1}
+ \Set{frontillustrationsize}{1}
\global\let\upm@front@layout\upm@front@layout@modern%
}{%
- \errmessage{invalid front layout theme: #1}%
+ \ifthenelse{\equal{#1}{custom}}{#2}{\errmessage{invalid front layout theme: #1}}%
}%
}%
}
-\setfrontlayout{classic}
-
-\AtBeginDocument{%
- \renewcommand{\maketitle}{\upm@front@layout}%
+%----
+% Set the front page layout as the classic layout theme
+%\setfrontcover{layout_name}
+\newcommand{\setfrontcover}[1]{%
+ \upm@front@setfrontlayout{#1}{\errmessage{invalid front layout theme: #1}}%
}
-
-\let\upm@front@illustration\relax
+\newcommand{\setfrontlayout}[1]{\errmessage{"\string\setfrontlayout" is deprecated. Use "\string\setfrontcover" insteed}}
+
+\setfrontcover{classic}
+
+\renewcommand{\maketitle}{%
+ \Ifdefined{frontpage}{
+ \upm@front@setfrontlayout{\Get{frontpage}}{%
+ \message{************ USE CUSTOM FRONT COVER}
+ \gdef\upm@front@layout{%
+ \begin{titlepage}%
+ \Get{frontpage@custom}%
+ \end{titlepage}%
+ }%
+ }%
+ }%
+ \upm@front@layout}%
+\newcommand{\makefrontcover}{\maketitle}
%----
% Set the illustration figure on the front page
%\setfrontillustration[size_factor]{filename}
\newcommand{\setfrontillustration}[2][1]{%
- \gdef\upm@front@illustration{#2}%
- \gdef\upm@front@illustration@size{#1}%
+ \Set{frontillustrationsize}{#1}%
+ \Set{frontillustration}{#2}%
+}
+
+%----
+% Clear the illustration figure on the front page
+%\clearfrontillustration
+\newcommand{\clearfrontillustration}{%
+ \Set{frontillustrationsize}{1}%
+ \Unset{frontillustration}%
}
\endinput