source: anr/anr.sty @ 338

Last change on this file since 338 was 335, checked in by coach, 14 years ago

Mise à jour INRIA Rennes - 28 janv

File size: 11.4 KB
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2\newlength{\desclen}
3\newlength{\yearlen}
4\newlength{\mmlen}
5
6\newbox\livrable@box
7\newbox\tmp@box
8
9\let\specHasManual\relax
10\let\specCsgManual\relax
11
12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13\def\eoa{end-of-args}
14\def\@@novers#1-#2\eoa{#1}
15\def\@novers#1{\ifx\relax#1\def\next{{\color{red}FIXME}}\else\def\next{\expandafter\@@novers#1\eoa}\fi\next}
16
17\def\@hypertarget@cor{0pt}
18\def\setMacroInAuxFile#1#2{%
19%\mbox{}{\hypertarget{#1}{}\vspace{-1.0ex}}%
20\hypertarget{#1}{}\gdef\@hypertarget@cor{1.5ex}%
21\let\@novers\relax%
22\global\expandafter\edef\csname NOLNK#1\endcsname{\name}%
23\global\expandafter\edef\csname #1\endcsname{\noexpand\hyperlink{#1}{\name}}%
24\global\expandafter\edef\csname NOVERS#1\endcsname{\noexpand\hyperlink{#1}{\@novers{\name}}}%
25\global\expandafter\edef\csname NOVL#1\endcsname{\@novers{\name}}%
26\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOLNK#1\endcsname{\name}}%
27\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname #1\endcsname{\string\hyperlink{#1}{\name}}}%
28\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVERS#1\endcsname{\string\hyperlink{#1}{\@novers{\name}}}}%
29\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVL#1\endcsname{\@novers{\name}}}%
30#2}
31
32%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33\newcount\supportercnt\supportercnt=1
34\newwrite\supporter
35\immediate\openout\supporter=tmp/anr-supporter.tex
36\def\letterOfInterest#1#2{{%
37  \let\subsection\relax%
38  \let\label\relax%
39  \let\begin\relax%
40  \let\end\relax%
41  \let\includegraphics\relax%
42  \let\linewidth\relax%
43  \let\newpage\relax%
44  \let\framebox\relax%
45  \let\fbox\relax%
46  \let\shadowbox\relax%
47  \immediate\write\supporter{%
48    \subsection{#1} \label{supp:\the\supportercnt}}%
49  \immediate\write\supporter{%
50    %\begin{center}\includegraphics[width=0.9\linewidth]{#2}\end{center}}%
51    \begin{center}\shadowbox{\includegraphics[width=0.95\linewidth]{#2}}\end{center}}%
52    \newpage%
53  }%
54  #1 (page \pageref{supp:\the\supportercnt})%
55  \advance\supportercnt1%
56}
57\def\letterOfInterestPlus#1{{%
58  \let\begin\relax%
59  \let\end\relax%
60  \let\includegraphics\relax%
61  \let\linewidth\relax%
62  \let\newpage\relax%
63  \let\framebox\relax%
64  \let\fbox\relax%
65  \let\shadowbox\relax%
66  \immediate\write\supporter{%
67    %\begin{center}\includegraphics[width=0.9\linewidth]{#1}\end{center}}%
68    \begin{center}\shadowbox{\includegraphics[width=0.95\linewidth]{#1}}\end{center}}%
69    \newpage%
70  }%
71}
72
73\def\letterOfInterestNb{?}
74\def\letterOfInterestClose{
75  \advance\supportercnt-1
76  \immediate\closeout\supporter
77  \immediate\write\@auxout{%
78    \string\gdef\string\letterOfInterestNb{\the\supportercnt}
79  }
80}
81
82
83%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84\let\ganttlf\relax
85\newwrite\ganttdata
86\immediate\openout\ganttdata=anr.gantt
87\def\write@ganttdata#1{{
88    \let\xcoach\relax%
89    \let\xcoachplus\relax%
90    \let\inria\relax    \let\Sinria\relax%
91    \let\lip\relax      \let\Slip\relax%
92    \let\tima\relax     \let\Stima\relax%
93    \let\ubs\relax      \let\Subs\relax%
94    \let\upmc\relax     \let\Supmc\relax%
95    \let\altera\relax   \let\Saltera\relax%
96    \let\bull\relax     \let\Sbull\relax%
97    \let\thales\relax   \let\Sthales\relax%
98    \let\mds\relax      \let\Smds\relax%
99    \let\xilinx\relax%
100    \immediate\write\ganttdata{#1}
101}}
102
103\def\enable{enable}
104\def\disable{disable}
105\def\leader{leader}
106\newenvironment{taskinfo}%
107{%
108\let\ALL\disable%
109\let\INRIA\disable%
110\let\LIP\disable%
111\let\TIMA\disable%
112\let\UBS\disable%
113\let\UPMC\disable%
114\let\BULL\disable%
115\let\THALES\disable%
116\let\MDS\disable%
117}{%
118\ifx\ALL\enable%
119  \ifx\INRIA\disable\let\INRIA\enable\fi%
120  \ifx\LIP\disable\let\LIP\enable\fi%
121  \ifx\UPMC\disable\let\UPMC\enable\fi%
122  \ifx\TIMA\disable\let\TIMA\enable\fi%
123  \ifx\UBS\disable\let\UBS\enable\fi%
124  \ifx\BULL\disable\let\BULL\enable\fi%
125  \ifx\THALES\disable\let\THALES\enable\fi%
126  \ifx\MDS\disable\let\MDS\enable\fi%
127\fi%
128\def\@leader{\begin{small}\textcolor{red}{lead.}\end{small}}
129\def\@partner{\begin{small}\textcolor{blue}{part.}\end{small}}
130\def\@INRIA{\ifx\INRIA\disable{}\else\ifx\INRIA\enable{\@partner}\else{\@leader}\fi\fi}%
131\def\@LIP{\ifx\LIP\disable{}\else\ifx\LIP\enable{\@partner}\else{\@leader}\fi\fi}%
132\def\@UPMC{\ifx\UPMC\disable{}\else\ifx\UPMC\enable{\@partner}\else{\@leader}\fi\fi}%
133\def\@TIMA{\ifx\TIMA\disable{}\else\ifx\TIMA\enable{\@partner}\else{\@leader}\fi\fi}%
134\def\@UBS{\ifx\UBS\disable{}\else\ifx\UBS\enable{\@partner}\else{\@leader}\fi\fi}%
135\def\@BULL{\ifx\BULL\disable{}\else\ifx\BULL\enable{\@partner}\else{\@leader}\fi\fi}%
136\def\@THALES{\ifx\THALES\disable{}\else\ifx\THALES\enable{\@partner}\else{\@leader}\fi\fi}%
137\def\@MDS{\ifx\MDS\disable{}\else\ifx\MDS\enable{\@partner}\else{\@leader}\fi\fi}%
138\begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
139\Sinria  & \Slip  & \Stima  & \Subs  & \Supmc  & \Smds & \Sbull  & \Sthales \\\hline
140\@INRIA  & \@LIP  & \@TIMA  & \@UBS  & \@UPMC  & \@MDS & \@BULL  & \@THALES \\\hline
141\end{tabular}\par
142}
143
144%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145\newenvironment{objectif}%
146{\begin{description}\item[Objectives]}
147{\end{description}}
148
149%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150\newcount\taskcnt\taskcnt=0
151\newcount\subtaskcnt
152\newcount\livrablecnt
153
154 \def\@subtask#1{%
155    \global\advance\subtaskcnt1
156    \def\subtaskname{S\taskname-\the\subtaskcnt}%
157    \write@ganttdata{STN=\the\taskcnt\space\the\subtaskcnt\space#1}%
158    \item[\subtaskname: #1]%
159    \IfFileExists{tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex}%
160      {(\input{tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex})}%
161      {\message{SKIPPING tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex files}}%
162    \mbox{}\\%
163}
164
165\newenvironment{workpackage}{%
166    \global\advance\taskcnt1%
167    \global\subtaskcnt0%
168    \def\taskname{T\the\taskcnt}%
169    \begin{description}%
170    \let\subtask\@subtask%
171}{ \end{description}}
172
173%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
174\def\writeganttinfo#1#2#3#4#5#6{%
175    \write@ganttdata{%
176      L=1 T=\the\taskcnt\space S=\the\subtaskcnt\space%
177      D=\the\livrablecnt\space V=\vers\space%
178      BM=#1 EM=#2 R=#3 PART={#4} KIND={#5} TITLE=#6%
179    }%
180}
181
182\def\livrable@description@width{13.5cm}
183\def\livrable@description@width{10.4cm}
184\newif\if@livrable@firsttable@
185\newif\if@livrable@table@MustBeOpened@
186\newif\if@livrable@table@MustBeClosed@
187\newif\if@livrable@table@MustBeClosed@after@
188\let\librable@table@print@addon\relax
189\def\livrable@table@begin{\begin{tabular}{|p{3.5em}|c|c|c|l|}\hline}
190\def\livrable@table@line#1#2#3#4#5#6{
191    \makebox[3.5em][c]{\begin{small}#1\end{small}} &
192    \makebox[2.2em]{\begin{small}#2\end{small}} &
193    \makebox[1.5em]{\begin{small}#3\end{small}} &
194    \makebox[2.2em]{\begin{small}#4\end{small}} &
195    #5\\#6}
196\def\livrable@table@end{\end{tabular}\\}
197\def\livrable@print@table{%
198    \if@livrable@table@MustBeOpened@%
199        \livrable@table@begin%
200        \global\@livrable@table@MustBeOpened@false%
201    \fi%
202    \if@livrable@firsttable@%
203        \livrable@table@line{number}{date}{type}{resp.}{description}{\hline\hline}%
204    \fi%
205    \global\@livrable@firsttable@false%
206    \livrable@table@line%
207        {\textsc{\name}}%
208        {\textsc{T0+\livrableEndDate}}%
209        {\textsc{\livrableType}}%
210        {\textsc{\livrableLeader}}%
211        %{\mbox{\copy\livrable@box}}{\hline}%
212        %{\raisebox{\@hypertarget@cor}[\ht\livrable@box][\ht\livrable@box]{\copy\livrable@box}\librable@table@print@addon\vspace*{1pt}}{\hline}%
213        {\raisebox{\@hypertarget@cor}{\copy\livrable@box}\librable@table@print@addon\vspace*{1pt}}{\hline}%
214%        {}{\cline{2-5}}%
215%    %& \multicolumn{4}{l|}{\raisebox{\@hypertarget@cor}{\copy\livrable@box}}\\\hline%
216%    & \multicolumn{4}{l|}{{\copy\livrable@box}}\\\hline%
217    \if@livrable@table@MustBeClosed@%
218        \livrable@table@end%
219        \global\@livrable@table@MustBeOpened@true%
220        \global\@livrable@table@MustBeClosed@false%
221    \fi%
222    \if@livrable@table@MustBeClosed@after@%
223        \global\@livrable@table@MustBeClosed@true%
224        \global\@livrable@table@MustBeClosed@after@false%
225    \fi%
226    \global\def\@hypertarget@cor{0pt}%
227    \global\let\librable@table@print@addon\relax%
228}
229
230\def\@livrable@desc@box@start{%
231  \begin{lrbox}{\livrable@box}\begin{minipage}[t]{\livrable@description@width}%
232  \fontsize{11.0pt}{10pt}\selectfont%
233  \let\ia@description\description%
234  \def\description{\vspace*{-1.5ex}\ia@description\itemsep=1pt\topsep2pt\parskip0pt}%
235  %\let\ia@enddescription\enddescription%
236  %\newenvironment{description}{%
237  %}{\ia@enddescription}%
238}
239
240\def\@livrable@desc@box@start@eatCR#1{\@livrable@desc@box@start#1}
241%\def\tmp{
242%}
243%\def\eat{\message{AAAAAAAAAAAAA:EAT}\@livrable@desc@box@start}
244%\if\noexpand\nexttok\tmp
245%    \message{AAAAAAAAAAAAAAAAAAAAA:OUI}%
246%    \def\cont{\eat}%
247%\else%
248%    \message{AAAAAAAAAAAAAAAAAAAAA:NON}%
249%    \def\cont{\@livrable@desc@box@start}%
250%\fi%
251%\cont}
252
253
254\def\@itemV@next#1#2#3#4#5{\livrable@print@table\@itemV@first{#1}{#2}{#3}{#4}{#5}}
255\def\@itemV@first#1#2#3#4#5{%
256    \def\vers{V\the\verscnt}%
257    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
258    \global\def\librable@table@print@addon{\hypertarget{\name}{}}%
259    \gdef\livrableEndDate{#2}%
260    \gdef\livrableType{#3}%
261    \gdef\livrableLeader{#4}%
262    \def\itemV{\end{minipage}\end{lrbox}\global\advance\verscnt1\global\setbox\livrable@box=\copy\livrable@box\@itemV@next}%
263    \def\itemL{\end{minipage}\end{lrbox}\global\advance\verscnt1\global\setbox\livrable@box=\copy\livrable@box\@itemL@next}%
264    \writeganttinfo{#1}{#2}{none}{#4}{#3}{#5}%
265    \futurelet\nexttok\@livrable@desc@box@start@eatCR%
266}
267% \parskip0pt \topsep0pt \parsep0pt \itemsep0pt \partopsep0pt
268
269\def\@itemL@next#1#2#3#4#5#6{\global\@livrable@table@MustBeClosed@after@true\livrable@print@table\@itemL@first{#1}{#2}{#3}{#4}{#5}{#6}}
270\def\@itemL@first#1#2#3#4#5#6{%
271    \def\vers{VF}%
272    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
273    \global\def\librable@table@print@addon{\hypertarget{\name}{}\hypertarget{\expandafter\@@novers\name\eoa}{}}%
274    \gdef\livrableEndDate{#2}%
275    \gdef\livrableType{#3}%
276    \gdef\livrableLeader{#4}%
277    \def\itemV{\end{minipage}\end{lrbox}\global\advance\livrablecnt1\global\verscnt1\global\setbox\livrable@box\copy\livrable@box\@itemV@next}%
278    \def\itemL{\end{minipage}\end{lrbox}\global\advance\livrablecnt1\global\verscnt1\global\setbox\livrable@box\copy\livrable@box\@itemL@next}%
279    \writeganttinfo{#1}{#2}{#6}{#4}{#3}{#5}%
280    %\gdef\baselinestretch{2.50}XXX\\%
281    \global\@livrable@table@MustBeClosed@true
282    \futurelet\nexttok\@livrable@desc@box@start@eatCR%
283}
284
285\newenvironment{livrable}{%
286 \newcount\verscnt\verscnt=1
287 \livrablecnt0
288 \def\livrableTableDef{\begin{tabular}{|p{3.5em}|c|c|c|p{.625\linewidth}|}\hline}
289 \ifvmode \else\par\fi
290\def\OtherPartner##1##2##3##4##5{{%
291\let\xcoach\relax%
292\let\xcoachplus\relax%
293\let\inria\relax\let\Sinria\relax%
294\let\lip\relax\let\Slip\relax%
295\let\tima\relax\let\Stima\relax%
296\let\ubs\relax\let\Subs\relax%
297\let\upmc\relax\let\Supmc\relax%
298\let\altera\relax\let\Saltera\relax%
299\let\bull\relax\let\Sbull\relax%
300\let\thales\relax\let\Sthales\relax%
301\let\mds\relax\let\Smds\relax%
302\immediate\write\ganttdata{%
303  L=0 T=\the\taskcnt\space S=\the\subtaskcnt\space%
304  D=\the\livrablecnt\space BM=##1 EM=##2 R=##4 PART={##3} TITLE=%
305}%
306}##5}
307 \let\itemV\@itemV@first
308 \let\itemL\@itemL@first
309 \@livrable@firsttable@true
310 \@livrable@table@MustBeOpened@true
311 \@livrable@table@MustBeClosed@false
312 \@livrable@table@MustBeClosed@after@false
313 \def\@hypertarget@cor{0pt}
314}{%
315 \end{minipage}\end{lrbox}\global\setbox\livrable@box=\copy\livrable@box%
316 \@livrable@table@MustBeClosed@true\livrable@print@table%
317}
318
319%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.