source: anr/anr.sty @ 384

Last change on this file since 384 was 383, checked in by coach, 14 years ago

ia: qq maj et mise en page finale.

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