source: anr/anr.sty @ 67

Last change on this file since 67 was 59, checked in by coach, 15 years ago

IA: renumerotation des taches

File size: 6.4 KB
RevLine 
[21]1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2\catcode`\@=11
3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[36]6%{\catcode`\<=1\catcode`\>=2
7%       <\catcode`\{=12\gdef\OBraceTw<{>>
8%       <\catcode`\}=12\gdef\CBraceTw<}>>
9%>
10%\@ifundefined{specHasManual}{\let\specHasManual\relax}{}
11\let\specHasManual\relax
12\let\specCsgManual\relax
13
14\def\setMacroInAuxFile#1{%
15    \global\expandafter\edef\csname#1\endcsname{\name}
16    \expandafter\immediate\expandafter\write\@auxout\expandafter{\expandafter\string\expandafter\gdef\expandafter\string\csname #1\endcsname{\name}}
17}
18\def\eoa{end-of-args}
19\def\@novers#1-#2\eoa{#1}
20\def\novers#1{\expandafter\@novers#1\eoa}
21
22%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23\let\ganttlf\relax
[35]24\newwrite\ganttdata
25\immediate\openout\ganttdata=anr.gantt
26
[21]27\def\enable{enable}
28\def\disable{disable}
29\def\leader{leader}
30\newenvironment{taskinfo}%
31{%
32\let\ALL\disable%
33\let\IRISA\disable%
34\let\LIP\disable%
35\let\TIMA\disable%
36\let\UBS\disable%
37\let\UPMC\disable%
[27]38\let\ALTERA\disable%
39\let\XILINX\disable%
[21]40\let\BULL\disable%
41\let\THALES\disable%
[49]42\let\NAVTEL\disable%
[21]43\let\ZIED\disable%
44}{%
45\ifx\ALL\enable%
46  \ifx\IRISA\disable\let\IRISA\enable\fi%
47  \ifx\LIP\disable\let\LIP\enable\fi%
48  \ifx\UPMC\disable\let\UPMC\enable\fi%
49  \ifx\TIMA\disable\let\TIMA\enable\fi%
50  \ifx\UBS\disable\let\UBS\enable\fi%
[27]51  \ifx\ALTERA\disable\let\ALTERA\enable\fi%
52  \ifx\XILINX\disable\let\XILINX\enable\fi%
[21]53  \ifx\BULL\disable\let\BULL\enable\fi%
54  \ifx\THALES\disable\let\THALES\enable\fi%
[49]55  \ifx\NAVTEL\disable\let\NAVTEL\enable\fi%
[21]56  \ifx\ZIED\disable\let\ZIED\enable\fi%
57\fi%
[27]58\def\@leader{\begin{small}\textcolor{red}{lead.}\end{small}}
59\def\@partner{\begin{small}\textcolor{blue}{part.}\end{small}}
60\def\@IRISA{\ifx\IRISA\disable{}\else\ifx\IRISA\enable{\@partner}\else{\@leader}\fi\fi}%
61\def\@LIP{\ifx\LIP\disable{}\else\ifx\LIP\enable{\@partner}\else{\@leader}\fi\fi}%
62\def\@UPMC{\ifx\UPMC\disable{}\else\ifx\UPMC\enable{\@partner}\else{\@leader}\fi\fi}%
63\def\@TIMA{\ifx\TIMA\disable{}\else\ifx\TIMA\enable{\@partner}\else{\@leader}\fi\fi}%
64\def\@UBS{\ifx\UBS\disable{}\else\ifx\UBS\enable{\@partner}\else{\@leader}\fi\fi}%
65\def\@ALTERA{\ifx\ALTERA\disable{}\else\ifx\ALTERA\enable{\@partner}\else{\@leader}\fi\fi}%
66\def\@XILINX{\ifx\XILINX\disable{}\else\ifx\ALTERA\enable{\@partner}\else{\@leader}\fi\fi}%
67\def\@BULL{\ifx\BULL\disable{}\else\ifx\BULL\enable{\@partner}\else{\@leader}\fi\fi}%
68\def\@THALES{\ifx\THALES\disable{}\else\ifx\THALES\enable{\@partner}\else{\@leader}\fi\fi}%
[49]69\def\@NAVTEL{\ifx\NAVTEL\disable{}\else\ifx\NAVTEL\enable{\@partner}\else{\@leader}\fi\fi}%
[27]70\def\@ZIED{\ifx\ZIED\disable{}\else\ifx\ZIED\enable{\@partner}\else{\@leader}\fi\fi}%
71\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}\hline
[49]72\Sirisa  & \Slip  & \Stima  & \Subs  & \Supmc  & \Saltera & \Sxilinx & \Sbull  & \Sthales & \Snavtel & \Szied \\\hline
73\@IRISA  & \@LIP  & \@TIMA  & \@UBS  & \@UPMC  & \@ALTERA & \@XILINX & \@BULL  & \@THALES & \@NAVTEL & \@ZIED \\\hline
[21]74\end{tabular}\par
75}
76
77%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78\newenvironment{objectif}%
79{\begin{description}\item[Objectives]}
80{\end{description}}
81
82%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[59]83\newcount\taskcnt\taskcnt=0
[35]84\newcount\subtaskcnt
85\newcount\livrablecnt
[52]86\newenvironment{workpackage}%
[35]87{\global\advance\taskcnt1
88 \global\subtaskcnt0
89 \def\taskname{T\the\taskcnt}%
[21]90 \begin{description}%
91 \let\itemsave\item%
92 \def\item{%
[35]93    \global\advance\subtaskcnt1
94    \def\subtaskname{S\taskname-\the\subtaskcnt}%
95    \itemsave[\subtaskname]}}
[21]96{\end{description}}
97
98%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[52]99\def\writeganttinfo#1#2#3#4#5{{%
100    \let\xcoach\relax
101    \let\xcoachplus\relax
102    \let\irisa\relax    \let\Sirisa\relax
103    \let\lip\relax      \let\Slip\relax
104    \let\tima\relax     \let\Stima\relax
105    \let\ubs\relax      \let\Subs\relax
106    \let\upmc\relax     \let\Supmc\relax
107    \let\altera\relax   \let\Saltera\relax
108    \let\xilinx\relax   \let\Sxilinx\relax
109    \let\bull\relax     \let\Sbull\relax
110    \let\thales\relax   \let\Sthales\relax
111    \let\zied\relax     \let\Szied\relax
112    \let\navtel\relax   \let\Snavtel\relax
113    \immediate\write\ganttdata{%
114      T=\the\taskcnt\space S=\the\subtaskcnt\space%
115      D=\the\livrablecnt\space V=\vers\space%
116      BM=#1 EM=#2 R=#3 PART={#4} TITLE=#5%
117    }
118}}
[21]119\newenvironment{livrable}%
120{%
[52]121 \newcount\verscnt\verscnt=-1
122 \newif\ifIsLivrableStarted\IsLivrableStartedfalse
[49]123 \newif\ifLivrableTopLine\LivrableTopLinetrue
124 \def\livrableTableDef{\begin{tabular}{|c|c|c|c|p{.625\linewidth}|}\hline}
125 \def\livrableTableLine##1##2##3##4{%
126    \makebox[3.5em]{\begin{small}##1\end{small}} &
127    \makebox[2.2em]{\begin{small}##2\end{small}} &
128    \makebox[1.5em]{\begin{small}##3\end{small}} &
129    \makebox[2.2em]{\begin{small}##4\end{small}} &
130 }
131 \def\livrableTableTopLine{%
132   \livrableTableLine{number}{date}{type}{resp.} description
133 }
[35]134 \livrablecnt-1
[49]135 \ifvmode\else\vspace{.75ex}\\\fi
[52]136   
137 \def\itemV##1##2##3##4##5{%
138    \ifIsLivrableStarted
139        \global\advance\verscnt1
140    \else
141        \global\advance\livrablecnt1
142        \global\verscnt1
143    \fi
144    \def\vers{V\the\verscnt}
[35]145    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
[52]146    \writeganttinfo{##1}{##2}{none}{##4}{##5}
[21]147    \\\hline
[49]148    \ifLivrableTopLine
[52]149      \ifIsLivrableStarted\else\hline\hline\fi
[49]150    \else
[52]151      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
[49]152    \fi
153    \global\LivrableTopLinefalse
[52]154    \global\IsLivrableStartedtrue
155    %\global\LivrableStartfalse
[49]156    \livrableTableLine%
157        {\textsc{\name}}%
[52]158        {\textsc{T0+##2}}%
159        {\textsc{##3}}%
[49]160        {\textsc{##4}}%
[21]161 }
[52]162 \def\itemL##1##2##3##4##5##6{%
163    \ifIsLivrableStarted
164        %\global\advance\verscnt1
165    \else
166        \global\advance\livrablecnt1
167        %\global\verscnt1
168    \fi
169    \def\vers{VF}
170    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
171    \writeganttinfo{##1}{##2}{##6}{##4}{##5}
172    \\\hline
173    \ifLivrableTopLine
174      \ifIsLivrableStarted\else\hline\hline\fi
175    \else
176      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
177    \fi
178    \global\LivrableTopLinefalse
179    \global\IsLivrableStartedfalse
180    %\global\LivrableStartfalse
181    \livrableTableLine%
182        {\textsc{\name}}%
183        {\textsc{T0+##2}}%
184        {\textsc{##3}}%
185        {\textsc{##4}}%
186 }
[21]187% \begin{small}
[49]188 \livrableTableDef
189 \livrableTableTopLine
190 %\begin{tabular}{|c|c|c|c|p{.55\linewidth}|}\hline%
191 %\makebox[3.5em]{number} & \makebox[1.5em]{date} & type & resp. & description
[21]192}
[49]193{\\\hline\end{tabular}\\%
[21]194%\end{small}\\%
195}
196
197%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198\catcode`\@=12
199%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.