1
0
Fork 0

Added ifshowtask time; hiding task time by default

master
Mike Gerwitz 2013-09-10 13:23:29 -04:00
parent ba34ca18fa
commit 13a6c64e2f
1 changed files with 73 additions and 63 deletions

136
task.sty
View File

@ -3,6 +3,8 @@
\RequirePackage[usenames,dvipsnames]{xcolor} \RequirePackage[usenames,dvipsnames]{xcolor}
\RequirePackage{etex} \RequirePackage{etex}
\newif\ifshowtasktime
\newcommand\taskname{Requisite} \newcommand\taskname{Requisite}
% Tango Icon Theme Aluminum % Tango Icon Theme Aluminum
@ -97,13 +99,17 @@
\\ \\
\vphantom{M}% \vphantom{M}%
\ifx\@@h\empty\else \ifx\@@h\empty\else
{\small\@task@h#1||\,h}% \ifshowtasktime
{\small\@task@h#1||\,h}%
\fi
\fi% \fi%
\\ \\
\vphantom{M}% \vphantom{M}%
\ifx\@@h\empty\else \ifx\@@h\empty\else
\@task@setregs#1||% \@task@setregs#1||%
{\scriptsize \the\@@hconf\% Confidence}% \ifshowtasktime
{\scriptsize \the\@@hconf\% Confidence}%
\fi
% advance the total counters % advance the total counters
\addtocounter{tasktmin}{\@@hmin}% \addtocounter{tasktmin}{\@@hmin}%
\addtocounter{tasktmax}{\@@hmax}% \addtocounter{tasktmax}{\@@hmax}%
@ -175,71 +181,75 @@
\newcommand\tasksummary[1][]{{% \newcommand\tasksummary[1][]{{%
\vfill \ifshowtasktime
\subsection{Summary} \vfill
\pnumoff \subsection{Summary}
\edef\@@range{\arabic{tasktmin}-\arabic{tasktmax}}% \pnumoff
\par {\sc Time Interval:} \expandafter\@task@h\@@range|| Hours% \edef\@@range{\arabic{tasktmin}-\arabic{tasktmax}}%
% determine confidence \par {\sc Time Interval:} \expandafter\@task@h\@@range|| Hours%
\expandafter\@task@setregs\@@range||% % determine confidence
\expandafter\@task@setregs@vari\@@range||% \expandafter\@task@setregs\@@range||%
\par {\sc Confidence:} \the\@@hconf\%% \expandafter\@task@setregs@vari\@@range||%
\par {\sc Variability:} \the\@@hvari\%% \par {\sc Confidence:} \the\@@hconf\%%
% reset counters \par {\sc Variability:} \the\@@hvari\%%
\addtocounter{taskamin}{\value{tasktmin}}% % reset counters
\addtocounter{taskamax}{\value{tasktmax}}% \addtocounter{taskamin}{\value{tasktmin}}%
\setcounter{tasktmin}{0}% \addtocounter{taskamax}{\value{tasktmax}}%
\setcounter{tasktmax}{0}% \setcounter{tasktmin}{0}%
% output any comments, if available \setcounter{tasktmax}{0}%
\def\@@comments{#1}% % output any comments, if available
\ifx\@@comments\empty\else \def\@@comments{#1}%
\par\@@comments \ifx\@@comments\empty\else
\par\@@comments
\fi
\pnumrest
\fi \fi
\pnumrest
}} }}
\newwrite\@taskstats \newwrite\@taskstats
\newcommand\projectsummary{{% \newcommand\projectsummary{{%
\section{Project Summary} \ifshowtasktime
\pnumoff \section{Project Summary}
\edef\@@range{\arabic{taskamin}-\arabic{taskamax}}% \pnumoff
\par {\sc Non-Overlapping Time Interval:}% \edef\@@range{\arabic{taskamin}-\arabic{taskamax}}%
\space\expandafter\@task@h\@@range|| Man Hours% \par {\sc Non-Overlapping Time Interval:}%
% determine confidence \space\expandafter\@task@h\@@range|| Man Hours%
\expandafter\@task@setregs\@@range||% % determine confidence
\expandafter\@task@setregs@vari\@@range||% \expandafter\@task@setregs\@@range||%
\par {\sc Confidence:} \the\@@hconf\%% \expandafter\@task@setregs@vari\@@range||%
\par {\sc Variability:} \the\@@hvari\%% \par {\sc Confidence:} \the\@@hconf\%%
% calculate median \par {\sc Variability:} \the\@@hvari\%%
\newcount\@@med % calculate median
\advance\@@med \value{taskamin}% \newcount\@@med
\advance\@@med \value{taskamax}% \advance\@@med \value{taskamin}%
\divide\@@med by 2\relax \advance\@@med \value{taskamax}%
% calculate non-overlap \divide\@@med by 2\relax
\newcount\@@nomin \newcount\@@nomax % calculate non-overlap
\advance\@@nomin \value{taskamin}% \newcount\@@nomin \newcount\@@nomax
\advance\@@nomax \value{taskamax}% \advance\@@nomin \value{taskamin}%
\advance\@@nomin -\value{taskaomin}% \advance\@@nomax \value{taskamax}%
\advance\@@nomax -\value{taskaomax}% \advance\@@nomin -\value{taskaomin}%
% calculate overlap median \advance\@@nomax -\value{taskaomax}%
\newcount\@@omed % calculate overlap median
\advance\@@omed\@@nomin \newcount\@@omed
\advance\@@omed\@@nomax \advance\@@omed\@@nomin
\divide\@@omed by 2\relax \advance\@@omed\@@nomax
% write task stats to file (can be used for reporting by building consecutive \divide\@@omed by 2\relax
% versions, concatenating the data, taking the last row for each date and % write task stats to file (can be used for reporting by building consecutive
% plotting, for example) % versions, concatenating the data, taking the last row for each date and
\immediate\openout\@taskstats=taskstats.dat % plotting, for example)
\immediate\write\@taskstats{min max med omin omax omed cp vp}% \immediate\openout\@taskstats=taskstats.dat
\immediate\write\@taskstats{% \immediate\write\@taskstats{min max med omin omax omed cp vp}%
\arabic{taskamin} \arabic{taskamax} \the\@@med \immediate\write\@taskstats{%
\space\the\@@nomin \space \the\@@nomax \space\the\@@omed \arabic{taskamin} \arabic{taskamax} \the\@@med
\space\the\@@hconf \space\the\@@hvari \space\the\@@nomin \space \the\@@nomax \space\the\@@omed
}% \space\the\@@hconf \space\the\@@hvari
\immediate\closeout\@taskstats }%
% reset counters \immediate\closeout\@taskstats
\setcounter{taskamin}{0}\setcounter{taskamax}{0}% % reset counters
\setcounter{taskaomin}{0}\setcounter{taskaomax}{0}% \setcounter{taskamin}{0}\setcounter{taskamax}{0}%
\pnumrest \setcounter{taskaomin}{0}\setcounter{taskaomax}{0}%
\pnumrest
\fi
}} }}