summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/upmethodology/upmethodology-backpage.sty
blob: cb92463ed2d310193b932e84ac7714efb66f7cdb (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
% Back page for Unified Process Methodology
%
% Copyright (c) 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
% 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: 2009-10-22
% Modifications:
%   2009-10-30  Rename \setbacklayout to \setbackcover.
%               Add \makebackcover.
%

\global\edef\upm@package@bp@ver{2009/10/30}

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-backpage}[\upm@package@bp@ver]

\RequirePackage{upmethodology-p-common}

%-----
% Locales
\def\upm@back@lang@english{
  \gdef\upm@lang@@{\message{**** upmethodology-backpage is using English language ****}}%
}
\def\upm@back@lang@french{
  \gdef\upm@lang@@{\message{**** upmethodology-backpage is using French language ****}}%
}
%----------------------------------------
% OPTIONS
%----------------------------------------
\DeclareOption{french}{%
  \upm@back@lang@french
}
\DeclareOption{francais}{%
  \upm@back@lang@french
}
\DeclareOption{english}{%
  \upm@back@lang@english
}
\ExecuteOptions{english}
\ProcessOptions
\upm@lang@@

\RequirePackage{upmethodology-extension}

%----
% Set the back page layout as the classic layout theme
%\setbackcover{layout_name}
\newcommand{\setbackcover}[1]{%
	\ifthenelse{\equal{#1}{none}}{%
		\global\let\makebackcover\relax%
	}{%
		\errmessage{invalid back layout theme: #1}%
	}%
}
\newcommand{\setbacklayout}[1]{\errmessage{\string\setbacklayout\ is deprecated. Use \string\setbackcover}}

\setbackcover{none}

\AtEndDocument{
	\Ifdefined{backpage}{
		\gdef\makebackcover{
			\ifupmarticleformat\clearpage%
			\else
				\cleardoublepage%
				\if@twoside\thispagestyle{empty}\mbox{}\clearpage\fi
			\fi
			\thispagestyle{empty}\Get{backpage}
		}
	}
}

\endinput