source: anr/anr.sty @ 385

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

ia: qq maj et mise en page finale.

File size: 12.0 KB
RevLine 
[21]1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[156]2\newlength{\desclen}
3\newlength{\yearlen}
4\newlength{\mmlen}
5
[304]6\newbox\livrable@box
7\newbox\tmp@box
8
[36]9\let\specHasManual\relax
10\let\specCsgManual\relax
11
[304]12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[295]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
[304]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}
[36]31
32%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[383]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}
[361]51
52
53%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[150]54\newcount\supportercnt\supportercnt=1
55\newwrite\supporter
[305]56\immediate\openout\supporter=tmp/anr-supporter.tex
[168]57\def\letterOfInterest#1#2{{%
[356]58  \let\subsubsection\relax%
[168]59  \let\label\relax%
60  \let\begin\relax%
61  \let\end\relax%
62  \let\includegraphics\relax%
63  \let\linewidth\relax%
64  \let\newpage\relax%
[305]65  \let\framebox\relax%
66  \let\fbox\relax%
67  \let\shadowbox\relax%
[150]68  \immediate\write\supporter{%
[356]69    \subsubsection{#1} \label{supp:\the\supportercnt}}%
[150]70  \immediate\write\supporter{%
[305]71    %\begin{center}\includegraphics[width=0.9\linewidth]{#2}\end{center}}%
72    \begin{center}\shadowbox{\includegraphics[width=0.95\linewidth]{#2}}\end{center}}%
[168]73    \newpage%
74  }%
75  #1 (page \pageref{supp:\the\supportercnt})%
76  \advance\supportercnt1%
[150]77}
[263]78\def\letterOfInterestPlus#1{{%
79  \let\begin\relax%
80  \let\end\relax%
81  \let\includegraphics\relax%
82  \let\linewidth\relax%
83  \let\newpage\relax%
[305]84  \let\framebox\relax%
85  \let\fbox\relax%
86  \let\shadowbox\relax%
[263]87  \immediate\write\supporter{%
[305]88    %\begin{center}\includegraphics[width=0.9\linewidth]{#1}\end{center}}%
89    \begin{center}\shadowbox{\includegraphics[width=0.95\linewidth]{#1}}\end{center}}%
[263]90    \newpage%
91  }%
92}
[150]93
94\def\letterOfInterestNb{?}
95\def\letterOfInterestClose{
[168]96  \advance\supportercnt-1
[150]97  \immediate\closeout\supporter
98  \immediate\write\@auxout{%
99    \string\gdef\string\letterOfInterestNb{\the\supportercnt}
100  }
101}
102
103
104%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[36]105\let\ganttlf\relax
[35]106\newwrite\ganttdata
107\immediate\openout\ganttdata=anr.gantt
[304]108\def\write@ganttdata#1{{
109    \let\xcoach\relax%
110    \let\xcoachplus\relax%
[335]111    \let\inria\relax    \let\Sinria\relax%
[304]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}}
[35]123
[21]124\def\enable{enable}
125\def\disable{disable}
126\def\leader{leader}
127\newenvironment{taskinfo}%
128{%
129\let\ALL\disable%
[335]130\let\INRIA\disable%
[21]131\let\LIP\disable%
132\let\TIMA\disable%
133\let\UBS\disable%
134\let\UPMC\disable%
135\let\BULL\disable%
136\let\THALES\disable%
[278]137\let\MDS\disable%
[21]138}{%
139\ifx\ALL\enable%
[335]140  \ifx\INRIA\disable\let\INRIA\enable\fi%
[21]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%
[278]147  \ifx\MDS\disable\let\MDS\enable\fi%
[21]148\fi%
[27]149\def\@leader{\begin{small}\textcolor{red}{lead.}\end{small}}
150\def\@partner{\begin{small}\textcolor{blue}{part.}\end{small}}
[335]151\def\@INRIA{\ifx\INRIA\disable{}\else\ifx\INRIA\enable{\@partner}\else{\@leader}\fi\fi}%
[27]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}%
[278]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
[356]160\Smds & \Supmc & \Subs & \Slip & \Stima  & \Sinria  & \Sbull  & \Sthales \\\hline
161\@MDS & \@UPMC & \@UBS & \@LIP & \@TIMA  & \@INRIA  & \@BULL  & \@THALES \\\hline
[21]162\end{tabular}\par
163}
164
165%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166\newenvironment{objectif}%
167{\begin{description}\item[Objectives]}
168{\end{description}}
169
170%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[59]171\newcount\taskcnt\taskcnt=0
[35]172\newcount\subtaskcnt
173\newcount\livrablecnt
[304]174
175 \def\@subtask#1{%
[35]176    \global\advance\subtaskcnt1
177    \def\subtaskname{S\taskname-\the\subtaskcnt}%
[304]178    \write@ganttdata{STN=\the\taskcnt\space\the\subtaskcnt\space#1}%
179    \item[\subtaskname: #1]%
[300]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}}%
[304]183    \mbox{}\\%
184}
[21]185
[304]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
[21]194%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[304]195\def\writeganttinfo#1#2#3#4#5#6{%
196    \write@ganttdata{%
[279]197      L=1 T=\the\taskcnt\space S=\the\subtaskcnt\space%
[52]198      D=\the\livrablecnt\space V=\vers\space%
[151]199      BM=#1 EM=#2 R=#3 PART={#4} KIND={#5} TITLE=#6%
[304]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%
[49]228        {\textsc{\name}}%
[304]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%
[383]255  \def\description{\vspace*{-0.0ex}\ia@description\itemsep=1pt\topsep2pt\parskip0pt}%
[304]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}%
[52]278    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
[304]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%
[21]287}
[304]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%
[21]304}
305
[304]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%
[335]314\let\inria\relax\let\Sinria\relax%
[304]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
[21]340%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.