summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.cls
blob: 3860f56c8957bc80ae5e92d11a4d12d6d5d7932b (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
% Document class for Unified Process Methodology
%
% Copyright (c) 2006-2007 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
% published by the Free Software Foundation; either version 3 of the
% License, or any later version.
%
% This library is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
% Lesser General Public License for more details.
%
% You should have received a copy of the GNU Lesser General Public
% License along with this library; see the file COPYING.  If not,
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite
% 330, Boston, MA 02111-1307, USA.
%
% Creation date: 2006-04-06
% Modifications:
%   2007-07-03   Force the height of the small logo in headers.
%                Remove the copyright date building function.
%   2007-03-19   Add localization.
%   2006-04-19   Add version number.
%   2006-04-20   Add task package.
%   2006-04-21   Add specification package.
%   2006-04-22   Remove task and specification packages.
%

\global\edef\upm@package@docclazz@ver{2007/07/03}

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{upmethodology-document}[\upm@package@docclazz@ver]

\DeclareOption{twoside}{%
  \PassOptionsToClass{twoside,openright}{book}
}
\DeclareOption{oneside}{%
  \PassOptionsToClass{oneside}{book}
}

\DeclareOption{french}{%
  \PassOptionsToClass{french}{book}
  \PassOptionsToPackage{french}{upmethodology-document}
}
\DeclareOption{francais}{%
  \PassOptionsToClass{french}{book}
  \PassOptionsToPackage{french}{upmethodology-document}
}
\DeclareOption{english}{%
  \PassOptionsToClass{english}{book}
  \PassOptionsToPackage{english}{upmethodology-document}
}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ExecuteOptions{oneside}
\ProcessOptions

\PassOptionsToClass{a4paper,11pt}{book}
\LoadClass{book}

\RequirePackage{a4wide}
\RequirePackage{fancyhdr}

\RequirePackage{upmethodology-document}
\RequirePackage{upmethodology-frontpage}

\pdfpageheight=29.7cm
\pdfpagewidth=21.0cm

%----------------------------------------
% HEADERS AND FOOTERS
%----------------------------------------

\def\upm@header@fmt#1{\textsc{\scriptsize #1}}
\def\upm@copyright@fmt#1{\textsc{\tiny #1}}

\pagestyle{fancyplain}

\newdimen{\upm@smalllogo@height}
\upm@smalllogo@height=1cm

\if@twoside



\lhead[\includegraphics[height=\upm@smalllogo@height]{\theupmsmalldoclogo}]{\fancyplain{}{\upm@header@fmt{\theupmfulldocname}}}
\chead{}
\rhead[\fancyplain{}{\upm@header@fmt{\theupmfulldocname}}]{\includegraphics[height=\upm@smalllogo@height]{\theupmsmalldoclogo}}
\lfoot[\upm@header@fmt{\thepage}]{\upm@copyright@fmt{\theupmdocref~\copyright~\upmcopyrightdate~\theupmpublisher}}
\cfoot{}
\rfoot[\upm@copyright@fmt{\tiny\theupmdocref~\copyright~\upmcopyrightdate~\theupmpublisher}]{\upm@header@fmt{\thepage}}

\else

\lhead{\fancyplain{}{\upm@header@fmt{\theupmfulldocname}}}
\chead{}
\rhead{\includegraphics[height=\upm@smalllogo@height]{\theupmsmalldoclogo}}
\lfoot{\upm@copyright@fmt{\tiny\theupmdocref~\copyright~\upmcopyrightdate~\theupmpublisher}}
\cfoot{}
\rfoot{\upm@header@fmt{\thepage}}

\fi

%----------------------------------------
% AUTO-GENERATED DOCUMENT
%----------------------------------------

\AtBeginDocument{
	\maketitle
	\thispagestyle{plain}\upmdocumentsummary\upmdocumentauthors\upmdocumentvalidators\upmdocumentinformedpeople\vfill\upmhistory\cleardoublepage
	\sloppy
}

\endinput