summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty')
-rw-r--r--Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty494
1 files changed, 305 insertions, 189 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty
index ed3e10d6d51..11a2a30eb7b 100644
--- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty
+++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty
@@ -1,6 +1,6 @@
% Package for Unified Process Methodology's documents
%
-% 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,6 +19,20 @@
%
% Creation date: 2006-04-20
% Modifications:
+% 2009-11-03 Add star-ed macros for author, informed people
+% and validator addition macros.
+% 2009-10-30 Add "book", "report" and "article" support.
+% Allow to override the default document font.
+% 2009-10-28 Configure hyperref: add \setpdfcolor.
+% 2009-10-27 Clean the extension API.
+% Fixing document synoptic.
+% 2009-10-25 Add abstract and keywords.
+% 2009-10-25 Add abstract and keywords.
+% 2009-10-24 Move extensions inside a dedicated package.
+% 2009-10-23 Add front/back pages in extensions.
+% Add \if commands on the extension's values.
+% 2008-06-24 Add automatic watermarks.
+% 2007-07-05 Add people name formatting function.
% 2007-07-05 Add people name formatting function.
% 2007-07-03 Add extension feature.
% 2007-03-19 Add localization.
@@ -28,17 +42,19 @@
% Add sectioning commands.
%
-\global\edef\upm@package@doc@ver{2007/07/03}
+\global\edef\upm@package@doc@ver{2009/11/03}
\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\upm@lang@@lang@{english}%
+ \gdef\upmcurrentlang{english}%
\gdef\upm@lang@project{Project}%
\gdef\upm@lang@document{Document}%
\gdef\upm@lang@docref{Reference}%
@@ -50,12 +66,21 @@
\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 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.}
+ \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\upm@lang@@lang@{french}%
+ \gdef\upmcurrentlang{french}%
\gdef\upm@lang@project{Projet}%
\gdef\upm@lang@document{Document}%
\gdef\upm@lang@docref{R\'ef\'erence}%
@@ -64,24 +89,30 @@
\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
%----------------------------------------
-\newif\ifupm@document@langset\upm@document@langsetfalse
\DeclareOption{french}{%
\upm@document@lang@french
- \upm@document@langsettrue
}
\DeclareOption{francais}{%
\upm@document@lang@french
- \upm@document@langsettrue
}
\DeclareOption{english}{%
\upm@document@lang@english
@@ -91,36 +122,13 @@
\upm@lang@@
-\ifupm@document@langset\else\PassOptionsToPackage{english}{babel}\fi
-\RequirePackage{babel}
-\RequirePackage{ifthen}
-\RequirePackage{xspace}
-\RequirePackage{graphicx}
+\RequirePackage[\upmcurrentlang]{babel}
\RequirePackage{vmargin}
-\RequirePackage{url}
-\RequirePackage[pdftex]{thumbpdf} % PDF thumbail
-\RequirePackage[pdftex=true,
- pdfpagelayout = useoutlines,
- bookmarks,
- bookmarksopen = true,
- bookmarksnumbered = true,
- breaklinks = true,
- linktocpage,
- %backref, % Ecrit le lieu citation (lien) ds la biblio
- linkcolor = blue,
- urlcolor = blue,
- citecolor = blue,
- anchorcolor = blue,
- hyperindex = true,
- hyperfigures
- ]{hyperref}
-\urlstyle{sf}
+\RequirePackage{upmethodology-extension}
\RequirePackage{upmethodology-fmt}
\RequirePackage{upmethodology-version}
-\def\upm@ifnotempty#1{\ifthenelse{\equal{#1}{\@empty}}{}}
-
%----------------------------------------
% DOCUMENT MANAGEMENT
%----------------------------------------
@@ -149,16 +157,74 @@
% Display the summary of the document
%\upmdocumentsummary[width]
\newcommand{\upmdocumentsummary}[1][\linewidth]{%
- \noindent\begin{mtabular}[#1]{5}{|X|X|c|c|c|}%
+ \noindent\begin{mtabular}[#1]{2}{|l|X|}%
\tabulartitle{\upm@lang@document@summary}%
- \tabularheader{\upm@lang@project}{\upm@lang@document}{\upm@lang@docref}{\upm@lang@version}{\upm@lang@lastupdate}%
- \hline
- \theupmproject\upm@ifnotempty{\theupmsubproject}{ -- \theupmsubproject} & \theupmdocname & \theupmdocref & \theupmversion & \theupmdate \\
+ \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}{
+ \if@twoside%
+ \ifodd\thepage%
+ \setcounter{page}{-1}%
+ \else%
+ \setcounter{page}{0}%
+ \fi%
+ \else%
+ \setcounter{page}{0}%
+ \fi%
+ \thispagestyle{plain}
+ \upmdocumentsummary\upmdocumentauthors\upmdocumentvalidators\upmdocumentinformedpeople\vfill\upmhistory\clearpage%
+}
+
+%-----
+% Display the publication pag for the document
+%\upmpublicationpage
+\newcommand{\upmpublicationpage}{
+ \setcounter{page}{0}%
+ \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}
@@ -177,27 +243,56 @@
%-----
%Name of the logo
-\def\theupmsmalldoclogo{smalllogo}
-\def\theupmdoclogo{logo}
+\newcommand{\theupmsmalldoclogo}{\Get{smalllogo}}
+\newcommand{\theupmdoclogo}{\Get{logo}}
%-----
% Define the name of the logo picture to use
-\newcommand{\defupmsmalllogo}[1]{\global\edef\theupmsmalldoclogo{#1}}
-\newcommand{\defupmlogo}[1]{\global\edef\theupmdoclogo{#1}}
+\newcommand{\defupmsmalllogo}[1]{\Set{smalllogo}{#1}}
+\newcommand{\defupmlogo}[1]{\Set{logo}{#1}}
%-----
%Full name of the document
\def\theupmfulldocname{%
\theupmproject%
- \upm@ifnotempty{\theupmsubproject}{/\theupmsubproject}%
- \upm@ifnotempty{\theupmdocname}{ -- \theupmdocname}%
+ \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{}
@@ -205,30 +300,61 @@
%-----
%Add an author
%\addauthor[email]{firstname}{name}
-\newcommand{\addauthor}[3][]{%
- \global\protected@edef\theauthorlist{\theauthorlist\protect\upm@ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#3}{~}}
- \global\protected@edef\upm@document@author@tab{\upm@document@author@tab \protect\upmmakename{#2}{#3}{~} &
- \protect\upm@ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
+%\addauthor*[email]{firstname}{name}{comment}
+\def\addauthor{\@ifstar\upm@document@addauthorstar\upm@document@addauthor}
+\newcommand{\upm@document@addauthor}[3][]{%
+ \global\protected@edef\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][]{%
+ \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]{%
- \upm@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}}%
+ \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{}
@@ -236,38 +362,74 @@
%-----
%Add a validator
%\addvalidator[email]{firstname}{name}
-\newcommand{\addvalidator}[3][]{%
- \global\protected@edef\thevalidatorlist{\thevalidatorlist\protect\upm@ifnotempty{\thevalidatorlist}{,} \protect\upmmakename{#2}{#3}{~}}
- \global\protected@edef\upm@document@validator@tab{\upm@document@validator@tab \protect\upmmakename{#2}{#3}{~} &
- \protect\upm@ifnotempty{#1}{\protect\href{mailto:#1}{#1}} & \protect\\}
+%\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]{%
- \upm@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}}%
+ \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
-%\addvalidator[email]{firstname}{name}
-\newcommand{\addauthorvalidator}[3][]{%
+%\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{}
@@ -275,161 +437,115 @@
%-----
%Add an informed
%\addinformed[email]{firstname}{name}
-\newcommand{\addinformed}[3][]{%
- \global\protected@edef\theinformedlist{\theinformedlist\protect\upm@ifnotempty{\theinformedlist}{,} \protect\upmmakename{#2}{#3}{~}}
- \global\protected@edef\upm@document@informed@tab{\upm@document@informed@tab \protect\upmmakename{#2}{#3}{~} &
- \protect\upm@ifnotempty{#1}{\protect\href{mailto:#1}{#1}} \protect\\}
+%\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]{%
- \upm@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}}%
+ \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
+% PUBLISHER, COPYRIGHT, PRINTING...
%----------------------------------------
-\gdef\theupmpublisher{Arakhn\^e.org Group}
+\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]{%
- \gdef\theupmpublisher{#1}%
-}
+\newcommand{\setpublisher}[1]{\Set{publisher}{#1}}
-%----------------------------------------
-% DOCUMENT SECTIONS
-%----------------------------------------
-
-\gdef\upm@document@section@alignment{}
-
-%-----
-% Part without number but inside the TOC
-%\parttoc [toctitle]{title} % left-alignment inside TOC
-%\parttoc*[toctitle]{title} % right-alignment inside TOC
-\def\parttoc{\@ifstar%
- {\gdef\upm@document@section@alignment{\protect\numberline{}}\expandafter\upm@document@section@part}%
- {\gdef\upm@document@section@alignment{}\expandafter\upm@document@section@part}}
-\def\upm@document@section@part{\@ifnextchar [%
- {\expandafter\upm@document@section@part@opt}%
- {\expandafter\upm@document@section@part@nopt}}
-\def\upm@document@section@part@opt[#1]#2{%
- \part*{#2\addcontentsline{toc}{part}{\upm@document@section@alignment{#1}}}%
- \chaptermark{}%
-}
-\def\upm@document@section@part@nopt#1{%
- \part*{#1\addcontentsline{toc}{part}{\upm@document@section@alignment{#1}}}%
- \chaptermark{}%
-}
+%-----
+%Set the copyrighter identity
+%\setcopyrighter{name}
+\newcommand{\setcopyrighter}[1]{\Set{copyrighter}{#1}}
%-----
-% Chapter without number but inside the TOC
-%\chaptertoc [toctitle]{title} % left-alignment inside TOC
-%\chaptertoc*[toctitle]{title} % right-alignment inside TOC
-\def\chaptertoc{\@ifstar%
- {\gdef\upm@document@section@alignment{\protect\numberline{}}\expandafter\upm@document@section@chapter}%
- {\gdef\upm@document@section@alignment{}\expandafter\upm@document@section@chapter}}
-\def\upm@document@section@chapter{\@ifnextchar [%
- {\expandafter\upm@document@section@chapter@opt}%
- {\expandafter\upm@document@section@chapter@nopt}}
-\def\upm@document@section@chapter@opt[#1]#2{%
- \@schapter{#2\addcontentsline{toc}{chapter}{\upm@document@section@alignment{#1}}}%
- \chaptermark{#1}%
-}
-\def\upm@document@section@chapter@nopt#1{%
- \@schapter{#1\addcontentsline{toc}{chapter}{\upm@document@section@alignment{#1}}}%
- \chaptermark{#1}%
-}
+%Set the address where this document is printed
+%\setprintingaddress{address}
+\newcommand{\setprintingaddress}[1]{\Set{printedin}{#1}}
%-----
-% Section without number but inside the TOC
-%\sectiontoc [toctitle]{title} % left-alignment inside TOC
-%\sectiontoc*[toctitle]{title} % right-alignment inside TOC
-\def\sectiontoc{\@ifstar%
- {\gdef\upm@document@section@alignment{\protect\numberline{}}\expandafter\upm@document@section@section}%
- {\gdef\upm@document@section@alignment{}\expandafter\upm@document@section@section}}
-\def\upm@document@section@section{\@ifnextchar [%
- {\expandafter\upm@document@section@section@opt}%
- {\expandafter\upm@document@section@section@nopt}}
-\def\upm@document@section@section@opt[#1]#2{%
- \section*{#2\addcontentsline{toc}{section}{\upm@document@section@alignment{#1}}}%
-}
-\def\upm@document@section@section@nopt#1{%
- \section*{#1\addcontentsline{toc}{section}{\upm@document@section@alignment{#1}}}%
+%Set the ISBN
+%\setisbn{isbn}
+\newcommand{\setisbn}[1]{%
+ \gdef\theupmisbn{#1}%
}
%-----
-% Subsection without number but inside the TOC
-%\subsectiontoc [toctitle]{title} % left-alignment inside TOC
-%\subsectiontoc*[toctitle]{title} % right-alignment inside TOC
-\def\subsectiontoc{\@ifstar%
- {\gdef\upm@document@section@alignment{\protect\numberline{}}\expandafter\upm@document@section@subsection}%
- {\gdef\upm@document@section@alignment{}\expandafter\upm@document@section@subsection}}
-\def\upm@document@section@subsection{\@ifnextchar [%
- {\expandafter\upm@document@section@subsection@opt}%
- {\expandafter\upm@document@section@subsection@nopt}}
-\def\upm@document@section@subsection@opt[#1]#2{%
- \subsection*{#2\addcontentsline{toc}{subsection}{\upm@document@section@alignment{#1}}}%
-}
-\def\upm@document@section@subsection@nopt#1{%
- \subsection*{#1\addcontentsline{toc}{subsection}{\upm@document@section@alignment{#1}}}%
+%Set the ISSN
+%\setisbn{issn}
+\newcommand{\setissn}[1]{%
+ \gdef\theupmissn{#1}%
}
%-----
-% Subsubsection without number but inside the TOC
-%\subsubsectiontoc [toctitle]{title} % left-alignment inside TOC
-%\subsubsectiontoc*[toctitle]{title} % right-alignment inside TOC
-\def\subsubsectiontoc{\@ifstar%
- {\gdef\upm@document@section@alignment{\protect\numberline{}}\expandafter\upm@document@section@subsubsection}%
- {\gdef\upm@document@section@alignment{}\expandafter\upm@document@section@subsubsection}}
-\def\upm@document@section@subsubsection{\@ifnextchar [%
- {\expandafter\upm@document@section@subsubsection@opt}%
- {\expandafter\upm@document@section@subsubsection@nopt}}
-\def\upm@document@section@subsubsection@opt[#1]#2{%
- \subsubsection*{#2\addcontentsline{toc}{subsubsection}{\upm@document@section@alignment{#1}}}%
-}
-\def\upm@document@section@subsubsection@nopt#1{%
- \subsubsection*{#1\addcontentsline{toc}{subsubsection}{\upm@document@section@alignment{#1}}}%
+%Set the DOI
+%\setdoi{doi}
+\newcommand{\setdoi}[1]{%
+ \gdef\theupmdoi{#1}%
}
%----------------------------------------
-% EXTENSION MANAGEMENT
+% WATERMARK
%----------------------------------------
-%-----
-% Use the specified extension
-%\upmuse{extension_name}
-\newcommand{\upmuse}[1]{%
- \message{**** including upm extension #1 (upmext-#1.cfg) ****}%
- {\begingroup%
- \newcommand{\set}[3][\upm@lang@@lang@]{%
- % NORMAL LOGO
- \ifthenelse{\equal{##2}{logo}}{\defupmlogo{##3}}{%
- % SMALL LOGO
- \ifthenelse{\equal{##2}{smalllogo}}{\defupmsmalllogo{##3}}{%
- % PUBLISHER
- \ifthenelse{\equal{##2}{publisher}}{%
- \ifthenelse{\equal{\upm@lang@@lang@}{##1}}{%
- \setpublisher{##3}%
- }{}%
- % ERROR ON ATTRIBUTE
- }{%
- \errmessage{extension's value '##2' is not supported.}%
- }}}%
- }%
- \input{upmext-#1.cfg}%
- \endgroup}%
+\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