better error messages for ganttchart
This commit is contained in:
parent
24bb5a704d
commit
1c11da94c0
@ -56,10 +56,14 @@
|
|||||||
\pdata@def{prop}{gen}{totalduration}{#1}}
|
\pdata@def{prop}{gen}{totalduration}{#1}}
|
||||||
\define@key{prop@gen}{fundsuntil}{\def\prop@gen@fundsuntil{#1}%
|
\define@key{prop@gen}{fundsuntil}{\def\prop@gen@fundsuntil{#1}%
|
||||||
\pdata@def{prop}{gen}{fundsuntil}{#1}}
|
\pdata@def{prop}{gen}{fundsuntil}{#1}}
|
||||||
\newcommand\prop@gen@acro{ACRONYM}
|
\newcommand\prop@gen@acro@default{ACRONYM}
|
||||||
\newcommand\prop@gen@months{???}
|
\def\prop@gen@acro{\prop@gen@acro@default}
|
||||||
\newcommand\prop@gen@title{???Proposal Title???}
|
\newcommand\prop@gen@months@default{???months???}
|
||||||
\newcommand\prop@gen@instrument{??? Instrument ???}
|
\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{}
|
\newcommand\prop@tl[2]{\xdef\tab@line{}
|
||||||
\@for\tl@ext:={#1}\do{\xdef\tab@line{\tab@line}}
|
\@for\tl@ext:={#1}\do{\xdef\tab@line{\tab@line}}
|
||||||
\tab@line}
|
\tab@line}
|
||||||
|
@ -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}
|
\xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
|
||||||
\fi}%if@sites
|
\fi}%if@sites
|
||||||
\if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
|
\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}
|
\wpfig@headline\\\hline\hline}
|
||||||
{\end{tabular}\smallskip\\
|
{\end{tabular}\smallskip\\
|
||||||
\wpfig@legend@RAM@expl
|
\wpfig@legend@RAM@expl
|
||||||
@ -717,6 +717,11 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
|
|||||||
\setkeys{gantt}{#1}}
|
\setkeys{gantt}{#1}}
|
||||||
\newenvironment{gantt}[2][]
|
\newenvironment{gantt}[2][]
|
||||||
{\gantt@set{#1}
|
{\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}
|
\@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
|
||||||
\newdimen\gantt@ymonths
|
\newdimen\gantt@ymonths
|
||||||
\gantt@ymonths=#2 cm
|
\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
|
\@for\@@ft:=\@@wphases\do{%task-level work phases
|
||||||
\decode@wphase\@@ft
|
\decode@wphase\@@ft
|
||||||
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
|
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
|
||||||
\else% ifwork@ares
|
\else% ifwork@areas false
|
||||||
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
|
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
|
||||||
\@for\@@wp:=\@@wps\do{% iterate over work packages
|
\@for\@@wp:=\@@wps\do{% iterate over work packages
|
||||||
\stepcounter{taskwps}
|
\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
|
\@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
|
||||||
\decode@wphase\@@ft
|
\decode@wphase\@@ft
|
||||||
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
|
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
|
||||||
\fi% ifwork@areas
|
\fi% ifwork@areas end
|
||||||
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
|
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
|
||||||
\@for\@@dep:=\@@deps\do{%
|
\@for\@@dep:=\@@deps\do{%
|
||||||
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
|
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
|
||||||
|
@ -687,10 +687,14 @@
|
|||||||
% better.
|
% better.
|
||||||
%
|
%
|
||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newcommand\prop@gen@acro{ACRONYM}
|
\newcommand\prop@gen@acro@default{ACRONYM}
|
||||||
\newcommand\prop@gen@months{???}
|
\def\prop@gen@acro{\prop@gen@acro@default}
|
||||||
\newcommand\prop@gen@title{???Proposal Title???}
|
\newcommand\prop@gen@months@default{???months???}
|
||||||
\newcommand\prop@gen@instrument{??? Instrument ???}
|
\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}
|
% \end{macrocode}
|
||||||
%
|
%
|
||||||
% \begin{macro}{\prop@tl}
|
% \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}
|
\xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
|
||||||
\fi}%if@sites
|
\fi}%if@sites
|
||||||
\if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
|
\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}
|
\wpfig@headline\\\hline\hline}
|
||||||
{\end{tabular}\smallskip\\
|
{\end{tabular}\smallskip\\
|
||||||
\wpfig@legend@RAM@expl
|
\wpfig@legend@RAM@expl
|
||||||
@ -1959,6 +1963,11 @@ wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30}
|
|||||||
% \begin{macrocode}
|
% \begin{macrocode}
|
||||||
\newenvironment{gantt}[2][]
|
\newenvironment{gantt}[2][]
|
||||||
{\gantt@set{#1}
|
{\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}
|
\@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
|
||||||
\newdimen\gantt@ymonths
|
\newdimen\gantt@ymonths
|
||||||
\gantt@ymonths=#2 cm
|
\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
|
\@for\@@ft:=\@@wphases\do{%task-level work phases
|
||||||
\decode@wphase\@@ft
|
\decode@wphase\@@ft
|
||||||
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
|
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
|
||||||
\else% ifwork@ares
|
\else% ifwork@areas false
|
||||||
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
|
\edef\@@wps{\pdataref@safe{all}{wp}{ids}}
|
||||||
\@for\@@wp:=\@@wps\do{% iterate over work packages
|
\@for\@@wp:=\@@wps\do{% iterate over work packages
|
||||||
\stepcounter{taskwps}
|
\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
|
\@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
|
||||||
\decode@wphase\@@ft
|
\decode@wphase\@@ft
|
||||||
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
|
\@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
|
||||||
\fi% ifwork@areas
|
\fi% ifwork@areas end
|
||||||
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
|
\edef\@@deps{\pdataref@safe{all}{task}{deps}}
|
||||||
\@for\@@dep:=\@@deps\do{%
|
\@for\@@dep:=\@@deps\do{%
|
||||||
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
|
\@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user