better error messages for ganttchart

This commit is contained in:
Michael Kohlhase 2014-10-27 17:49:59 +01:00
parent 24bb5a704d
commit 1c11da94c0
4 changed files with 32 additions and 14 deletions

View File

@ -56,10 +56,14 @@
\pdata@def{prop}{gen}{totalduration}{#1}}
\define@key{prop@gen}{fundsuntil}{\def\prop@gen@fundsuntil{#1}%
\pdata@def{prop}{gen}{fundsuntil}{#1}}
\newcommand\prop@gen@acro{ACRONYM}
\newcommand\prop@gen@months{???}
\newcommand\prop@gen@title{???Proposal Title???}
\newcommand\prop@gen@instrument{??? Instrument ???}
\newcommand\prop@gen@acro@default{ACRONYM}
\def\prop@gen@acro{\prop@gen@acro@default}
\newcommand\prop@gen@months@default{???months???}
\def\prop@gen@months{\prop@gen@months@default}
\newcommand\prop@gen@title@default{???Proposal Title???}
\def\prop@gen@title{\prop@gen@title@default}
\newcommand\prop@gen@instrument@default{??? Instrument ???}
\def\prop@gen@instrument{\prop@gen@instrument@default}
\newcommand\prop@tl[2]{\xdef\tab@line{}
\@for\tl@ext:={#1}\do{\xdef\tab@line{\tab@line&#2}}
\tab@line}

View File

@ -504,7 +504,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
\fi}%if@sites
\if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
\else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi
\else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi%|
\wpfig@headline\\\hline\hline}
{\end{tabular}\smallskip\\
\wpfig@legend@RAM@expl
@ -717,6 +717,11 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\setkeys{gantt}{#1}}
\newenvironment{gantt}[2][]
{\gantt@set{#1}
\def\@test{\prop@gen@months@default}
\ifx\@test\prop@gen@months
\ClassError{proposal}{Need overall project months to draw gantt
chart - expect trouble;\MessageBreak specify
\protect\begin{proposal}[...,months=??,...] to fix}\fi
\@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
\newdimen\gantt@ymonths
\gantt@ymonths=#2 cm
@ -762,7 +767,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\@for\@@ft:=\@@wphases\do{%task-level work phases
\decode@wphase\@@ft
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
\else% ifwork@ares
\else% ifwork@areas false
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
\@for\@@wp:=\@@wps\do{% iterate over work packages
\stepcounter{taskwps}
@ -778,7 +783,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
\decode@wphase\@@ft
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
\fi% ifwork@areas
\fi% ifwork@areas end
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
\@for\@@dep:=\@@deps\do{%
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}

View File

@ -687,10 +687,14 @@
% better.
%
% \begin{macrocode}
\newcommand\prop@gen@acro{ACRONYM}
\newcommand\prop@gen@months{???}
\newcommand\prop@gen@title{???Proposal Title???}
\newcommand\prop@gen@instrument{??? Instrument ???}
\newcommand\prop@gen@acro@default{ACRONYM}
\def\prop@gen@acro{\prop@gen@acro@default}
\newcommand\prop@gen@months@default{???months???}
\def\prop@gen@months{\prop@gen@months@default}
\newcommand\prop@gen@title@default{???Proposal Title???}
\def\prop@gen@title{\prop@gen@title@default}
\newcommand\prop@gen@instrument@default{??? Instrument ???}
\def\prop@gen@instrument{\prop@gen@instrument@default}
% \end{macrocode}
%
% \begin{macro}{\prop@tl}
@ -1678,7 +1682,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
\fi}%if@sites
\if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
\else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi
\else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi%|
\wpfig@headline\\\hline\hline}
{\end{tabular}\smallskip\\
\wpfig@legend@RAM@expl
@ -1959,6 +1963,11 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
% \begin{macrocode}
\newenvironment{gantt}[2][]
{\gantt@set{#1}
\def\@test{\prop@gen@months@default}
\ifx\@test\prop@gen@months
\ClassError{proposal}{Need overall project months to draw gantt
chart - expect trouble;\MessageBreak specify
\protect\begin{proposal}[...,months=??,...] to fix}\fi
\@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
\newdimen\gantt@ymonths
\gantt@ymonths=#2 cm
@ -2032,7 +2041,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\@for\@@ft:=\@@wphases\do{%task-level work phases
\decode@wphase\@@ft
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
\else% ifwork@ares
\else% ifwork@areas false
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
\@for\@@wp:=\@@wps\do{% iterate over work packages
\stepcounter{taskwps}
@ -2048,7 +2057,7 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
\@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
\decode@wphase\@@ft
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
\fi% ifwork@areas
\fi% ifwork@areas end
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
\@for\@@dep:=\@@deps\do{%
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}

Binary file not shown.