source: anr/anr.sty @ 382

Last change on this file since 382 was 361, checked in by coach, 14 years ago

ia: prerelease-2.

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