]> AND Private Git Repository - ThesisAli.git/blob - upmethodology-document.sty
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
update 3
[ThesisAli.git] / upmethodology-document.sty
1 % Package for Unified Process Methodology's documents
2 %
3 % Copyright (c) 2006-2013 Stephane GALLAND <galland@arakhne.org>
4
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.
9 %
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.
14 %
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.
19
20 \global\edef\upm@package@doc@ver{2013/09/29}
21
22 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
23 \ProvidesPackage{upmethodology-document}[\upm@package@doc@ver]
24
25 \RequirePackage{upmethodology-p-common}
26
27 %----------------------------------------
28 % LOCALES
29 %----------------------------------------
30 \def\upm@document@lang@english{%
31   \gdef\upm@lang@@{\message{**** upmethodology-document is using English language ****}}%
32   \gdef\upmcurrentlang{english}%
33   \gdef\upmcurrentlangforbabel{english}%
34   \gdef\upm@lang@project{Project}%
35   \gdef\upm@lang@document{Document}%
36   \gdef\upm@lang@docref{Reference}%
37   \gdef\upm@lang@lastupdate{Last Update}%
38   \gdef\upm@lang@lastupdate@short{Updated}%
39   \gdef\upm@lang@document@summary{Document Summary}%
40   \gdef\upm@lang@status{Status}%
41   \gdef\upm@lang@document@authors{Authors}%
42   \gdef\upm@lang@document@informed{Informed People}%
43   \gdef\upm@lang@document@validators{Validators}%
44   \gdef\upm@lang@document@names{Names}%
45   \gdef\upm@lang@document@comments{Comments}%
46   \gdef\upm@lang@document@emails{Emails}%
47   \gdef\upm@lang@document@initials{Initials}%
48   \gdef\upm@lang@document@abstract{Abstract}%
49   \gdef\upm@lang@document@keywords{Key-words}%
50   \gdef\upm@lang@document@copyright@purpose{This document describes the \theupmproject\ project\Ifnotempty{\theupmsubproject}{ and its \theupmsubproject\ subproject}.}%
51   \gdef\upm@lang@document@copyright@tex{\TeX\ is a trademark of the American Mathematical Society.}%
52   \gdef\upm@lang@document@copyright@upmethodology{\texttt{tex-upmethodology} is owned by St\'ephane Galland, \arakhneorg, France.}%
53   \gdef\upm@lang@document@copyright@madewith{This document was realised with \LaTeX\ and \texttt{tex-upmethodology}.}%
54   \gdef\upm@lang@document@copyright@trademarks{This document is published by the \theupmformattedpublisher. All right reserved. No part of this publication may be reproduced, stored in a retreival system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publishers.}
55   \gdef\upm@lang@document@copyright@printedin{Printed in \theupmprintedin.}
56 }
57 \def\upm@document@lang@french{%
58   \gdef\upm@lang@@{\message{**** upmethodology-document is using French language ****}}%
59   \gdef\upmcurrentlang{french}%
60   \gdef\upmcurrentlangforbabel{frenchb}%
61   \gdef\upm@lang@project{Projet}%
62   \gdef\upm@lang@document{Document}%
63   \gdef\upm@lang@docref{R\'ef\'erence}%
64   \gdef\upm@lang@lastupdate{Derni\`ere modification}%
65   \gdef\upm@lang@lastupdate@short{Modifi\'e}%
66   \gdef\upm@lang@document@summary{Synoptique}%
67   \gdef\upm@lang@status{Statut}%
68   \gdef\upm@lang@document@authors{Auteurs}%
69   \gdef\upm@lang@document@comments{Commentaires}%
70   \gdef\upm@lang@document@informed{Pour information}%
71   \gdef\upm@lang@document@validators{Validateurs}%
72   \gdef\upm@lang@document@names{Noms}%
73   \gdef\upm@lang@document@emails{Emails}%
74   \gdef\upm@lang@document@initials{Initiales}%
75   \gdef\upm@lang@document@abstract{R\'esum\'e}%
76   \gdef\upm@lang@document@keywords{Mots-cl\'es}%
77   \gdef\upm@lang@document@copyright@purpose{Ce document d\'ecrit le projet \theupmproject\Ifnotempty{\theupmsubproject}{ et son sous-projet \theupmsubproject}.}%
78   \gdef\upm@lang@document@copyright@tex{\TeX\ et \LaTeX\ sont des marques de la Soci\'et\'e Am\'ericaine de Math\'ematiques.}%
79   \gdef\upm@lang@document@copyright@upmethodology{\texttt{tex-upmethodology} est la propri\'et\'e de St\'ephane Galland, \arakhneorg, France.}%
80   \gdef\upm@lang@document@copyright@madewith{Ce document a \'et\'e r\'ealis\'e avec \LaTeX\ et \texttt{tex-upmethodology}.}%
81   \gdef\upm@lang@document@copyright@trademarks{Ce document est publi\'e par \theupmformattedpublisher. Tous droits r\'eserv\'es. \par Le Code de la propri\'et\'e intellectuelle n'autorisant, aux termes de l'article L.122-5, 2\textdegree et 3\textdegree a), d'une part, que les ``copies ou reproductions strictement r\'eserv\'ees \`a l'usage priv\'e du copiste et non destin\'ees \`a une utilisation collective'' et, d'autre part, que les analyses et les courtes citations dans un but d'exemple et d'illustation, ``toute repr\'esentation ou reproduction int\'egrale ou partielle faite sans le consentement de l'auteur ou de ses ayants droit ou ayants cause est illicite'' (art. L.122-4). \par Cette repr\'esentation ou reproduction, par quelque proc\'ed\'e que ce soit, constiturait donc une contrefa\c{c}on sanctionn\'ee par les articles L.335-2 et suivants du Code de la propri\'et\'e intellectuelle.}
82   \gdef\upm@lang@document@copyright@printedin{Imprim\'e en \theupmprintedin.}
83   
84 }
85
86 %----------------------------------------
87 % OPTIONS
88 %----------------------------------------
89 \DeclareOption{french}{%
90   \upm@document@lang@french
91 }
92 \DeclareOption{francais}{%
93   \upm@document@lang@french
94 }
95 \DeclareOption{english}{%
96   \upm@document@lang@english
97 }
98 \ExecuteOptions{english}
99 \ProcessOptions
100
101 {\upm@lang@@}
102
103 \RequirePackage[\upmcurrentlangforbabel]{babel}
104 \RequirePackage{vmargin}
105
106 \RequirePackage{upmethodology-extension}
107 \RequirePackage{upmethodology-fmt}
108 \RequirePackage{upmethodology-version}
109
110 %----------------------------------------
111 % Ensure that frenchb (included by babel)
112 % does not use compact versions of lists 
113 % in french mode.
114 %----------------------------------------
115
116 \newlength\listendskip
117 \listendskip=\parskip
118
119
120 %----------------------------------------
121 % DOCUMENT MANAGEMENT
122 %----------------------------------------
123
124 %-----
125 % Declare a project's document
126 %\declaredocument{project}{name}{ref}
127 \newcommand{\declaredocument}[3]{%
128         \gdef\theupmproject{#1}%
129         \gdef\theupmsubproject{}%
130         \gdef\theupmdocname{#2}%
131         \gdef\theupmdocref{#3}%
132 }
133
134 %-----
135 % Declare a project's document
136 %\declaredocumentex{project}{subproject}{name}{ref}
137 \newcommand{\declaredocumentex}[4]{%
138         \gdef\theupmproject{#1}%
139         \gdef\theupmsubproject{#2}%
140         \gdef\theupmdocname{#3}%
141         \gdef\theupmdocref{#4}%
142 }
143
144 %-----
145 % Display the summary of the document
146 %\upmdocumentsummary[width]
147 \newcommand{\upmdocumentsummary}[1][\linewidth]{%
148         \noindent\begin{mtabular}[#1]{2}{|l|X|}%
149         \tabulartitle{\upm@lang@document@summary}%
150         \upm@lang@project & \theupmproject\Ifnotempty{\theupmsubproject}{ -- \theupmsubproject} \\
151         \upm@lang@document & \theupmdocname \\
152         \upm@lang@docref & \theupmdocref \\
153         \upm@lang@version & \theupmversion \\
154         \upm@lang@lastupdate & \theupmdate \\
155         \hline
156         \end{mtabular}\par\vspace{.5cm}%
157 }
158
159 %-----
160 % Display the the document information on a page
161 %\upmpublicationpage
162 \newcommand{\upmdocinfopage}{
163         \thispagestyle{plain}
164         \upmdocumentsummary\upmdocumentauthors\upmdocumentvalidators\upmdocumentinformedpeople\vfill\upmhistory\clearpage%
165 }
166
167 %-----
168 % Display the publication pag for the document
169 %\upmpublicationpage
170 \newcommand{\upmpublicationpage}{
171         \thispagestyle{empty}%
172         \upmpublicationminipage%
173 }
174 \newcommand{\upmpublicationminipage}{
175         \if@twoside\ifodd\c@page\clearpage\fi\fi%
176         \mbox{}\vfill\small%
177         \par\noindent
178         \upm@lang@document@copyright@purpose
179         \vspace{.5cm}
180         \par\noindent
181         \upm@lang@document@copyright@tex
182         \par\noindent
183         \upm@lang@document@copyright@upmethodology
184         \vspace{.5cm}
185         \par\noindent
186         \Get{trademarks}
187         \vspace{4cm}
188         \par\noindent
189         \upm@lang@document@copyright@madewith
190         \vspace{.15cm}
191         \par\noindent
192         Copyright~\copyright~\upmcopyrightdate~\theupmformattedcopyrighter.
193         \vspace{.15cm}
194         \par\noindent
195         \upm@lang@document@copyright@trademarks \Ifdefined{printed}{\upm@lang@document@copyright@printedin}
196         \vspace{.25cm}
197         \par\noindent
198         \upm@lang@docref~: \theupmdocref \\
199         \Ifnotempty{\theupmisbn}{ISBN~:~\theupmisbn\\}
200         \Ifnotempty{\theupmissn}{ISSN~:~\theupmissn\\}
201         \Ifnotempty{\theupmdoi}{DOI~:~\theupmdoi\\}
202         \clearpage%
203 }
204
205 %-----
206 %Name of the project for which this document was written
207 \def\theupmproject{Arakhn\^e Project}
208
209 %-----
210 %Name of the sub-project for which this document was written
211 \def\theupmsubproject{}
212
213 %-----
214 %Name of the document
215 \def\theupmdocname{Arakhn\^e Document}
216
217 %-----
218 %Reference of the document
219 \def\theupmdocref{XXX}
220
221
222 %-----
223 %Name of the logo
224 \newcommand{\theupmsmalldoclogo}{\Get{smalllogo}}
225 \newcommand{\theupmdoclogo}{\Get{logo}}
226
227 %-----
228 % Define the name of the logo picture to use
229 \newcommand{\defupmsmalllogo}[1]{\Set{smalllogo}{#1}}
230 \newcommand{\defupmlogo}[1]{\Set{logo}{#1}}
231
232 %-----
233 %Full name of the document
234 \def\theupmfulldocname{%
235         \theupmproject%
236         \Ifnotempty{\theupmsubproject}{/\theupmsubproject}%
237         \Ifnotempty{\theupmdocname}{ -- \theupmdocname}%
238 }
239
240 %-----
241 % Declare a document's abstract
242 %\setdocabstract[lang]{text}
243 \newcommand{\setdocabstract}[2][\upmcurrentlang]{%
244         \ifthenelse{\equal{#1}{\upmcurrentlang}}{
245                 \gdef\theupmdocabstract{#2}}{}% 
246         \global\@namedef{theupmdocabstract#1}{#2}%
247 }
248
249 %-----
250 % Declare a document's key-words
251 %\setdockeywords[lang]{words}
252 \newcommand{\setdockeywords}[2][\upmcurrentlang]{%
253         \ifthenelse{\equal{#1}{\upmcurrentlang}}{
254                 \gdef\theupmdockeywords{#2}}{}% 
255         \global\@namedef{theupmdockeywords#1}{#2}%
256 }
257
258 %-----
259 %Abstract of the document
260 \def\theupmdocabstract{}
261
262 %-----
263 %Key-words of the document
264 \def\theupmdockeywords{}
265
266 %----------------------------------------
267 % AUTHOR MANAGEMENT
268 %----------------------------------------
269
270 \newif\ifupm@document@author@tab@hascomment
271 \upm@document@author@tab@hascommentfalse
272 \def\upm@document@author@tab{}
273 \def\upm@document@author@tab@commented{}
274
275 %-----
276 \def\theauthorlist{}
277
278 %-----
279 \newif\ifupm@document@author@isauthor
280 \gdef\upm@document@author@authornames{}
281 \newcommand{\ifdocumentauthor}[3]{%
282         \upm@document@author@isauthorfalse%
283         \@for\upm@document@author@isauthor@tmp:=\upm@document@author@authornames\do{%
284                 \ifupm@document@author@isauthor%
285                 \else%
286                         \ifthenelse{\equal{#1}{\upm@document@author@isauthor@tmp}}{%
287                                 \upm@document@author@isauthortrue%
288                         }{}%
289                 \fi%
290         }%
291         \ifupm@document@author@isauthor{#2}\else{#3}\fi%
292 }
293
294 %-----
295 %Add an author
296 %\addauthor[email]{firstname}{name}
297 %\addauthor*[email]{firstname}{name}{comment}
298 \def\addauthor{\@ifstar\upm@document@addauthorstar\upm@document@addauthor}
299 \newcommand{\upm@document@addauthor}[3][]{%
300         \lowercase{\xdef\upm@document@author@authornames{#3,\upm@document@author@authornames}}%
301         \protected@xdef\theauthorlist{\theauthorlist\protect\Ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#3}{~}}
302
303         \global\protected@edef\upm@document@author@tab@commented{\upm@document@author@tab@commented \protect\upmmakename{#2}{#3}{~} & 
304         & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
305
306         \ifupm@document@author@tab@hascomment\else
307                 \global\protected@edef\upm@document@author@tab{\upm@document@author@tab \protect\upmmakename{#2}{#3}{~} & 
308                 \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
309         \fi
310 }
311 \newcommand{\upm@document@addauthorstar}[4][]{%
312         \lowercase{\xdef\upm@document@author@authornames{#3,\upm@document@author@authornames}}%
313         \global\protected@edef\theauthorlist{\theauthorlist\protect\Ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#3}{~}}
314         
315         \global\let\upm@document@author@tab\relax
316
317         \global\protected@edef\upm@document@author@tab@commented{\upm@document@author@tab@commented \protect\upmmakename{#2}{#3}{~} & 
318         #4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
319
320         \upm@document@author@tab@hascommenttrue
321 }
322
323 %-----
324 % Display the summary of the authors
325 %\upmdocumentauthors[width]
326 \newcommand{\upmdocumentauthors}[1][\linewidth]{%
327         \ifupm@document@author@tab@hascomment%
328                 \Ifnotempty{\upm@document@author@tab@commented}{%
329                 \noindent\expandafter\begin{mtabular}[#1]{3}{|X|l|c|}%
330                 \tabulartitle{\upm@lang@document@authors}%
331                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}%
332                 \upm@document@author@tab@commented
333                 \hline%
334                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
335         \else%
336                 \Ifnotempty{\upm@document@author@tab}{%
337                 \noindent\expandafter\begin{mtabular}[#1]{2}{|X|c|}%
338                 \tabulartitle{\upm@lang@document@authors}%
339                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}%
340                 \upm@document@author@tab
341                 \hline%
342                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
343         \fi%
344 }
345
346 %----------------------------------------
347 % VALIDATOR MANAGEMENT
348 %----------------------------------------
349
350 \newif\ifupm@document@validator@tab@hascomment
351 \upm@document@validator@tab@hascommentfalse
352 \def\upm@document@validator@tab{}
353 \def\upm@document@validator@tab@commented{}
354
355 %-----
356 \def\thevalidatorlist{}
357
358 %-----
359 %Add a validator
360 %\addvalidator[email]{firstname}{name}
361 %\addvalidator*[email]{firstname}{name}{comment}
362 \def\addvalidator{\@ifstar\upm@document@addvalidatorstar\upm@document@addvalidator}
363 \newcommand{\upm@document@addvalidator}[3][]{%
364         \global\protected@edef\thevalidatorlist{\thevalidatorlist\protect\Ifnotempty{\thevalidatorlist}{,} \protect\upmmakename{#2}{#3}{~}}
365
366         \global\protected@edef\upm@document@validator@tab@commented{\upm@document@validator@tab@commented \protect\upmmakename{#2}{#3}{~} & 
367         & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}
368
369         \ifupm@document@validator@tab@hascomment\else
370                 \global\protected@edef\upm@document@validator@tab{\upm@document@validator@tab \protect\upmmakename{#2}{#3}{~} & 
371                 \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}
372         \fi
373 }
374 \newcommand{\upm@document@addvalidatorstar}[4][]{%
375         \global\protected@edef\thevalidatorlist{\thevalidatorlist\protect\Ifnotempty{\thevalidatorlist}{,} \protect\upmmakename{#2}{#3}{~}}
376
377         \global\let\upm@document@validator@tab\relax
378
379         \global\protected@edef\upm@document@validator@tab@commented{\upm@document@validator@tab@commented \protect\upmmakename{#2}{#3}{~} & 
380         #4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}
381
382         \upm@document@validator@tab@hascommenttrue
383 }
384
385 %-----
386 % Display the summary of the validators
387 %\upmdocumentvalidators[width]
388 \newcommand{\upmdocumentvalidators}[1][\linewidth]{%
389         \ifupm@document@validator@tab@hascomment%
390                 \Ifnotempty{\upm@document@validator@tab@commented}{%
391                 \noindent\expandafter\begin{mtabular}[#1]{4}{|X|l|c|p{3cm}|}%
392                 \tabulartitle{\upm@lang@document@validators}%
393                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}{\upm@lang@document@initials}%
394                 \upm@document@validator@tab@commented
395                 \hline%
396                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
397         \else%
398                 \Ifnotempty{\upm@document@validator@tab}{%
399                 \noindent\expandafter\begin{mtabular}[#1]{3}{|X|c|p{3cm}|}%
400                 \tabulartitle{\upm@lang@document@validators}%
401                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}{\upm@lang@document@initials}%
402                 \upm@document@validator@tab
403                 \hline%
404                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
405         \fi%
406 }
407
408
409 %-----
410 %Add an author/validator
411 %\addauthorvalidator[email]{firstname}{name}
412 %\addauthorvalidator*[email]{firstname}{name}{comment}
413 \def\addauthorvalidator{\@ifstar\upm@document@addauthorvalidatorstar\upm@document@addauthorvalidator}
414 \newcommand{\upm@document@addauthorvalidator}[3][]{%
415         \addauthor[#1]{#2}{#3}\addvalidator[#1]{#2}{#3}%
416 }
417 \newcommand{\upm@document@addauthorvalidatorstar}[4][]{%
418         \addauthor*[#1]{#2}{#3}{#4}\addvalidator*[#1]{#2}{#3}{#4}%
419 }
420
421 %----------------------------------------
422 % INFORMED MANAGEMENT
423 %----------------------------------------
424
425 \newif\ifupm@document@informed@tab@hascomment
426 \upm@document@informed@tab@hascommentfalse
427 \def\upm@document@informed@tab{}
428 \def\upm@document@informed@tab@commented{}
429
430 %-----
431 \def\theinformedlist{}
432
433 %-----
434 %Add an informed
435 %\addinformed[email]{firstname}{name}
436 %\addinformed*[email]{firstname}{name}{comment}
437 \def\addinformed{\@ifstar\upm@document@addinformedstar\upm@document@addinformed}
438 \newcommand{\upm@document@addinformed}[3][]{%
439         \global\protected@edef\theinformedlist{\theinformedlist\protect\Ifnotempty{\theinformedlist}{,} \protect\upmmakename{#2}{#3}{~}}
440
441         \global\protected@edef\upm@document@informed@tab@commented{\upm@document@informed@tab@commented \protect\upmmakename{#2}{#3}{~} & 
442         & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
443
444         \ifupm@document@informed@tab@hascomment\else
445                 \global\protected@edef\upm@document@informed@tab{\upm@document@informed@tab \protect\upmmakename{#2}{#3}{~} & 
446                 \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
447         \fi
448 }
449 \newcommand{\upm@document@addinformedstar}[4][]{%
450         \global\protected@edef\theinformedlist{\theinformedlist\protect\Ifnotempty{\theinformedlist}{,} \protect\upmmakename{#2}{#3}{~}}
451
452         \global\let\upm@document@informed@tab\relax
453
454         \global\protected@edef\upm@document@informed@tab@commented{\upm@document@informed@tab@commented \protect\upmmakename{#2}{#3}{~} & 
455         #4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
456
457         \upm@document@informed@tab@hascommenttrue
458 }
459
460 %-----
461 % Display the summary of the informed people
462 %\upmdocumentinformedpeople[width]
463 \newcommand{\upmdocumentinformedpeople}[1][\linewidth]{%
464         \ifupm@document@validator@tab@hascomment%
465                 \Ifnotempty{\upm@document@informed@tab@commented}{%
466                 \noindent\expandafter\begin{mtabular}[#1]{3}{|X|l|c|}%
467                 \tabulartitle{\upm@lang@document@informed}%
468                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}%
469                 \upm@document@informed@tab@commented
470                 \hline%
471                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
472         \else%
473                 \Ifnotempty{\upm@document@informed@tab}{%
474                 \noindent\expandafter\begin{mtabular}[#1]{2}{|X|c|}%
475                 \tabulartitle{\upm@lang@document@informed}%
476                 \tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}%
477                 \upm@document@informed@tab
478                 \hline%
479                 \expandafter\end{mtabular}\par\vspace{.5cm}}%
480         \fi%
481 }
482
483 %----------------------------------------
484 % PUBLISHER, COPYRIGHT, PRINTING...
485 %----------------------------------------
486
487 \gdef\theupmcopyrighter{\Get{copyrighter}}
488 \gdef\theupmpublisher{\Get{publisher}}
489 \gdef\theupmprintedin{\Get{printedin}}
490 \gdef\theupmisbn{}
491 \gdef\theupmissn{}
492 \gdef\theupmdoi{}
493 \gdef\theupmpublishingdate{}
494
495 \newcommand{\theupmformattedpublisher}{\Ifelsedefined{publisher}{\theupmpublisher}{\textcolor{red}{???}}}
496 \newcommand{\theupmformattedcopyrighter}{\Ifelsedefined{copyrighter}{\theupmcopyrighter}{\textcolor{red}{???}}}
497
498 %-----
499 %Set the publisher identity
500 %\setpublisher{name}
501 \newcommand{\setpublisher}[1]{\Set{publisher}{#1}}
502
503 %-----
504 %Set the copyrighter identity
505 %\setcopyrighter{name}
506 \newcommand{\setcopyrighter}[1]{\Set{copyrighter}{#1}}
507
508 %-----
509 %Set the address where this document is printed
510 %\setprintingaddress{address}
511 \newcommand{\setprintingaddress}[1]{\Set{printedin}{#1}}
512
513 %-----
514 %Set the ISBN
515 %\setisbn{isbn}
516 \newcommand{\setisbn}[1]{%
517         \gdef\theupmisbn{#1}%
518 }
519
520 %-----
521 %Set the ISSN
522 %\setisbn{issn}
523 \newcommand{\setissn}[1]{%
524         \gdef\theupmissn{#1}%
525 }
526
527 %-----
528 %Set the DOI
529 %\setdoi{doi}
530 \newcommand{\setdoi}[1]{%
531         \gdef\theupmdoi{#1}%
532 }
533
534 %----------------------------------------
535 % WATERMARK
536 %----------------------------------------
537
538 \AtBeginDocument{
539         \ifthenelse{\equal{\theupmstatus}{\upmrestricted}}{
540                 \edef\upm@doc@tmp@watermark{\uppercase{\upm@lang@restricted}}
541                 \RequirePackage{draftwatermark}
542                 \SetWatermarkText{\upm@doc@tmp@watermark}
543                 \SetWatermarkScale{\Get{watermarksize}}
544         }{}
545 }
546
547 \endinput