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.sty25
1 files changed, 22 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-document.sty
index 11a2a30eb7b..37a16b49ae0 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-2009 Stephane GALLAND <galland@arakhne.org>
+% 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
@@ -19,6 +19,7 @@
%
% Creation date: 2006-04-20
% Modifications:
+% 2013-07-06 Add the macro ifdocumentauthor
% 2009-11-03 Add star-ed macros for author, informed people
% and validator addition macros.
% 2009-10-30 Add "book", "report" and "article" support.
@@ -42,7 +43,7 @@
% Add sectioning commands.
%
-\global\edef\upm@package@doc@ver{2009/11/03}
+\global\edef\upm@package@doc@ver{2013/05/06}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{upmethodology-document}[\upm@package@doc@ver]
@@ -298,12 +299,29 @@
\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][]{%
- \global\protected@edef\theauthorlist{\theauthorlist\protect\Ifnotempty{\theauthorlist}{,} \protect\upmmakename{#2}{#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\\}
@@ -314,6 +332,7 @@
\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