summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/upmethodology/src/upmethodology-document.sty
blob: c345e61553bab68e844af5ff4017b684fa740874 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
% Package for Unified Process Methodology's documents
%
% Copyright (c) 2006-2013 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.

\global\edef\upm@package@doc@ver{2015/04/24}

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

\RequirePackage{upmethodology-p-common}

%----------------------------------------
% LOCALES
%----------------------------------------
\def\upm@document@lang@english{%
  \gdef\upm@lang@@{\message{**** upmethodology-document is using English language ****}}%
  \gdef\upmcurrentlang{english}%
  \gdef\upmcurrentlangforbabel{english}%
  \gdef\upm@lang@project{Project}%
  \gdef\upm@lang@document{Document}%
  \gdef\upm@lang@docref{Reference}%
  \gdef\upm@lang@lastupdate{Last Update}%
  \gdef\upm@lang@lastupdate@short{Updated}%
  \gdef\upm@lang@document@summary{Document Summary}%
  \gdef\upm@lang@status{Status}%
  \gdef\upm@lang@document@authors{Authors}%
  \gdef\upm@lang@document@informed{Informed People}%
  \gdef\upm@lang@document@validators{Validators}%
  \gdef\upm@lang@document@names{Names}%
  \gdef\upm@lang@document@comments{Comments}%
  \gdef\upm@lang@document@emails{Emails}%
  \gdef\upm@lang@document@initials{Initials}%
  \gdef\upm@lang@document@abstract{Abstract}%
  \gdef\upm@lang@document@keywords{Key-words}%
  \gdef\upm@lang@document@copyright@purpose{This document describes the \theupmproject\ project\Ifnotempty{\theupmsubproject}{ and its \theupmsubproject\ subproject}.}%
  \gdef\upm@lang@document@copyright@tex{\TeX\ is a trademark of the American Mathematical Society.}%
  \gdef\upm@lang@document@copyright@upmethodology{\texttt{tex-upmethodology} is owned by St\'ephane Galland, \arakhneorg, France.}%
  \gdef\upm@lang@document@copyright@madewith{This document was realised with \LaTeX\ and \texttt{tex-upmethodology}.}%
  \gdef\upm@lang@document@copyright@trademarks{This document is published by the \theupmformattedpublisher. All rights 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.}
  \gdef\upm@lang@document@copyright@printedin{Printed in \theupmprintedin.}
}
\def\upm@document@lang@french{%
  \gdef\upm@lang@@{\message{**** upmethodology-document is using French language ****}}%
  \gdef\upmcurrentlang{french}%
  \gdef\upmcurrentlangforbabel{frenchb}%
  \gdef\upm@lang@project{Projet}%
  \gdef\upm@lang@document{Document}%
  \gdef\upm@lang@docref{R\'ef\'erence}%
  \gdef\upm@lang@lastupdate{Derni\`ere modification}%
  \gdef\upm@lang@lastupdate@short{Modifi\'e}%
  \gdef\upm@lang@document@summary{Synoptique}%
  \gdef\upm@lang@status{Statut}%
  \gdef\upm@lang@document@authors{Auteurs}%
  \gdef\upm@lang@document@comments{Commentaires}%
  \gdef\upm@lang@document@informed{Pour information}%
  \gdef\upm@lang@document@validators{Validateurs}%
  \gdef\upm@lang@document@names{Noms}%
  \gdef\upm@lang@document@emails{Emails}%
  \gdef\upm@lang@document@initials{Initiales}%
  \gdef\upm@lang@document@abstract{R\'esum\'e}%
  \gdef\upm@lang@document@keywords{Mots-cl\'es}%
  \gdef\upm@lang@document@copyright@purpose{Ce document d\'ecrit le projet \theupmproject\Ifnotempty{\theupmsubproject}{ et son sous-projet \theupmsubproject}.}%
  \gdef\upm@lang@document@copyright@tex{\TeX\ et \LaTeX\ sont des marques de la Soci\'et\'e Am\'ericaine de Math\'ematiques.}%
  \gdef\upm@lang@document@copyright@upmethodology{\texttt{tex-upmethodology} est la propri\'et\'e de St\'ephane Galland, \arakhneorg, France.}%
  \gdef\upm@lang@document@copyright@madewith{Ce document a \'et\'e r\'ealis\'e avec \LaTeX\ et \texttt{tex-upmethodology}.}%
  \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.}
  \gdef\upm@lang@document@copyright@printedin{Imprim\'e en \theupmprintedin.}
  
}

%----------------------------------------
% OPTIONS
%----------------------------------------
\DeclareOption{french}{%
  \upm@document@lang@french
}
\DeclareOption{francais}{%
  \upm@document@lang@french
}
\DeclareOption{english}{%
  \upm@document@lang@english
}
\ExecuteOptions{english}
\ProcessOptions*

{\upm@lang@@}

\RequirePackage[\upmcurrentlangforbabel]{babel}
\RequirePackage{vmargin}

\RequirePackage{upmethodology-extension}
\RequirePackage{upmethodology-fmt}
\RequirePackage{upmethodology-version}

%----------------------------------------
% Ensure that frenchb (included by babel)
% does not use compact versions of lists 
% in french mode.
%----------------------------------------

\newlength\listendskip
\listendskip=\parskip
\ifupmlang{french}{%
	\addto\extrasfrench{%
		\let\upm@document@enditemizeFB\enditemizeFB%
		\def\enditemizeFB{\upm@document@enditemizeFB\vspace{\listendskip}}%
		\let\upm@document@enditemizeORI\enditemizeORI%
		\def\enditemizeFB{\upm@document@enditemizeORI\vspace{\listendskip}}%
	}%
	\addto\noextrasfrench{%
		\let\upm@document@enditemizeFB\enditemizeFB%
		\def\enditemizeFB{\upm@document@enditemizeFB\vspace{\listendskip}}%
		\let\upm@document@enditemizeORI\enditemizeORI%
		\def\enditemizeFB{\upm@document@enditemizeORI\vspace{\listendskip}}%
	}%
}

%----------------------------------------
% DOCUMENT MANAGEMENT
%----------------------------------------

%-----
% Declare a project's document
%\declaredocument{project}{name}{ref}
\newcommand{\declaredocument}[3]{%
	\gdef\theupmproject{#1}%
	\gdef\theupmsubproject{}%
	\gdef\theupmdocname{#2}%
	\gdef\theupmdocref{#3}%
}

%-----
% Declare a project's document
%\declaredocumentex{project}{subproject}{name}{ref}
\newcommand{\declaredocumentex}[4]{%
	\gdef\theupmproject{#1}%
	\gdef\theupmsubproject{#2}%
	\gdef\theupmdocname{#3}%
	\gdef\theupmdocref{#4}%
}

%-----
% Display the summary of the document
%\upmdocumentsummary[width]
\newcommand{\upmdocumentsummary}[1][\linewidth]{%
	\noindent\begin{mtabular}[#1]{2}{|l|X|}%
	\tabulartitle{\upm@lang@document@summary}%
	\upm@lang@project & \theupmproject\Ifnotempty{\theupmsubproject}{ -- \theupmsubproject} \\
	\upm@lang@document & \theupmdocname \\
	\upm@lang@docref & \theupmdocref \\
	\upm@lang@version & \theupmversion \\
	\upm@lang@lastupdate & \theupmdate \\
	\hline
	\end{mtabular}\par\vspace{.5cm}%
}

%-----
% Display the the document information on a page
%\upmpublicationpage
\newcommand{\upmdocinfopage}{
	\thispagestyle{plain}
	\upmdocumentsummary\upmdocumentauthors\upmdocumentvalidators\upmdocumentinformedpeople\vfill\upmhistory\clearpage%
}

%-----
% Display the publication pag for the document
%\upmpublicationpage
\newcommand{\upmpublicationpage}{
	\thispagestyle{empty}%
	\upmpublicationminipage%
}
\newcommand{\upmpublicationminipage}{
	\if@twoside\ifodd\c@page\clearpage\fi\fi%
	\mbox{}\vfill\small%
	\par\noindent
	\upm@lang@document@copyright@purpose
	\vspace{.5cm}
	\par\noindent
	\upm@lang@document@copyright@tex
	\par\noindent
	\upm@lang@document@copyright@upmethodology
	\vspace{.5cm}
	\par\noindent
	\Get{trademarks}
	\vspace{4cm}
	\par\noindent
  	\upm@lang@document@copyright@madewith
	\vspace{.15cm}
	\par\noindent
	Copyright~\copyright~\upmcopyrightdate~\theupmformattedcopyrighter.
	\vspace{.15cm}
	\par\noindent
	\upm@lang@document@copyright@trademarks \Ifdefined{printed}{\upm@lang@document@copyright@printedin}
	\vspace{.25cm}
	\par\noindent
	\upm@lang@docref~: \theupmdocref \\
	\Ifnotempty{\theupmisbn}{ISBN~:~\theupmisbn\\}
	\Ifnotempty{\theupmissn}{ISSN~:~\theupmissn\\}
	\Ifnotempty{\theupmdoi}{DOI~:~\theupmdoi\\}
	\clearpage%
}

%-----
%Name of the project for which this document was written
\def\theupmproject{Arakhn\^e Project}

%-----
%Name of the sub-project for which this document was written
\def\theupmsubproject{}

%-----
%Name of the document
\def\theupmdocname{Arakhn\^e Document}

%-----
%Reference of the document
\def\theupmdocref{XXX}


%-----
%Name of the logo
\newcommand{\theupmsmalldoclogo}{\Get{smalllogo}}
\newcommand{\theupmdoclogo}{\Get{logo}}

%-----
% Define the name of the logo picture to use
\newcommand{\defupmsmalllogo}[1]{\Set{smalllogo}{#1}}
\newcommand{\defupmlogo}[1]{\Set{logo}{#1}}

%-----
%Full name of the document
\def\theupmfulldocname{%
	\theupmproject%
	\Ifnotempty{\theupmsubproject}{/\theupmsubproject}%
	\Ifnotempty{\theupmdocname}{ -- \theupmdocname}%
}

%-----
% Declare a document's abstract
%\setdocabstract[lang]{text}
\newcommand{\setdocabstract}[2][\upmcurrentlang]{%
	\ifthenelse{\equal{#1}{\upmcurrentlang}}{
		\gdef\theupmdocabstract{#2}}{}%	
	\global\@namedef{theupmdocabstract#1}{#2}%
}

%-----
% Declare a document's key-words
%\setdockeywords[lang]{words}
\newcommand{\setdockeywords}[2][\upmcurrentlang]{%
	\ifthenelse{\equal{#1}{\upmcurrentlang}}{
		\gdef\theupmdockeywords{#2}}{}%	
	\global\@namedef{theupmdockeywords#1}{#2}%
}

%-----
%Abstract of the document
\def\theupmdocabstract{}

%-----
%Key-words of the document
\def\theupmdockeywords{}

%----------------------------------------
% AUTHOR MANAGEMENT
%----------------------------------------

\newif\ifupm@document@author@tab@hascomment
\upm@document@author@tab@hascommentfalse
\def\upm@document@author@tab{}
\def\upm@document@author@tab@commented{}

%-----
\def\theauthorlist{}

%-----
\newif\ifupm@document@author@isauthor
\gdef\upm@document@author@authornames{}
\newcommand{\ifdocumentauthor}[3]{%
	\upm@document@author@isauthorfalse%
	\@for\upm@document@author@isauthor@tmp:=\upm@document@author@authornames\do{%
		\ifupm@document@author@isauthor%
		\else%
			\ifthenelse{\equal{#1}{\upm@document@author@isauthor@tmp}}{%
				\upm@document@author@isauthortrue%
			}{}%
		\fi%
	}%
	\ifupm@document@author@isauthor{#2}\else{#3}\fi%
}

%-----
%Add an author
%\addauthor[email]{firstname}{name}
%\addauthor*[email]{firstname}{name}{comment}
\def\addauthor{\@ifstar\upm@document@addauthorstar\upm@document@addauthor}
\newcommand{\upm@document@addauthor}[3][]{%
	\lowercase{\xdef\upm@document@author@authornames{#3,\upm@document@author@authornames}}%
	\protected@xdef\theauthorlist{\theauthorlist\protect\Ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#3}{~}}

	\global\protected@edef\upm@document@author@tab@commented{\upm@document@author@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	& \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}

	\ifupm@document@author@tab@hascomment\else
		\global\protected@edef\upm@document@author@tab{\upm@document@author@tab \protect\upmmakename{#2}{#3}{~} & 
		\protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
	\fi
}
\newcommand{\upm@document@addauthorstar}[4][]{%
	\lowercase{\xdef\upm@document@author@authornames{#3,\upm@document@author@authornames}}%
	\global\protected@edef\theauthorlist{\theauthorlist\protect\Ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#3}{~}}
	
	\global\let\upm@document@author@tab\relax

	\global\protected@edef\upm@document@author@tab@commented{\upm@document@author@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	#4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}

	\upm@document@author@tab@hascommenttrue
}

%-----
% Display the summary of the authors
%\upmdocumentauthors[width]
\newcommand{\upmdocumentauthors}[1][\linewidth]{%
	\ifupm@document@author@tab@hascomment%
		\Ifnotempty{\upm@document@author@tab@commented}{%
		\noindent\expandafter\begin{mtabular}[#1]{3}{|X|l|c|}%
		\tabulartitle{\upm@lang@document@authors}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}%
		\upm@document@author@tab@commented
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\else%
		\Ifnotempty{\upm@document@author@tab}{%
		\noindent\expandafter\begin{mtabular}[#1]{2}{|X|c|}%
		\tabulartitle{\upm@lang@document@authors}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}%
		\upm@document@author@tab
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\fi%
}

%----------------------------------------
% VALIDATOR MANAGEMENT
%----------------------------------------

\newif\ifupm@document@validator@tab@hascomment
\upm@document@validator@tab@hascommentfalse
\def\upm@document@validator@tab{}
\def\upm@document@validator@tab@commented{}

%-----
\def\thevalidatorlist{}

%-----
%Add a validator
%\addvalidator[email]{firstname}{name}
%\addvalidator*[email]{firstname}{name}{comment}
\def\addvalidator{\@ifstar\upm@document@addvalidatorstar\upm@document@addvalidator}
\newcommand{\upm@document@addvalidator}[3][]{%
	\global\protected@edef\thevalidatorlist{\thevalidatorlist\protect\Ifnotempty{\thevalidatorlist}{,} \protect\upmmakename{#2}{#3}{~}}

	\global\protected@edef\upm@document@validator@tab@commented{\upm@document@validator@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	& \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}

	\ifupm@document@validator@tab@hascomment\else
		\global\protected@edef\upm@document@validator@tab{\upm@document@validator@tab \protect\upmmakename{#2}{#3}{~} & 
		\protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}
	\fi
}
\newcommand{\upm@document@addvalidatorstar}[4][]{%
	\global\protected@edef\thevalidatorlist{\thevalidatorlist\protect\Ifnotempty{\thevalidatorlist}{,} \protect\upmmakename{#2}{#3}{~}}

	\global\let\upm@document@validator@tab\relax

	\global\protected@edef\upm@document@validator@tab@commented{\upm@document@validator@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	#4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}

	\upm@document@validator@tab@hascommenttrue
}

%-----
% Display the summary of the validators
%\upmdocumentvalidators[width]
\newcommand{\upmdocumentvalidators}[1][\linewidth]{%
	\ifupm@document@validator@tab@hascomment%
		\Ifnotempty{\upm@document@validator@tab@commented}{%
		\noindent\expandafter\begin{mtabular}[#1]{4}{|X|l|c|p{3cm}|}%
		\tabulartitle{\upm@lang@document@validators}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}{\upm@lang@document@initials}%
		\upm@document@validator@tab@commented
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\else%
		\Ifnotempty{\upm@document@validator@tab}{%
		\noindent\expandafter\begin{mtabular}[#1]{3}{|X|c|p{3cm}|}%
		\tabulartitle{\upm@lang@document@validators}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}{\upm@lang@document@initials}%
		\upm@document@validator@tab
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\fi%
}


%-----
%Add an author/validator
%\addauthorvalidator[email]{firstname}{name}
%\addauthorvalidator*[email]{firstname}{name}{comment}
\def\addauthorvalidator{\@ifstar\upm@document@addauthorvalidatorstar\upm@document@addauthorvalidator}
\newcommand{\upm@document@addauthorvalidator}[3][]{%
	\addauthor[#1]{#2}{#3}\addvalidator[#1]{#2}{#3}%
}
\newcommand{\upm@document@addauthorvalidatorstar}[4][]{%
	\addauthor*[#1]{#2}{#3}{#4}\addvalidator*[#1]{#2}{#3}{#4}%
}

%----------------------------------------
% INFORMED MANAGEMENT
%----------------------------------------

\newif\ifupm@document@informed@tab@hascomment
\upm@document@informed@tab@hascommentfalse
\def\upm@document@informed@tab{}
\def\upm@document@informed@tab@commented{}

%-----
\def\theinformedlist{}

%-----
%Add an informed
%\addinformed[email]{firstname}{name}
%\addinformed*[email]{firstname}{name}{comment}
\def\addinformed{\@ifstar\upm@document@addinformedstar\upm@document@addinformed}
\newcommand{\upm@document@addinformed}[3][]{%
	\global\protected@edef\theinformedlist{\theinformedlist\protect\Ifnotempty{\theinformedlist}{,} \protect\upmmakename{#2}{#3}{~}}

	\global\protected@edef\upm@document@informed@tab@commented{\upm@document@informed@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	& \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}

	\ifupm@document@informed@tab@hascomment\else
		\global\protected@edef\upm@document@informed@tab{\upm@document@informed@tab \protect\upmmakename{#2}{#3}{~} & 
		\protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
	\fi
}
\newcommand{\upm@document@addinformedstar}[4][]{%
	\global\protected@edef\theinformedlist{\theinformedlist\protect\Ifnotempty{\theinformedlist}{,} \protect\upmmakename{#2}{#3}{~}}

	\global\let\upm@document@informed@tab\relax

	\global\protected@edef\upm@document@informed@tab@commented{\upm@document@informed@tab@commented \protect\upmmakename{#2}{#3}{~} & 
	#4 & \protect\Ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}

	\upm@document@informed@tab@hascommenttrue
}

%-----
% Display the summary of the informed people
%\upmdocumentinformedpeople[width]
\newcommand{\upmdocumentinformedpeople}[1][\linewidth]{%
	\ifupm@document@validator@tab@hascomment%
		\Ifnotempty{\upm@document@informed@tab@commented}{%
		\noindent\expandafter\begin{mtabular}[#1]{3}{|X|l|c|}%
		\tabulartitle{\upm@lang@document@informed}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@comments}{\upm@lang@document@emails}%
		\upm@document@informed@tab@commented
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\else%
		\Ifnotempty{\upm@document@informed@tab}{%
		\noindent\expandafter\begin{mtabular}[#1]{2}{|X|c|}%
		\tabulartitle{\upm@lang@document@informed}%
		\tabularheader{\upm@lang@document@names}{\upm@lang@document@emails}%
		\upm@document@informed@tab
		\hline%
		\expandafter\end{mtabular}\par\vspace{.5cm}}%
	\fi%
}

%----------------------------------------
% PUBLISHER, COPYRIGHT, PRINTING...
%----------------------------------------

\gdef\theupmcopyrighter{\Get{copyrighter}}
\gdef\theupmpublisher{\Get{publisher}}
\gdef\theupmprintedin{\Get{printedin}}
\gdef\theupmisbn{}
\gdef\theupmissn{}
\gdef\theupmdoi{}
\gdef\theupmpublishingdate{}

\newcommand{\theupmformattedpublisher}{\Ifelsedefined{publisher}{\theupmpublisher}{\textcolor{red}{???}}}
\newcommand{\theupmformattedcopyrighter}{\Ifelsedefined{copyrighter}{\theupmcopyrighter}{\textcolor{red}{???}}}

%-----
%Set the publisher identity
%\setpublisher{name}
\newcommand{\setpublisher}[1]{\Set{publisher}{#1}}

%-----
%Set the copyrighter identity
%\setcopyrighter{name}
\newcommand{\setcopyrighter}[1]{\Set{copyrighter}{#1}}

%-----
%Set the address where this document is printed
%\setprintingaddress{address}
\newcommand{\setprintingaddress}[1]{\Set{printedin}{#1}}

%-----
%Set the ISBN
%\setisbn{isbn}
\newcommand{\setisbn}[1]{%
	\gdef\theupmisbn{#1}%
}

%-----
%Set the ISSN
%\setisbn{issn}
\newcommand{\setissn}[1]{%
	\gdef\theupmissn{#1}%
}

%-----
%Set the DOI
%\setdoi{doi}
\newcommand{\setdoi}[1]{%
	\gdef\theupmdoi{#1}%
}

%----------------------------------------
% WATERMARK
%----------------------------------------

\AtBeginDocument{
	\ifthenelse{\equal{\theupmstatus}{\upmrestricted}}{
		\edef\upm@doc@tmp@watermark{\uppercase{\upm@lang@restricted}}
		\RequirePackage{draftwatermark}
		\SetWatermarkText{\upm@doc@tmp@watermark}
		\SetWatermarkScale{\Get{watermarksize}}
	}{}
}

\endinput