From 655db674693d83edf4e7e729a24d9ffc779a12b8 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 30 Aug 2013 16:10:55 -0400 Subject: [PATCH] Added \complete to task.sty --- task.sty | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/task.sty b/task.sty index d96d772..649d7dd 100644 --- a/task.sty +++ b/task.sty @@ -88,6 +88,7 @@ \goodbreak\leavevmode\@margin@sig % enable overlap command \let\overlap\@task@overlap + \let\complete\@task@complete % typeset \llap{% \raisebox{-1.8\baselineskip}[0em][0em]{% @@ -104,8 +105,8 @@ \@task@setregs#1||% {\scriptsize \the\@@hconf\% Confidence}% % advance the total counters - \addtocounter{tasktmin}{\@@hmin} - \addtocounter{tasktmax}{\@@hmax} + \addtocounter{tasktmin}{\@@hmin}% + \addtocounter{tasktmax}{\@@hmax}% \fi% }% \hspace{\the\taskspace}% @@ -135,6 +136,19 @@ } +\def\@task@complete#1{% + \ifx\@@h\empty\else + \expandafter\@task@setregs\@@h||% + % undo previous operation + \addtocounter{tasktmin}{-\@@hmin}% + \addtocounter{tasktmax}{-\@@hmax}% + % add exact time + \addtocounter{tasktmin}{#1}% + \addtocounter{tasktmax}{#1}% + \fi +} + + \def\@task@setregs#1-#2||{% \@@hmin#1\relax \@@hmax#2\relax