source: anr/anr.sty @ 298

Last change on this file since 298 was 295, checked in by coach, 14 years ago

mise en place de jolis liens.

File size: 8.4 KB
RevLine 
[21]1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2\catcode`\@=11
3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[156]6\newlength{\desclen}
7\newlength{\yearlen}
8\newlength{\mmlen}
9
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[36]11%{\catcode`\<=1\catcode`\>=2
12%       <\catcode`\{=12\gdef\OBraceTw<{>>
13%       <\catcode`\}=12\gdef\CBraceTw<}>>
14%>
15%\@ifundefined{specHasManual}{\let\specHasManual\relax}{}
16\let\specHasManual\relax
17\let\specCsgManual\relax
[113]18\let\specXilinxOptimization\relax
[36]19
[295]20\def\eoa{end-of-args}
21\def\@@novers#1-#2\eoa{#1}
22\def\@novers#1{\ifx\relax#1\def\next{{\color{red}FIXME}}\else\def\next{\expandafter\@@novers#1\eoa}\fi\next}
23
[36]24\def\setMacroInAuxFile#1{%
[295]25        \hypertarget{#1}{}\vspace{-1.5ex}%
26        \let\@novers\relax%
27    \global\expandafter\edef\csname NOLNK#1\endcsname{\name}%
28    \global\expandafter\edef\csname #1\endcsname{\noexpand\hyperlink{#1}{\name}}%
29    \global\expandafter\edef\csname NOVERS#1\endcsname{\noexpand\hyperlink{#1}{\@novers{\name}}}%
30    \global\expandafter\edef\csname NOVL#1\endcsname{\@novers{\name}}%
31    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOLNK#1\endcsname{\name}}%
32    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname #1\endcsname{\string\hyperlink{#1}{\name}}}%
33    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVERS#1\endcsname{\string\hyperlink{#1}{\@novers{\name}}}}%
34    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVL#1\endcsname{\@novers{\name}}}%
[36]35}
36
37%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[150]38\newcount\supportercnt\supportercnt=1
39\newwrite\supporter
40\immediate\openout\supporter=anr-supporter.tex
[168]41\def\letterOfInterest#1#2{{%
42  \let\subsection\relax%
43  \let\label\relax%
44  \let\begin\relax%
45  \let\end\relax%
46  \let\includegraphics\relax%
47  \let\linewidth\relax%
48  \let\newpage\relax%
[150]49  \immediate\write\supporter{%
[168]50    \subsection{#1} \label{supp:\the\supportercnt}}%
[150]51  \immediate\write\supporter{%
[168]52    \begin{center}\includegraphics[width=0.9\linewidth]{#2}\end{center}}%
53    \newpage%
54  }%
55  #1 (page \pageref{supp:\the\supportercnt})%
56  \advance\supportercnt1%
[150]57}
[263]58\def\letterOfInterestPlus#1{{%
59  \let\begin\relax%
60  \let\end\relax%
61  \let\includegraphics\relax%
62  \let\linewidth\relax%
63  \let\newpage\relax%
64  \immediate\write\supporter{%
65    \begin{center}\includegraphics[width=0.9\linewidth]{#1}\end{center}}%
66    \newpage%
67  }%
68}
[150]69
70\def\letterOfInterestNb{?}
71\def\letterOfInterestClose{
[168]72  \advance\supportercnt-1
[150]73  \immediate\closeout\supporter
74  \immediate\write\@auxout{%
75    \string\gdef\string\letterOfInterestNb{\the\supportercnt}
76  }
77}
78
79
80%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[36]81\let\ganttlf\relax
[35]82\newwrite\ganttdata
83\immediate\openout\ganttdata=anr.gantt
84
[21]85\def\enable{enable}
86\def\disable{disable}
87\def\leader{leader}
88\newenvironment{taskinfo}%
89{%
90\let\ALL\disable%
91\let\IRISA\disable%
92\let\LIP\disable%
93\let\TIMA\disable%
94\let\UBS\disable%
95\let\UPMC\disable%
96\let\BULL\disable%
97\let\THALES\disable%
[278]98\let\MDS\disable%
[21]99}{%
100\ifx\ALL\enable%
101  \ifx\IRISA\disable\let\IRISA\enable\fi%
102  \ifx\LIP\disable\let\LIP\enable\fi%
103  \ifx\UPMC\disable\let\UPMC\enable\fi%
104  \ifx\TIMA\disable\let\TIMA\enable\fi%
105  \ifx\UBS\disable\let\UBS\enable\fi%
106  \ifx\BULL\disable\let\BULL\enable\fi%
107  \ifx\THALES\disable\let\THALES\enable\fi%
[278]108  \ifx\MDS\disable\let\MDS\enable\fi%
[21]109\fi%
[27]110\def\@leader{\begin{small}\textcolor{red}{lead.}\end{small}}
111\def\@partner{\begin{small}\textcolor{blue}{part.}\end{small}}
112\def\@IRISA{\ifx\IRISA\disable{}\else\ifx\IRISA\enable{\@partner}\else{\@leader}\fi\fi}%
113\def\@LIP{\ifx\LIP\disable{}\else\ifx\LIP\enable{\@partner}\else{\@leader}\fi\fi}%
114\def\@UPMC{\ifx\UPMC\disable{}\else\ifx\UPMC\enable{\@partner}\else{\@leader}\fi\fi}%
115\def\@TIMA{\ifx\TIMA\disable{}\else\ifx\TIMA\enable{\@partner}\else{\@leader}\fi\fi}%
116\def\@UBS{\ifx\UBS\disable{}\else\ifx\UBS\enable{\@partner}\else{\@leader}\fi\fi}%
117\def\@BULL{\ifx\BULL\disable{}\else\ifx\BULL\enable{\@partner}\else{\@leader}\fi\fi}%
118\def\@THALES{\ifx\THALES\disable{}\else\ifx\THALES\enable{\@partner}\else{\@leader}\fi\fi}%
[278]119\def\@MDS{\ifx\MDS\disable{}\else\ifx\MDS\enable{\@partner}\else{\@leader}\fi\fi}%
120\begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
121\Sirisa  & \Slip  & \Stima  & \Subs  & \Supmc  & \Smds & \Sbull  & \Sthales \\\hline
122\@IRISA  & \@LIP  & \@TIMA  & \@UBS  & \@UPMC  & \@MDS & \@BULL  & \@THALES \\\hline
[21]123\end{tabular}\par
124}
125
126%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127\newenvironment{objectif}%
128{\begin{description}\item[Objectives]}
129{\end{description}}
130
131%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[59]132\newcount\taskcnt\taskcnt=0
[35]133\newcount\subtaskcnt
134\newcount\livrablecnt
[52]135\newenvironment{workpackage}%
[35]136{\global\advance\taskcnt1
137 \global\subtaskcnt0
138 \def\taskname{T\the\taskcnt}%
[21]139 \begin{description}%
[123]140 %\let\itemsave\item%
[278]141 \def\subtask##1{%
[35]142    \global\advance\subtaskcnt1
143    \def\subtaskname{S\taskname-\the\subtaskcnt}%
[278]144    \item[\subtaskname: ##1]\mbox{}\\}}
[21]145{\end{description}}
146
147%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[151]148\def\writeganttinfo#1#2#3#4#5#6{{%
[52]149    \let\xcoach\relax
150    \let\xcoachplus\relax
151    \let\irisa\relax    \let\Sirisa\relax
152    \let\lip\relax      \let\Slip\relax
153    \let\tima\relax     \let\Stima\relax
154    \let\ubs\relax      \let\Subs\relax
155    \let\upmc\relax     \let\Supmc\relax
156    \let\altera\relax   \let\Saltera\relax
157    \let\bull\relax     \let\Sbull\relax
158    \let\thales\relax   \let\Sthales\relax
[278]159    \let\mds\relax      \let\Smds\relax
160    \let\xilinx\relax
[52]161    \immediate\write\ganttdata{%
[279]162      L=1 T=\the\taskcnt\space S=\the\subtaskcnt\space%
[52]163      D=\the\livrablecnt\space V=\vers\space%
[151]164      BM=#1 EM=#2 R=#3 PART={#4} KIND={#5} TITLE=#6%
[52]165    }
166}}
[21]167\newenvironment{livrable}%
168{%
[52]169 \newcount\verscnt\verscnt=-1
170 \newif\ifIsLivrableStarted\IsLivrableStartedfalse
[49]171 \newif\ifLivrableTopLine\LivrableTopLinetrue
172 \def\livrableTableDef{\begin{tabular}{|c|c|c|c|p{.625\linewidth}|}\hline}
173 \def\livrableTableLine##1##2##3##4{%
174    \makebox[3.5em]{\begin{small}##1\end{small}} &
175    \makebox[2.2em]{\begin{small}##2\end{small}} &
176    \makebox[1.5em]{\begin{small}##3\end{small}} &
177    \makebox[2.2em]{\begin{small}##4\end{small}} &
178 }
179 \def\livrableTableTopLine{%
180   \livrableTableLine{number}{date}{type}{resp.} description
181 }
[35]182 \livrablecnt-1
[123]183 \ifvmode \else\par\fi
[52]184   
185 \def\itemV##1##2##3##4##5{%
186    \ifIsLivrableStarted
187        \global\advance\verscnt1
188    \else
189        \global\advance\livrablecnt1
190        \global\verscnt1
191    \fi
192    \def\vers{V\the\verscnt}
[35]193    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
[151]194    \writeganttinfo{##1}{##2}{none}{##4}{##3}{##5}
[21]195    \\\hline
[49]196    \ifLivrableTopLine
[52]197      \ifIsLivrableStarted\else\hline\hline\fi
[49]198    \else
[52]199      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
[49]200    \fi
201    \global\LivrableTopLinefalse
[52]202    \global\IsLivrableStartedtrue
203    %\global\LivrableStartfalse
[49]204    \livrableTableLine%
205        {\textsc{\name}}%
[52]206        {\textsc{T0+##2}}%
207        {\textsc{##3}}%
[49]208        {\textsc{##4}}%
[21]209 }
[52]210 \def\itemL##1##2##3##4##5##6{%
211    \ifIsLivrableStarted
212        %\global\advance\verscnt1
213    \else
214        \global\advance\livrablecnt1
215        %\global\verscnt1
216    \fi
217    \def\vers{VF}
218    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
[151]219    \writeganttinfo{##1}{##2}{##6}{##4}{##3}{##5}
[52]220    \\\hline
221    \ifLivrableTopLine
222      \ifIsLivrableStarted\else\hline\hline\fi
223    \else
224      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
225    \fi
226    \global\LivrableTopLinefalse
227    \global\IsLivrableStartedfalse
228    %\global\LivrableStartfalse
229    \livrableTableLine%
230        {\textsc{\name}}%
231        {\textsc{T0+##2}}%
232        {\textsc{##3}}%
233        {\textsc{##4}}%
234 }
[279]235 \def\OtherPartner##1##2##3##4{%
[75]236    \let\xcoach\relax
237    \let\xcoachplus\relax
238    \let\irisa\relax    \let\Sirisa\relax
239    \let\lip\relax      \let\Slip\relax
240    \let\tima\relax     \let\Stima\relax
241    \let\ubs\relax      \let\Subs\relax
242    \let\upmc\relax     \let\Supmc\relax
243    \let\altera\relax   \let\Saltera\relax
244    \let\bull\relax     \let\Sbull\relax
245    \let\thales\relax   \let\Sthales\relax
[278]246    \let\mds\relax     \let\Smds\relax
[75]247    \immediate\write\ganttdata{%
[279]248      L=0 T=\the\taskcnt\space S=\the\subtaskcnt\space%
249      D=\the\livrablecnt\space BM=##1 EM=##2 R=##4 PART={##3} TITLE=%
[75]250    }
251 }
[21]252% \begin{small}
[49]253 \livrableTableDef
254 \livrableTableTopLine
255 %\begin{tabular}{|c|c|c|c|p{.55\linewidth}|}\hline%
256 %\makebox[3.5em]{number} & \makebox[1.5em]{date} & type & resp. & description
[21]257}
[49]258{\\\hline\end{tabular}\\%
[21]259%\end{small}\\%
260}
261
262%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
263\catcode`\@=12
264%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.