57 lines
2.2 KiB
TeX
57 lines
2.2 KiB
TeX
|
%% Action Tracker
|
||
|
|
||
|
\RequirePackage{mathabx}% Allows the use of checkboxes in all environments of the meetingmins package.
|
||
|
\usepackage{multido}
|
||
|
\newcounter{personcntr}% Keep track of number of persons
|
||
|
\makeatletter
|
||
|
\newcommand{\action}[2][All]{% \action[<name>]{<time>}{<duty>}
|
||
|
{
|
||
|
|
||
|
\noindent $\Box$~~\textbf{Action (#1)}: #2}
|
||
|
\@ifundefined{person@#1}{% If person doesn't exist
|
||
|
\stepcounter{personcntr}% Next person
|
||
|
\expandafter\xdef\csname person@#1\endcsname{1}% One time/duty
|
||
|
\expandafter\xdef\csname person@bynumber@\thepersoncntr\endcsname{#1}% Number person
|
||
|
|
||
|
}{% Person already exists
|
||
|
\expandafter\xdef\csname person@#1\endcsname{%
|
||
|
\number\numexpr\csname person@#1\endcsname+1}% Step number of time/duty
|
||
|
}%
|
||
|
% \expandafter\xdef\csname person@#1@\csname person@#1\endcsname @time\endcsname{#2}% Store time
|
||
|
\expandafter\xdef\csname person@#1@\csname person@#1\endcsname @duty\endcsname{$\Box$~~#2}% Store duty with checkbox
|
||
|
\ignorespaces
|
||
|
}
|
||
|
\gdef\newpar{\par}% \multido doesn't enjoy \par
|
||
|
|
||
|
\newcommand\printactions{% Print actions
|
||
|
\section*{Action Tracker}% Action Tracker Heading
|
||
|
|
||
|
\newcommand{\oldindent}{\itemindent}% Remember old value for indent
|
||
|
\setlength{\baselineskip}{6pt}% Condense vertical spacing
|
||
|
|
||
|
\def\descriptionBODY{}% Empty descriptionBODY
|
||
|
{\let\item\relax% Prevent expansion of \item
|
||
|
\let\newpar\relax% Prevent expansion of \newpar
|
||
|
\multido{\iPerson=1+1}{\value{personcntr}}{% Step through all persons
|
||
|
% Extract person name
|
||
|
\expandafter\xdef\expandafter\thisperson\expandafter{\csname person@bynumber@\iPerson\endcsname}%
|
||
|
\protected@xdef\descriptionBODY{%
|
||
|
\descriptionBODY%
|
||
|
\item[\thisperson] \leavevmode\newpar}% Add person name to descriptionBODY
|
||
|
% Extract person number
|
||
|
\expandafter\xdef\expandafter\thispersonnum\expandafter{\csname person@\thisperson\endcsname}%
|
||
|
\multido{\iDuty=1+1}{\thispersonnum}{%
|
||
|
\protected@xdef\descriptionBODY{%
|
||
|
\descriptionBODY%
|
||
|
\csname person@\thisperson @\iDuty @duty\endcsname% Add person duty to descriptionBODY
|
||
|
\newpar
|
||
|
}%
|
||
|
}%
|
||
|
}%
|
||
|
}%
|
||
|
% Print person time/duty
|
||
|
\begin{description}
|
||
|
\descriptionBODY
|
||
|
\end{description}
|
||
|
}
|
||
|
\makeatother%
|