Mike Gerwitz

Activist for User Freedom

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2013-09-12 08:54:30 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2013-09-12 08:54:30 -0400
commite72fecfd61583f3daf3b69b369bf56645c3a1d95 (patch)
treedaf5eacf58ba2b5e1c4b4dc0170dfcb347a78be5
parent1813315ee99b260780050e12f4d913c50bb55d55 (diff)
downloadlvspec-e72fecfd61583f3daf3b69b369bf56645c3a1d95.tar.gz
lvspec-e72fecfd61583f3daf3b69b369bf56645c3a1d95.tar.bz2
lvspec-e72fecfd61583f3daf3b69b369bf56645c3a1d95.zip
task.sty will continue to properly calculate and output data even when display is disabled
-rw-r--r--task.sty87
1 files changed, 44 insertions, 43 deletions
diff --git a/task.sty b/task.sty
index 30af94d..fa911b4 100644
--- a/task.sty
+++ b/task.sty
@@ -181,22 +181,17 @@
\newcommand\tasksummary[1][]{{%
+ \edef\@@range{\arabic{tasktmin}-\arabic{tasktmax}}%
+ % determine confidence
+ \expandafter\@task@setregs\@@range||%
+ \expandafter\@task@setregs@vari\@@range||%
\ifshowtasktime
\vfill
\subsection{Summary}
\pnumoff
- \edef\@@range{\arabic{tasktmin}-\arabic{tasktmax}}%
\par {\sc Time Interval:} \expandafter\@task@h\@@range|| Hours%
- % determine confidence
- \expandafter\@task@setregs\@@range||%
- \expandafter\@task@setregs@vari\@@range||%
\par {\sc Confidence:} \the\@@hconf\%%
\par {\sc Variability:} \the\@@hvari\%%
- % reset counters
- \addtocounter{taskamin}{\value{tasktmin}}%
- \addtocounter{taskamax}{\value{tasktmax}}%
- \setcounter{tasktmin}{0}%
- \setcounter{tasktmax}{0}%
% output any comments, if available
\def\@@comments{#1}%
\ifx\@@comments\empty\else
@@ -204,52 +199,58 @@
\fi
\pnumrest
\fi
+ % reset counters
+ \addtocounter{taskamin}{\value{tasktmin}}%
+ \addtocounter{taskamax}{\value{tasktmax}}%
+ \setcounter{tasktmin}{0}%
+ \setcounter{tasktmax}{0}%
}}
\newwrite\@taskstats
\newcommand\projectsummary{{%
+ \edef\@@range{\arabic{taskamin}-\arabic{taskamax}}%
+ % determine confidence
+ \expandafter\@task@setregs\@@range||%
+ \expandafter\@task@setregs@vari\@@range||%
+ % only output if requested
\ifshowtasktime
\section{Project Summary}
\pnumoff
- \edef\@@range{\arabic{taskamin}-\arabic{taskamax}}%
\par {\sc Non-Overlapping Time Interval:}%
\space\expandafter\@task@h\@@range|| Man Hours%
- % determine confidence
- \expandafter\@task@setregs\@@range||%
- \expandafter\@task@setregs@vari\@@range||%
\par {\sc Confidence:} \the\@@hconf\%%
\par {\sc Variability:} \the\@@hvari\%%
- % calculate median
- \newcount\@@med
- \advance\@@med \value{taskamin}%
- \advance\@@med \value{taskamax}%
- \divide\@@med by 2\relax
- % calculate non-overlap
- \newcount\@@nomin \newcount\@@nomax
- \advance\@@nomin \value{taskamin}%
- \advance\@@nomax \value{taskamax}%
- \advance\@@nomin -\value{taskaomin}%
- \advance\@@nomax -\value{taskaomax}%
- % calculate overlap median
- \newcount\@@omed
- \advance\@@omed\@@nomin
- \advance\@@omed\@@nomax
- \divide\@@omed by 2\relax
- % write task stats to file (can be used for reporting by building consecutive
- % versions, concatenating the data, taking the last row for each date and
- % plotting, for example)
- \immediate\openout\@taskstats=taskstats.dat
- \immediate\write\@taskstats{min max med omin omax omed cp vp}%
- \immediate\write\@taskstats{%
- \arabic{taskamin} \arabic{taskamax} \the\@@med
- \space\the\@@nomin \space \the\@@nomax \space\the\@@omed
- \space\the\@@hconf \space\the\@@hvari
- }%
- \immediate\closeout\@taskstats
- % reset counters
- \setcounter{taskamin}{0}\setcounter{taskamax}{0}%
- \setcounter{taskaomin}{0}\setcounter{taskaomax}{0}%
\pnumrest
\fi
+ % calculate median
+ \newcount\@@med
+ \advance\@@med \value{taskamin}%
+ \advance\@@med \value{taskamax}%
+ \divide\@@med by 2\relax
+ % calculate non-overlap
+ \newcount\@@nomin \newcount\@@nomax
+ \advance\@@nomin \value{taskamin}%
+ \advance\@@nomax \value{taskamax}%
+ \advance\@@nomin -\value{taskaomin}%
+ \advance\@@nomax -\value{taskaomax}%
+ % calculate overlap median
+ \newcount\@@omed
+ \advance\@@omed\@@nomin
+ \advance\@@omed\@@nomax
+ \divide\@@omed by 2\relax
+ % write task stats to file (can be used for reporting by building consecutive
+ % versions, concatenating the data, taking the last row for each date and
+ % plotting, for example)
+ \immediate\openout\@taskstats=taskstats.dat
+ \immediate\write\@taskstats{min max med omin omax omed cp vp}%
+ \immediate\write\@taskstats{%
+ \arabic{taskamin} \arabic{taskamax} \the\@@med
+ \space\the\@@nomin \space \the\@@nomax \space\the\@@omed
+ \space\the\@@hconf \space\the\@@hvari
+ }%
+ \immediate\closeout\@taskstats
+ % reset counters
+ \setcounter{taskamin}{0}\setcounter{taskamax}{0}%
+ \setcounter{taskaomin}{0}\setcounter{taskaomax}{0}%
}}