% Package for Unified Process Methodology's documents % % Copyright (c) 2006-2022 Stephane GALLAND % % 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{2022/02/10} \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\ and \LaTeX\ are a trademarks 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{main=french}% \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 purpose of this document %\setdocumentpurpose{text} \newcommand{\setdocumentpurpose}[1]{% \gdef\upm@lang@document@copyright@purpose{#1}% } %----- %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