Index: anr/anr.sty
===================================================================
--- anr/anr.sty	(revision 300)
+++ anr/anr.sty	(revision 304)
@@ -1,6 +1,2 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\catcode`\@=11
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newlength{\desclen}
@@ -8,30 +4,29 @@
 \newlength{\mmlen}
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%{\catcode`\<=1\catcode`\>=2
-%	<\catcode`\{=12\gdef\OBraceTw<{>>
-%	<\catcode`\}=12\gdef\CBraceTw<}>>
-%>
-%\@ifundefined{specHasManual}{\let\specHasManual\relax}{}
+\newbox\livrable@box
+\newbox\tmp@box
+
 \let\specHasManual\relax
 \let\specCsgManual\relax
-\let\specXilinxOptimization\relax
-
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\eoa{end-of-args}
 \def\@@novers#1-#2\eoa{#1}
 \def\@novers#1{\ifx\relax#1\def\next{{\color{red}FIXME}}\else\def\next{\expandafter\@@novers#1\eoa}\fi\next}
 
-\def\setMacroInAuxFile#1{%
-	\hypertarget{#1}{}\vspace{-1.5ex}%
-	\let\@novers\relax%
-    \global\expandafter\edef\csname NOLNK#1\endcsname{\name}%
-    \global\expandafter\edef\csname #1\endcsname{\noexpand\hyperlink{#1}{\name}}%
-    \global\expandafter\edef\csname NOVERS#1\endcsname{\noexpand\hyperlink{#1}{\@novers{\name}}}%
-    \global\expandafter\edef\csname NOVL#1\endcsname{\@novers{\name}}%
-    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOLNK#1\endcsname{\name}}%
-    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname #1\endcsname{\string\hyperlink{#1}{\name}}}%
-    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVERS#1\endcsname{\string\hyperlink{#1}{\@novers{\name}}}}%
-    \immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVL#1\endcsname{\@novers{\name}}}%
-}
+\def\@hypertarget@cor{0pt}
+\def\setMacroInAuxFile#1#2{%
+%\mbox{}{\hypertarget{#1}{}\vspace{-1.0ex}}%
+\hypertarget{#1}{}\gdef\@hypertarget@cor{1.5ex}%
+\let\@novers\relax%
+\global\expandafter\edef\csname NOLNK#1\endcsname{\name}%
+\global\expandafter\edef\csname #1\endcsname{\noexpand\hyperlink{#1}{\name}}%
+\global\expandafter\edef\csname NOVERS#1\endcsname{\noexpand\hyperlink{#1}{\@novers{\name}}}%
+\global\expandafter\edef\csname NOVL#1\endcsname{\@novers{\name}}%
+\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOLNK#1\endcsname{\name}}%
+\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname #1\endcsname{\string\hyperlink{#1}{\name}}}%
+\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVERS#1\endcsname{\string\hyperlink{#1}{\@novers{\name}}}}%
+\immediate\write\@auxout{\expandafter\string\expandafter\gdef\expandafter\string\csname NOVL#1\endcsname{\@novers{\name}}}%
+#2}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -82,4 +77,19 @@
 \newwrite\ganttdata
 \immediate\openout\ganttdata=anr.gantt
+\def\write@ganttdata#1{{
+    \let\xcoach\relax%
+    \let\xcoachplus\relax%
+    \let\irisa\relax    \let\Sirisa\relax%
+    \let\lip\relax      \let\Slip\relax%
+    \let\tima\relax     \let\Stima\relax%
+    \let\ubs\relax      \let\Subs\relax%
+    \let\upmc\relax     \let\Supmc\relax%
+    \let\altera\relax   \let\Saltera\relax%
+    \let\bull\relax     \let\Sbull\relax%
+    \let\thales\relax   \let\Sthales\relax%
+    \let\mds\relax      \let\Smds\relax%
+    \let\xilinx\relax%
+    \immediate\write\ganttdata{#1}
+}}
 
 \def\enable{enable}
@@ -133,157 +143,169 @@
 \newcount\subtaskcnt
 \newcount\livrablecnt
-\newenvironment{workpackage}%
-{\global\advance\taskcnt1
- \global\subtaskcnt0
- \def\taskname{T\the\taskcnt}%
- \begin{description}%
- %\let\itemsave\item%
- \def\subtask##1{%
+
+ \def\@subtask#1{%
     \global\advance\subtaskcnt1
     \def\subtaskname{S\taskname-\the\subtaskcnt}%
-    \item[\subtaskname: ##1]%
+    \write@ganttdata{STN=\the\taskcnt\space\the\subtaskcnt\space#1}%
+    \item[\subtaskname: #1]%
     \IfFileExists{tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex}%
       {(\input{tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex})}%
       {\message{SKIPPING tmp/st\the\taskcnt-\the\subtaskcnt-partner.tex files}}%
-  \mbox{}\\%
-  {%
-    \let\xcoach\relax%
-    \let\xcoachplus\relax%
-    \let\irisa\relax    \let\Sirisa\relax%
-    \let\lip\relax      \let\Slip\relax%
-    \let\tima\relax     \let\Stima\relax%
-    \let\ubs\relax      \let\Subs\relax%
-    \let\upmc\relax     \let\Supmc\relax%
-    \let\altera\relax   \let\Saltera\relax%
-    \let\bull\relax     \let\Sbull\relax%
-    \let\thales\relax   \let\Sthales\relax%
-    \let\mds\relax      \let\Smds\relax%
-    \let\xilinx\relax%
-    \immediate\write\ganttdata{%
-        STN=\the\taskcnt\space\the\subtaskcnt\space##1
-    }%
- }}%
-}{%
-  \end{description}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\writeganttinfo#1#2#3#4#5#6{{%
-    \let\xcoach\relax
-    \let\xcoachplus\relax
-    \let\irisa\relax    \let\Sirisa\relax
-    \let\lip\relax      \let\Slip\relax
-    \let\tima\relax     \let\Stima\relax
-    \let\ubs\relax      \let\Subs\relax
-    \let\upmc\relax     \let\Supmc\relax
-    \let\altera\relax   \let\Saltera\relax
-    \let\bull\relax     \let\Sbull\relax
-    \let\thales\relax   \let\Sthales\relax
-    \let\mds\relax      \let\Smds\relax
-    \let\xilinx\relax
-    \immediate\write\ganttdata{%
+    \mbox{}\\%
+}
+
+\newenvironment{workpackage}{%
+    \global\advance\taskcnt1%
+    \global\subtaskcnt0%
+    \def\taskname{T\the\taskcnt}%
+    \begin{description}%
+    \let\subtask\@subtask%
+}{ \end{description}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\writeganttinfo#1#2#3#4#5#6{%
+    \write@ganttdata{%
       L=1 T=\the\taskcnt\space S=\the\subtaskcnt\space%
       D=\the\livrablecnt\space V=\vers\space%
       BM=#1 EM=#2 R=#3 PART={#4} KIND={#5} TITLE=#6%
-    }
-}}
-\newenvironment{livrable}%
-{%
- \newcount\verscnt\verscnt=-1
- \newif\ifIsLivrableStarted\IsLivrableStartedfalse
- \newif\ifLivrableTopLine\LivrableTopLinetrue
- \def\livrableTableDef{\begin{tabular}{|c|c|c|c|p{.625\linewidth}|}\hline}
- \def\livrableTableLine##1##2##3##4{%
-    \makebox[3.5em]{\begin{small}##1\end{small}} &
-    \makebox[2.2em]{\begin{small}##2\end{small}} &
-    \makebox[1.5em]{\begin{small}##3\end{small}} &
-    \makebox[2.2em]{\begin{small}##4\end{small}} &
- }
- \def\livrableTableTopLine{%
-   \livrableTableLine{number}{date}{type}{resp.} description
- }
- \livrablecnt-1
+    }%
+}
+
+\def\livrable@description@width{13.5cm}
+\def\livrable@description@width{10.4cm}
+\newif\if@livrable@firsttable@
+\newif\if@livrable@table@MustBeOpened@
+\newif\if@livrable@table@MustBeClosed@
+\newif\if@livrable@table@MustBeClosed@after@
+\let\librable@table@print@addon\relax
+\def\livrable@table@begin{\begin{tabular}{|p{3.5em}|c|c|c|l|}\hline}
+\def\livrable@table@line#1#2#3#4#5#6{
+    \makebox[3.5em][c]{\begin{small}#1\end{small}} &
+    \makebox[2.2em]{\begin{small}#2\end{small}} &
+    \makebox[1.5em]{\begin{small}#3\end{small}} &
+    \makebox[2.2em]{\begin{small}#4\end{small}} & 
+    #5\\#6}
+\def\livrable@table@end{\end{tabular}\\}
+\def\livrable@print@table{%
+    \if@livrable@table@MustBeOpened@%
+        \livrable@table@begin%
+        \global\@livrable@table@MustBeOpened@false%
+    \fi%
+    \if@livrable@firsttable@%
+        \livrable@table@line{number}{date}{type}{resp.}{description}{\hline\hline}%
+    \fi%
+    \global\@livrable@firsttable@false%
+    \livrable@table@line%
+        {\textsc{\name}}%
+        {\textsc{T0+\livrableEndDate}}%
+        {\textsc{\livrableType}}%
+        {\textsc{\livrableLeader}}%
+        %{\mbox{\copy\livrable@box}}{\hline}%
+        %{\raisebox{\@hypertarget@cor}[\ht\livrable@box][\ht\livrable@box]{\copy\livrable@box}\librable@table@print@addon\vspace*{1pt}}{\hline}%
+        {\raisebox{\@hypertarget@cor}{\copy\livrable@box}\librable@table@print@addon\vspace*{1pt}}{\hline}%
+%        {}{\cline{2-5}}%
+%    %& \multicolumn{4}{l|}{\raisebox{\@hypertarget@cor}{\copy\livrable@box}}\\\hline%
+%    & \multicolumn{4}{l|}{{\copy\livrable@box}}\\\hline%
+    \if@livrable@table@MustBeClosed@%
+        \livrable@table@end%
+        \global\@livrable@table@MustBeOpened@true%
+        \global\@livrable@table@MustBeClosed@false%
+    \fi%
+    \if@livrable@table@MustBeClosed@after@%
+        \global\@livrable@table@MustBeClosed@true%
+        \global\@livrable@table@MustBeClosed@after@false%
+    \fi%
+    \global\def\@hypertarget@cor{0pt}%
+    \global\let\librable@table@print@addon\relax%
+}
+
+\def\@livrable@desc@box@start{%
+  \begin{lrbox}{\livrable@box}\begin{minipage}[t]{\livrable@description@width}%
+  \fontsize{11.0pt}{10pt}\selectfont%
+  \let\ia@description\description%
+  \def\description{\vspace*{-1.5ex}\ia@description\itemsep=1pt\topsep2pt\parskip0pt}%
+  %\let\ia@enddescription\enddescription%
+  %\newenvironment{description}{%
+  %}{\ia@enddescription}%
+}
+
+\def\@livrable@desc@box@start@eatCR#1{\@livrable@desc@box@start#1}
+%\def\tmp{
+%}
+%\def\eat{\message{AAAAAAAAAAAAA:EAT}\@livrable@desc@box@start}
+%\if\noexpand\nexttok\tmp
+%    \message{AAAAAAAAAAAAAAAAAAAAA:OUI}%
+%    \def\cont{\eat}%
+%\else%
+%    \message{AAAAAAAAAAAAAAAAAAAAA:NON}%
+%    \def\cont{\@livrable@desc@box@start}%
+%\fi%
+%\cont}
+
+
+\def\@itemV@next#1#2#3#4#5{\livrable@print@table\@itemV@first{#1}{#2}{#3}{#4}{#5}}
+\def\@itemV@first#1#2#3#4#5{%
+    \def\vers{V\the\verscnt}%
+    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
+    \global\def\librable@table@print@addon{\hypertarget{\name}{}}%
+    \gdef\livrableEndDate{#2}%
+    \gdef\livrableType{#3}%
+    \gdef\livrableLeader{#4}%
+    \def\itemV{\end{minipage}\end{lrbox}\global\advance\verscnt1\global\setbox\livrable@box=\copy\livrable@box\@itemV@next}%
+    \def\itemL{\end{minipage}\end{lrbox}\global\advance\verscnt1\global\setbox\livrable@box=\copy\livrable@box\@itemL@next}%
+    \writeganttinfo{#1}{#2}{none}{#4}{#3}{#5}%
+    \futurelet\nexttok\@livrable@desc@box@start@eatCR%
+}
+% \parskip0pt \topsep0pt \parsep0pt \itemsep0pt \partopsep0pt
+
+\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}}
+\def\@itemL@first#1#2#3#4#5#6{%
+    \def\vers{VF}%
+    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
+    \global\def\librable@table@print@addon{\hypertarget{\name}{}\hypertarget{\expandafter\@@novers\name\eoa}{}}%
+    \gdef\livrableEndDate{#2}%
+    \gdef\livrableType{#3}%
+    \gdef\livrableLeader{#4}%
+    \def\itemV{\end{minipage}\end{lrbox}\global\advance\livrablecnt1\global\verscnt1\global\setbox\livrable@box\copy\livrable@box\@itemV@next}%
+    \def\itemL{\end{minipage}\end{lrbox}\global\advance\livrablecnt1\global\verscnt1\global\setbox\livrable@box\copy\livrable@box\@itemL@next}%
+    \writeganttinfo{#1}{#2}{#6}{#4}{#3}{#5}%
+    %\gdef\baselinestretch{2.50}XXX\\%
+    \global\@livrable@table@MustBeClosed@true
+    \futurelet\nexttok\@livrable@desc@box@start@eatCR%
+}
+
+\newenvironment{livrable}{%
+ \newcount\verscnt\verscnt=1
+ \livrablecnt0
+ \def\livrableTableDef{\begin{tabular}{|p{3.5em}|c|c|c|p{.625\linewidth}|}\hline}
  \ifvmode \else\par\fi
-    
- \def\itemV##1##2##3##4##5{%
-    \ifIsLivrableStarted
-        \global\advance\verscnt1
-    \else
-        \global\advance\livrablecnt1
-        \global\verscnt1
-    \fi
-    \def\vers{V\the\verscnt}
-    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
-    \hypertarget{\name}{}%
-    \writeganttinfo{##1}{##2}{none}{##4}{##3}{##5}
-    \\\hline
-    \ifLivrableTopLine
-      \ifIsLivrableStarted\else\hline\hline\fi
-    \else
-      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
-    \fi
-    \global\LivrableTopLinefalse
-    \global\IsLivrableStartedtrue
-    %\global\LivrableStartfalse
-    \livrableTableLine%
-        {\textsc{\name}}%
-        {\textsc{T0+##2}}%
-        {\textsc{##3}}%
-        {\textsc{##4}}%
- }
- \def\itemL##1##2##3##4##5##6{%
-    \ifIsLivrableStarted
-        %\global\advance\verscnt1
-    \else
-        \global\advance\livrablecnt1
-        %\global\verscnt1
-    \fi
-    \def\vers{VF}
-    \global\edef\name{D\the\taskcnt\the\subtaskcnt\the\livrablecnt-\vers}%
-    \hypertarget{\name}{}%
-    \hypertarget{\expandafter\@@novers\name\eoa}{}%
-    \writeganttinfo{##1}{##2}{##6}{##4}{##3}{##5}
-    \\\hline
-    \ifLivrableTopLine
-      \ifIsLivrableStarted\else\hline\hline\fi
-    \else
-      \ifIsLivrableStarted\else\end{tabular}\\\livrableTableDef\fi
-    \fi
-    \global\LivrableTopLinefalse
-    \global\IsLivrableStartedfalse
-    %\global\LivrableStartfalse
-    \livrableTableLine%
-        {\textsc{\name}}%
-        {\textsc{T0+##2}}%
-        {\textsc{##3}}%
-        {\textsc{##4}}%
- }
- \def\OtherPartner##1##2##3##4{{%
-    \let\xcoach\relax
-    \let\xcoachplus\relax
-    \let\irisa\relax    \let\Sirisa\relax
-    \let\lip\relax      \let\Slip\relax
-    \let\tima\relax     \let\Stima\relax
-    \let\ubs\relax      \let\Subs\relax
-    \let\upmc\relax     \let\Supmc\relax
-    \let\altera\relax   \let\Saltera\relax
-    \let\bull\relax     \let\Sbull\relax
-    \let\thales\relax   \let\Sthales\relax
-    \let\mds\relax     \let\Smds\relax
-    \immediate\write\ganttdata{%
-      L=0 T=\the\taskcnt\space S=\the\subtaskcnt\space%
-      D=\the\livrablecnt\space BM=##1 EM=##2 R=##4 PART={##3} TITLE=%
-    }
- }}
-% \begin{small}
- \livrableTableDef
- \livrableTableTopLine
- %\begin{tabular}{|c|c|c|c|p{.55\linewidth}|}\hline%
- %\makebox[3.5em]{number} & \makebox[1.5em]{date} & type & resp. & description 
-}
-{\\\hline\end{tabular}\\%
-%\end{small}\\%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\catcode`\@=12
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\OtherPartner##1##2##3##4##5{{%
+\let\xcoach\relax%
+\let\xcoachplus\relax%
+\let\irisa\relax\let\Sirisa\relax%
+\let\lip\relax\let\Slip\relax%
+\let\tima\relax\let\Stima\relax%
+\let\ubs\relax\let\Subs\relax%
+\let\upmc\relax\let\Supmc\relax%
+\let\altera\relax\let\Saltera\relax%
+\let\bull\relax\let\Sbull\relax%
+\let\thales\relax\let\Sthales\relax%
+\let\mds\relax\let\Smds\relax%
+\immediate\write\ganttdata{%
+  L=0 T=\the\taskcnt\space S=\the\subtaskcnt\space%
+  D=\the\livrablecnt\space BM=##1 EM=##2 R=##4 PART={##3} TITLE=%
+}%
+}##5}
+ \let\itemV\@itemV@first
+ \let\itemL\@itemL@first
+ \@livrable@firsttable@true
+ \@livrable@table@MustBeOpened@true
+ \@livrable@table@MustBeClosed@false
+ \@livrable@table@MustBeClosed@after@false
+ \def\@hypertarget@cor{0pt}
+}{%
+ \end{minipage}\end{lrbox}\global\setbox\livrable@box=\copy\livrable@box%
+ \@livrable@table@MustBeClosed@true\livrable@print@table%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
