Debian Codegraph @

texmf-dist/source/latex/proposal/base/proposal.dtx

raw
1 % \iffalse meta-comment
2 % A class for preparing general proposals, to be instantiated for particular donors
3 %
4 % Copyright (c) 2011 Michael Kohlhase, all rights reserved
5 %
6 % This file is distributed under the terms of the LaTeX Project Public
7 % License from CTAN archives in directory macros/latex/base/lppl.txt.
8 % Either version 1.0 or, at your option, any later version.
9 %
10 % The development version of this file can be found at
11 % https://github.com/KWARC/LaTeX-proposal
12 % \fi
13 %
14 % \iffalse
15 %<cls|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
16 %<cls>\ProvidesClass{proposal}[2016/04/15 v1.5 Project Proposal]
17 %<pdata>\ProvidesPackage{pdata}[2016/04/15 v1.5 Project Data]
18 %<reporting>\ProvidesPackage{reporting}[2016/04/15 v1.5 Project Reporting]
19 %<*driver>
20 \documentclass{ltxdoc}
21 \DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
22 \DoNotIndex{\begin,\AtEndDocument,\newcommand,\newcounter,\stepcounter}
23 \DoNotIndex{\immediate,\openout,\closeout,\message,\typeout}
24 \DoNotIndex{\section,\scshape,\arabic}
25 \EnableCrossrefs
26 %\CodelineIndex
27 %\OnlyDescription
28 \RecordChanges
29 \usepackage{textcomp,url,paralist,a4wide,xspace}
30 \usepackage[show]{ed}
31 \usepackage[maxbibnames=6,hyperref=auto,style=alphabetic,backend=bibtex]{biblatex}
32 \addbibresource{../lib/proposal.bib}
33 \usepackage[bookmarks=true,linkcolor=blue,
34 citecolor=blue,urlcolor=blue,colorlinks=true,
35 breaklinks=true, bookmarksopen=true]{hyperref}
36 \makeindex
37 \def\subversion{\textsc{Subversion}\xspace}
38 \def\git{\textsc{Git}\xspace}
39 \begin{document}
40 \DocInput{proposal.dtx}
41 \end{document}
42 %</driver>
43 % \fi
44 %
45 %\CheckSum{4091}
46 %
47 % \changes{v0.4}{2009/05/12}{copied over from eustrep.dtx}
48 % \changes{v0.5}{2009/05/27}{added gantt charts}
49 % \changes{v0.6}{2009/06/27}{added task referencing system}
50 % \changes{v0.7}{2010/09/22}{added final report infrastructure}
51 % \changes{v0.7}{2010/10/29}{added noRAM option}
52 % \changes{v0.7}{2010/11/01}{added paper list infrastructure}
53 % \changes{v1.0}{2010/11/03}{this works well, releasing to CTAN}
54 % \changes{v1.1}{2010/12/16}{deprecating workphase in favor of attributes}
55 % \changes{v1.1}{2011/01/05}{separating out pdata.sty for data handling and referencing}
56 % \changes{v1.2}{2011/03/18}{separating out dfgproposal.dtx}
57 % \changes{v1.2}{2011/03/19}{adding deliverables}
58 % \changes{v1.3}{2011/05/03}{adding general report handling}
59 % \changes{v1.4}{2012/01/15}{better metadata handling for task-level work
60 % phases and partners, using \texttt{wphases} instead of \texttt{start} and
61 % lists of sites}
62 % \changes{v1.4}{2012/01/18}{changing the argument structure of {\textbackslash joint*} to
63 % \texttt{len} in work packages and tasks}
64 % \changes{v1.4}{2012/01/18}{various extensions for the Jan 2012 EU proposals}
65 % \changes{v1.4}{2012/01/28}{some localization support}
66 % \changes{v1.4}{2013/01/12}{more documentation of milestones}
67 % \changes{v1.5}{2014/01/14}{many layout tweaks support for CVs, milestones in gantt}
68 %
69 % \GetFileInfo{proposal.cls}
70 %
71 % \MakeShortVerb{\|}
72 % \title{Preparing Proposals in {\LaTeX} with \texttt{proposal.cls}}
73 % \author{Michael Kohlhase\\
74 % Computer Science, Jacobs University Bremen\\
75 % \url{http://kwarc.info/kohlhase}}
76 % \maketitle
77 %
78 % \begin{abstract}
79 % The |proposal| class supports many of the generic elements of Grant Proposals. It is
80 % optimized towards collaborative projects, and should specialized to particular funding
81 % agencies.
82 % \end{abstract}
83 %
84 % \tableofcontents\newpage
85 %
86 % \section{Introduction}\label{sec:intro}
87 %
88 % Writing grant proposals is a collaborative effort that requires the integration of
89 % contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
90 % allows to coordinate the process via a source code control system like \git or
91 % \subversion, allowing the proposal writing team to concentrate on the contents rather
92 % than the mechanics of wrangling with text fragments and revisions. In fact the
93 % |proposal| package has evolved out of a series of collaborative proposal writing
94 % efforts, where large teams (up to 30 individuals from up to 20 sites) have written a
95 % 100-page proposal in three weeks (with over 2000 commits). Such collaborative writing
96 % sprints are impossible without a revision control system and a ``semantic'' document
97 % class that generates tables, charts, and deliverable lists from content markup and thus
98 % takes care of many of the routine tasks of keeping information consistent.
99 %
100 % The |proposal| class supports many of the generic elements of Grant Proposals. The
101 % package documentation is still preliminary, fragmented and incomplete.
102 %
103 % The |proposal| class is distributed under the terms of the LaTeX Project Public License
104 % from CTAN archives in directory |macros/latex/base/lppl.txt|. Either version 1.0 or, at
105 % your option, any later version.
106 %
107 % The CTAN archive always contains the latest stable version, the development version can
108 % be found on GitHub at \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports
109 % please use the issue tracker there. Please feel free to fork the repository and provide
110 % extensions and improvements.
111 %
112 % The development version also contains example proposals and a very useful script that
113 % generates GitHub issues for all the workpackages, tasks, and deliverables. This is a
114 % great way of starting up a project and controlling its progress. The OpenDreamKit EU
115 % project (see \url{http://opendreamkit.org}) uses this for its (very public) project
116 % planning on the issue tracker at \url{https://github.com/OpenDreamKit} after (also
117 % publicly) developing the proposal on GitHub.
118 %
119 % Finally, the GitHub reposistory contains example project proposals and specialized
120 % Makefiles that help start off the proposal development process. These are not part of
121 % the CTAN/TeXLive distributions.
122 %
123 % \section{The User Interface}\label{sec:user-interface}
124 %
125 % In this section we will describe the functionality offered by the |proposal| class
126 % along the lines of the macros and environments the class provides.
127 %
128 % \subsection{Package Options}\label{sec:user:options}
129 %
130 % The |proposal| package takes the options |submit|, |noworkareas|, |RAM|, |deliverables|,
131 % |wpsubsection|, |keys|, |svninfo|, |gitinfo|, and |public|.
132 %
133 % The \DescribeMacro{submit}|submit| option will disable various proposal management decorations
134 % which are enabled by default for submission.
135 %
136 % The \DescribeMacro{noworkareas}|noworkareas| option specifies that we do not want to structure
137 % our work plan into work areas (see section~\ref{sec:user:wpwa}).
138 %
139 % The \DescribeMacro{RAM}|RAM| option specifies that we specify research assistant months
140 % in the effort tallies (see section~\ref{sec:user:wpwa}).
141 %
142 % The \DescribeMacro{deliverables}|deliverables| option specifies that we specify
143 % deliverables in the grant proposal (see section~\ref{sec:user:deliverables}). As the
144 % deliverables management needs extra support, we only activate them via this option.
145 %
146 % The \DescribeMacro{wpsubsection}|wpsubsection| option specifies that we want to see
147 % subsections headings for the WPs (and WAs, if we have them).
148 %
149 % The \DescribeMacro{report}|report| option specifies that we want to use the |report.cls|
150 % class as a basis for |proposal| instead of the default |article.cls|.
151 %
152 % The \DescribeMacro{keys}|keys| option specifies that we want to see the values of various
153 % keyval arguments in the margin.
154 %
155 % The \DescribeMacro{svninfo}|svninfo| option specifies specifies that we want to use the
156 % |svninfo| package for displaying version control metadata in the document (except when
157 % the |submit| option is also given). For this we need the |svninfo| metadata line of the
158 % form
159 % \begin{verbatim}
160 % \SVN $Id: proposal.tex 13610 2007-07-11 04:30:16Z kohlhase $
161 % \svnKeyword $HeadURL: https://svn.kwarc.info/../proposal.tex $
162 % \end{verbatim}
163 % at the beginning of each file (or in the preamble).
164 %
165 % Analogously, the \DescribeMacro{gitinfo}|gitinfo| option uses the |gitinfo2| package for
166 % GIT metadata. Note that you will need to install the post-commit hooks in your working
167 % copy according to~\cite{gitinfo2:on} for this to work.
168 %
169 % Finally, the \DescribeMacro{public}|public| option allows to hide certain sensitive
170 % (e.g. financial) parts of the proposal. For this, the |proposal| class provides the
171 % \DescribeEnv{private}|private| environment. If the option |public| is set, the parts of
172 % the document between |\begin{private}| and |\end{private}| do not produce output. This
173 % is useful for producing public versions of the proposal that hide confidential
174 % parts. Note that both |\begin{private}| and |\end{private}| {\emph{have to be on lines
175 % of their own may not have any leading whitespace}} otherwise an error occurs and
176 % {\LaTeX} gives error messages that are difficult to comprehend. An alternative way to
177 % distinguish private and public sections are to use the
178 % \DescribeMacro{\ifpublic}|\ifpublic| conditional: |\ifpublic{3}\else{5}\fi| will result
179 % in ``5'' in the submitted draft and ``3'' in the public document.
180 %
181 % \subsection{Proposal Metadata and Title page}\label{sec:user:metadata}
182 %
183 % The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal|
184 % environment, which also generates the title page and the first section of the proposal
185 % as well as the last pages of the proposal with the signatures, enclosures, and
186 % references. The |proposal| environment should contain all the mandatory parts of the
187 % proposal text. The |proposal| environment uses the following keys to specify metadata.
188 % \begin{compactitem}
189 % \item \DescribeMacro{title}|title| for the proposal title (used on the title page),
190 % \item \DescribeMacro{instrument}|instrument| for the instrument of funding
191 % that you would like to apply for,
192 % \item \DescribeMacro{acronym}|acronym| for the proposal acronym, possibly accompanied
193 % by an \DescribeMacro{acrolong}|acrolong| that explains it. The acronym will also be used in
194 % the page headings.
195 % \item \DescribeMacro{start}|start| for the start date of the proposed fragment of the
196 % project, and \DescribeMacro{months}|months| for the length of the proposal in
197 % months. Both have to be specified for the |proposal| class to work.
198 % \item If the proposal only concerns a part of a longer-running project, the
199 % \DescribeMacro{since}|since| key allows to specify the date since when the overall
200 % project runs. Finally, the \DescribeMacro{fundsuntil}|fundsuntil| allows to specify a
201 % date until which the funds last.
202 % \item \DescribeMacro{discipline}|discipline| for the academic discipline and |areas| for
203 % the research areas in that discipline.
204 % \item \DescribeMacro{PI}|PI| to declare the principal investigator. For collaborative
205 % proposals we can use the |PI| key multiple times. The |proposal| package uses the
206 % |workaddress| package for representation of personal metadata,
207 % see~\cite{Kohlhase:workaddress:ctan} or the file |proposal.tex| for details.
208 % \item Many collaborative proposals are shared between two institutions, which we can
209 % declare with the \DescribeMacro{site}|site| key. As this changes the interface this
210 % should not be used for single-institution proposals. We will describe the setup for a
211 % single-site proposal below and point out the differences. The example |proposal.tex|
212 % is a two-site proposal.
213 % \end{compactitem}
214 % If the |acronym| and |acrolong| are given, then they automatically define the macros
215 % \DescribeMacro{\pn}|\pn| and \DescribeMacro{\pnlong}|\pnlong| which allow to use the
216 % project acronym (\underline{p}roject \underline{n}name) and its long version in the
217 % text. Note that these macros use |\xspace| internallly, so they do not have to be
218 % enclosed in curly braces.
219 %
220 % There are two ways of organizing the distribution of personnel resources when developing
221 % a proposal. Either the coordinator takes a \emph{top-down approach} where she assigns
222 % person months (PM) to the respective site, of she takes a \emph{bottom-up approach},
223 % where the sites ``request'' personnel resources by marking them up in the CVs of the
224 % researchers in the site descriptions. |proposal.cls| supports both of these. Support
225 % for the first is configured via the \DescribeMacro{topdownPM}|topdownPM| key and for the
226 % other via the \DescribeMacro{botupPM}|botupPM| key. They add respective lines for
227 % planning in the WA/WP figure (see~\ref{sec:user:wpwa}).
228 %
229 % \subsection{Proposal Appearance}\label{sec:user:appearance}
230 %
231 % The |proposal| environment takes a second set of keyval arguments that allow to
232 % fine-tune the appearance of the proposal document. \ednote{move the RAM,
233 % wpsectionheadings,... options here.}
234 % \begin{compactitem}
235 % \item If the \DescribeMacro{compactht}|compactht| key is given (it does not need a
236 % value), then the header tables\ednote{describe them somewhere and reference here} are
237 % made compact, i.e. the sites that do not have a contribution to the work package or work
238 % area do not get listed. This is useful for proposals with more than 8 partners.
239 % \end{compactitem}
240 %
241 % The |proposal| package supplies the \DescribeEnv{emphbox}|emphbox| environment to create
242 % boxes of emphasized material we want to call attention to.
243 %
244 % \subsection{Objectives}\label{sec:user:objectives}
245 %
246 % The work plan starts with a discussion of objectives, which may be referenced in the
247 % text later. The |proposal| package provides the \DescribeEnv{objective}|objective|
248 % environment that allows to mark up individual objectives. It takes a keyval argument
249 % with the keys |id| for identification, |title| for the objective title, and |short| for
250 % a short title that can be used for referencing when the title is too long. The
251 % objectives can be referenced via \DescribeMacro{\OBJref}|\OJBref{|\meta{id}|}| by their
252 % label and via \DescribeMacro{\OBJtref}|\OJBtref{|\meta{id}|}| by label and (short if it
253 % was specified) title.
254 %
255 % \subsection{Work Areas and Work Packages}\label{sec:user:wpwa}
256 %
257 % Grant proposals have another part that is often highly stylized; the work plan. This is
258 % usually structured into ``work packages'' --- i.e. work items that address a cohesive
259 % aspect of the proposed work. These work packages are usually consecutively numbered,
260 % have a title, and an associated effort estimation. As work packages are the ``atomic''
261 % planning units, they are usually heavily cross-referenced. A well-written proposal
262 % usually contains a table giving an overview over the work packages and their efforts and
263 % a Gantt chart showing the temporal distribution of the proposed work to allow the
264 % reviewers to get a clear picture of the feasibility of the research and development
265 % proposed. But this picture is also essential during the development of a proposal (which
266 % the |proposal| package aims to support), when the work packages (and their estimated
267 % efforts) usually change considerably. Therefore the |proposal| class standardizes
268 % markup for work packages and automatically computes the work package table (which can be
269 % inserted into the table via the \DescribeMacro{\wpfig}|\wpfig| macro) and the Gantt
270 % Chart (see Section~\ref{sec:user:gantt}).
271 %
272 % To achieve the automation, work plan is marked up by the
273 % \DescribeEnv{workplan}|workplan| environment, which sets up various internal counters and
274 % bookeeping macros. It contains texts and |workpackage| environments for the work
275 % packages.
276 %
277 % The purpose of the \DescribeEnv{workpackage}|workpackage| environment is to mark up a
278 % fragment of text as a work package description and specify the metadata so that it can
279 % be used in the work package table and Gantt chart generation. The metadata is specified
280 % by the following keys:
281 % \begin{compactitem}
282 % \item The \DescribeMacro{id}|id| key is used to specify a label for cross-referencing the
283 % work package or work group, it must be document-unique.
284 % \item The \DescribeMacro{title}|title| and \DescribeMacro{short}|short| keys are used
285 % for the work package/group title. The short title is used in tables and should not be
286 % longer than 15 characters.
287 % \item The \DescribeMacro{wphases}|wphases| key is used according to
288 % Section~\ref{sec:user:workphase}
289 % \item The \DescribeMacro{requires}|requires| key can be used to mark, up dependencies
290 % between tasks. If |requires=\taskin{|\meta{rid}|}{|\meta{wp}|}| is given in a task
291 % with |id=|\meta{t}, then task \meta{rid} in work package \meta{wp} must be completed
292 % for task \meta{t} to become possible. This key will draw an arrow into the gantt chart
293 % from the end of task \meta{rid} to \meta{t}. Note that dependencies should always
294 % point forward in time. Furthermore, note that the fact that dependencies always go
295 % from the end of the source to the beginning of the target work phase is intentional,
296 % if this does not meet your needs, then you should probably break a work phase into
297 % pieces that can be addressed separately.
298 % \item In single-site proposals, the \DescribeMacro{RM}|RM| (and \DescribeMacro{RAM}|RAM|
299 % if the |RAM| option was given) keys are used to specify the estimated efforts to be
300 % expended on research and development in this work package. Both are specified in
301 % person months. |RM| is used for ``researcher months'' (wissenschaftlicher Mitarbeiter)
302 % and |RAM| for ``research assistant months'' (wissenschaftliche Hilfskraft).
303 % \item In multi-site proposals, the |proposal| package generates the keys
304 % \DescribeMacro{*RM}\meta{site}|RM| (and \DescribeMacro{*RAM}\meta{site}|RAM|) where
305 % \meta{site} is any site label declared via the |site| key in the top-level |proposal|
306 % environment. This can be used to specify the person months that the site spends on
307 % this work package (the value for work groups is automatically computed (remember to
308 % run {\LaTeX} twice for this)).
309 % \item In multi-site proposals the \DescribeMacro{lead} |lead| key specifies the work
310 % package or work group lead, the value of this feature should be the short name of the
311 % respective partner.
312 % \item For work packages with many prospers the \DescribeMacro{swsites}|swsites| key
313 % can be given (no value needed) to turn the site names sideways to conserve
314 % (horizontal) space.
315 % \end{compactitem}
316 %
317 % It is often useful to group the work packages in a proposal further (especially for
318 % larger, collaborative proposals). This can be done via the
319 % \DescribeEnv{workarea}|workarea| environment, which groups work packages. This
320 % environment takes the same keys as the |workpackage| environment, except for the
321 % efforts, which can be computed automatically from the work packages it groups.
322 %
323 % As the author of the |proposal| class likes more structured proposals, using work
324 % areas is the default, but the |proposal| class can also be used with the
325 % |noworkareas| option for less structured (smaller) proposals.
326 %
327 % \subsection{Tasks}\label{sec:user:task}
328 %
329 % In the work packages we can list tasks that need to be undertaken with the
330 % \DescribeEnv{tasklist}|tasklist| environment. The individual tasks are marked up with
331 % the \DescribeEnv{task}|task| environment. This takes a keyval argument with the keys
332 % |id| for identification, |title| for a title, and the workphase keys |wphases|,
333 % |start|, |end|, and |force| (see Section~\ref{sec:user:workphase}). For planning
334 % involvement we can specify the overall person months via the |PM| key, the task lead via
335 % |lead|, and the partners involved via the |partners| key. Finally task dependencies can
336 % be specified via the |requires| key.
337 %
338 % Tasks can be referenced by the \DescribeMacro{\taskref}|\taskref| macro that takes two
339 % arguments: the work package identifier and the task identifier. As for work packages and
340 % work areas, there is a long reference variant with work package title:
341 % \DescribeMacro{\tasktref}|\tasktref|. Finally,
342 % \DescribeMacro{\localtaskref}|\localtaskref| references a task in the local work package
343 % by the identifier in its argument.
344 %
345 % \subsection{Work Phase Metadata}\label{sec:user:workphase}
346 %
347 % The |task| and |workpackage| allow the \DescribeMacro{wphases}|wphases| key to specify
348 % the a list of work phases. The value of this key is comma-separated list of work phase
349 % specifications of the form \meta{start}|-|\meta{end} or
350 % \meta{start}|-|\meta{end}|!|\meta{force}, where \meta{start} and \meta{end} delimit the
351 % run time of the work phase and the optional |!|\meta{force} specifies the work force,
352 % i.e. the intensity of work as a number between 0 and 1. If no force is given, the
353 % default is 1. The main reason for specifying this metadata for tasks is to generate a
354 % Gantt chart (see Section~\ref{sec:user:gantt}).
355 %
356 % \subsection{Gantt Charts}\label{sec:user:gantt}
357 %
358 % Gantt charts are used in proposals to show the distribution of activities in work
359 % packages over time. A gantt chart is represented by the \DescribeEnv{gantt}|gantt|
360 % environment that takes a on optional keyval argument. The keys
361 % \DescribeMacro{xscale}|xscale| and \DescribeMacro{yscale}|yscale| are used to specify a
362 % scale factors for the chart so that it fits on the page. The \DescribeMacro{step}|step|
363 % key allows to specify the steps (in months) of the vertical auxiliary lines. Finally,
364 % the \DescribeMacro{draft}|draft| key specifies that plausibility checks (that can be
365 % expensive to run) are carried out. Note that the value does not have to be given, so
366 % |\begin{gantt}{draft,yscale=.5,step=3}| is a perfectly good invocation.
367 %
368 % Usually, the |gantt| environment is not used however, since it is part of the
369 % \DescribeMacro{\ganttchart} macro that takes the same keys. This generates a whole
370 % Gantt chart automatically from the work phase specifications in the work packages. As
371 % above we have to run {\LaTeX} two times for the work phases to show up.
372 %
373 % \subsection{Milestones and Deliverables}\label{sec:user:deliverables}
374 %
375 % Many proposal formats foresee that project progress will be tracked in the form of
376 % \emph{milestones} -- points in the project, where a predefined state of affairs is
377 % reached -- and \emph{deliverables} -- tangible project outcomes that have to be
378 % delivered. Correspondingly, milestones and deliverables have to be specified in the
379 % proposal and accounted for in the project reports. To facilitate this the |proposal|
380 % class and its instances provide a simple infrastructure for dealing with milestones and
381 % deliverables.
382 %
383 % Milestones are usually given in a special table\footnote{this is the default provided by
384 % the base |proposal| class, it can be specialized for proposal class instances by
385 % redefining the |@milestones| environment and correspondingly the |\@milestone| macro.},
386 % which we markup up with the \DescribeMacro{milestones}|milestones| environment that
387 % takes care of initialization and numbering issues. This contains a list of milestone
388 % descriptions via the \DescribeMacro{\milestone}|\milestone| macro which is invoked as
389 % |\milestone[|\meta{keys}|]{|\meta{title}|}{|\meta{desc}|}|, where \meta{keys} supports
390 % the keys |id| for identification |month| for specifying the milestone date (in months of
391 % the project duration). Milestones are numbered with labels whose shape can be customized
392 % by redefining \DescribeMacro{\milestone@label}|\milestone@label| and referenced by the
393 % \DescribeMacro{\mileref}|\mileref{|\meta{id}|}| and
394 % \DescribeMacro{\miletref}|\miletref{|\meta{id}|}| for a reference with milestone
395 % title. |\pdatacount{all}{miles}| gives the number of milestones.
396 %
397 % Deliverables are usually defined as part of the work package descriptions (see
398 % Section~\ref{sec:user:wpwa}) and listed in an overview table in a separate of the
399 % proposal. As for the milestones, we use an environment
400 % \DescribeMacro{wpdelivs}|wpdelivs| that contains the deliverable descriptions. These are
401 % marked up via the \DescribeMacro{wpdeliv} environment which takes an optional keyval
402 % argument for the deliverable metadata a regular argument for the title and contains the
403 % description of the deliverable as the body. For the metadata we have the keys |id| for
404 % the deliverable identifier, |due| for the target date (a number that denotes the project
405 % month), |nature| and |dissem| for specifying the deliverable nature and dissemination
406 % status (usually as short strings prescribed by the proposal template), and |miles| for
407 % the milestone this deliverable is targeted for (specified by the milestone
408 % identifier). For repeating deliverables (e.g. project reports), both |due| and |miles|
409 % can contain comma-separated lists. Deliverables are numbered by labels whose shape can
410 % be customized by number, where the shape of the label can be specified by redefining
411 % \DescribeMacro{\deliv@label}|\deliv@label| and referenced by
412 % \DescribeMacro{\delivref}|\delivref{|\meta{wp}|}{|\meta{id}|}| where \meta{wp} is the
413 % work package identifier and \meta{id} that if the deliverable and
414 % \DescribeMacro{\delivtref}|\delivtref{|\meta{wp}|}{|\meta{id}|}| for a reference with
415 % title. \DescribeMacro{\localdelivref}|\localdelivref| can be used to reference
416 % deliverables in the same work package. |\pdatacount{|\meta{wp}|}{delivs}| gives the
417 % number of milestones of the work package \meta{wp} |\pdatacount{all}{delivs}| that of
418 % all deliverables (aggregating over all work packages).
419 %
420 % Some proposal templates ask for an overview table of the deliverables which aggregates
421 % the deliverables of the respective work packages and areas ordered by due date. This can
422 % be generated with the \DescribeMacro{\inputdelivs}|\inputdelivs| macro. This works index
423 % generation in {\LaTeX}. The |wpdeliv| environment writes the deliverable data to a file
424 % \meta{main}|.delivs|, which can be processed externally (usually just sorting with
425 % |sort| in Unix is sufficient) into \meta{main}|.deliverables|, which is then input via
426 % the |\inputdelivs| macro.
427 %
428 % In some proposals, also work areas can have deliverables, then the above hold
429 % analogously for \DescribeMacro{wadelivs}|wpdelivs| and \DescribeMacro{wadeliv}|wadeliv|
430 % environments.
431 %
432 % Note that handling deliverables adds considerable overhead to proposal formatting and
433 % adds auxiliary files, so they are only activated if the |deliverables| option is given
434 % (see Section~\ref{sec:user:options}).
435 %
436 % \subsection{Referencing and Hyperlinking}\label{sec:user:hyperlinking}
437 %
438 % The |proposal| package extends the hyperlinking provided by the |hyperref| package it
439 % includes to work packages, work groups, \ldots. Whenever these are defined using the
440 % |proposal| infrastructure, the class saves the relevant information in the auxiliary
441 % file \meta{proposal}|.aux|. This information can be referenced via the
442 % \DescribeMacro {\pdataref}|\pdataref| macro, which takes three arguments.
443 %
444 % In a reference |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{aspect}|}| the first argument
445 % \meta{type} specifies the type of the object (currently one of |wp|, |wa|, and
446 % |partner|) to be referenced, \meta{id} specifies the identifier of the referenced object
447 % (it matches the identifier given in the |id| key of the object), and \meta{aspect}
448 % specifies the aspect of the saved information that is referenced.
449 %
450 % \DescribeMacro{\pdatarefFB}|\pdatarefFB{|\meta{type}|}{|\meta{id}|}{|\meta{a1}|}{|\meta{a2}|}|
451 % tries first |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{a1}|}| and if that is not
452 % given |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{a2}|}|.
453 %
454 % For a work package \meta{aspect} can be |number|, (the work package number), |label|
455 % (the label {\bf{WP$n$}} where $n$ is the work package number for referencing), |title|
456 % (the work package title), |lead| the work package leader, |short| (a short version of
457 % the WP title for tables). For work groups we have the same aspects with analogous
458 % meanings. In all cases, the referenced information carries a hyperlink to the referenced
459 % object.
460 %
461 % The \DescribeMacro{\pdataRef}|\pdataRef| and \DescribeMacro{\pdataRefFB}|\pdataRefFB|
462 % macros are variant of |\pdataref| and |\pdataRef| that also carry a hyperlink (if the
463 % |hyperref| package is loaded).
464 %
465 % The \DescribeMacro{\pdatacount}|\pdatacount| macro gives access to the numbers of
466 % certain aspects. For instance, the number of work packages in the proposal can be cited
467 % by |\pdatacount{all}{wp}|, similarly for work areas (if they are enabled), and finally,
468 % |\pdatacount{|\meta{wa}|}{wp}| gives the number of work packages for a work area
469 % \meta{wa}. This is very useful for talking about work plans in a general way. Other
470 % objects that can be counted are deliverables (|\pdatacount{all}{deliverables}|) and
471 % milestones (|\pdatacount{all}{milestones}|).
472 %
473 % Note that since the referencable information is written into the project data file
474 % \meta{proposal}|.pdata| file, it is available for forward references. However, it will
475 % only become available when the project data file is read, so the proposal has to be
476 % formatted twice for references to be correct.
477 %
478 % Finally, the |proposal| package supplies specialized reference macros for work packages
479 % and areas. The \DescribeMacro{\WPref}|\WPref| macro takes a work package identifier as
480 % an argument and makes a reference: |\WPref{|\meta{id}|}| abbreviates
481 % |\pdataRef{wp}{|\meta{id}|}{label}|. The \DescribeMacro{\WPtref}|\WPtref| macro is
482 % similar, but also prints out the (short) title: |\WPref{|\meta{id}|}| abbreviates
483 % |\pdataRef{wp}{|\meta{id}|}{label}: \pdataRef{wp}{|\meta{id}|}{title}|. Unless the
484 % |noworkareas| macro is set, we also have the variants \DescribeMacro{\WAref}|\WAref| and
485 % \DescribeMacro{\WAtref}|\WAtref| for work areas.
486 %
487 % \subsection{Coherence}\label{sec:user:coherence}
488 %
489 % Many proposals require ways to show coherence between the partners. The |proposal| class
490 % offers the macro \DescribeMacro{\coherencematrix}|\coherencematrix| for this which
491 % generates a matrix of symbols specifying joint publications, project organization,
492 % software/resource development, and supervision of students by the project partners that
493 % have been declared by the \DescribeMacro{\jointpub}|\jointpub|,
494 % \DescribeMacro{\jointsub}|\jointproj|, \DescribeMacro{\jointorga}|\jointorga|
495 % \DescribeMacro{\jointsoft}|\jointsoft|, and \DescribeMacro{\jointsup}|\jointsup| macros
496 % before. These macros all take a comma-separated list of site identifiers as an
497 % argument. Use for instance |\jointproj{a,b,c}| to specify that the sites with the
498 % identifiers |a|, |b| and |c| have a joint
499 % project. \DescribeMacro{\coherencetable}|\coherencetable| is a variant which packages
500 % the coherence table in a table figure with label |tab:collaboration|.
501 %
502 % The symbols used an be configured by redefining \DescribeMacro{\jpub}|\jpub|,
503 % \DescribeMacro{\jproj}|\jproj|, and \DescribeMacro{\jorga}|\jorga|,
504 % \DescribeMacro{\jsoft}|\jsoft|, and \DescribeMacro{\jsup}|\jsup|.
505 %
506 % \subsection{Localization}\label{sec:use:localization}
507 %
508 % The |proposal| class offers some basic support for localization. This is still partial
509 % though, and I am not sure that this is the best way of setting things up. What I do is
510 % to define macros for all generated texts that can be redefined in the proposal classes
511 % that build in |proposal|. For instance the |dfgproposal| class~\cite{Kohlhase:pdrp:ctan}
512 % provides an option |german| for german-language proposals and project reports that
513 % triggers a redefinition of all of these macros at read time.
514 %
515 % \section{Limitations and Enhancements}\label{sec:limitations}
516 %
517 % The |proposal| is relatively early in its development, and many enhancements are
518 % conceivable. We will list them here.
519 % \begin{enumerate}
520 % \item macros cannot be used in work package and work area titles. They really mess up our
521 % |\wpfig| automation. The problem is that they are evaluated too early, and our trick
522 % with making them undefined while collecting the parts of the table-rows only works if
523 % we know which macros we may expect. We might specify all ``allowable'' macros in an
524 % optional key |protectmacro|, which is defined via\vspace*{-.7em}
525 % \begin{verbatim}
526 % \define@key{wpfig}{protectmacro}{\epandafter\let\csname #1\endcsname=\relax}
527 % \end{verbatim}
528 % \vspace*{-2em} But I am not sure that this will work.
529 % \item It would be great, if in the Gantt Charts, we could include some plausibility
530 % checks (for draft = not |submit| mode). I can see two at the moment:
531 % \begin{itemize}
532 % \item calculating the effort (i.e. the weight of the black area) and visualizing
533 % it. Then we could check whether that is larger than the effort declared for the work
534 % package.
535 % \item calculating (and visualizing) the monthly effort. That should be kind of even
536 % (or it has to be explained in the positions requested).
537 % \end{itemize}
538 % \item we currently do not have a way to relate |PI|s to |site|s, but we do not really
539 % need to.
540 % \end{enumerate}
541 % If you have other enhancements to propose or feel you can alleviate some limitation,
542 % please feel free to contact the author.
543 %
544 % \section*{Acknowledgements}
545 %
546 % The author is indebted to Jake Hartenstein, Christoph Lange, Florian Rabe, Lutz
547 % Schr\"oder, and Tsanko Tsankov for error reports, feature suggestions, and code
548 % snippets.
549 %
550 % \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage
551 %
552 % \section{The Implementation}\label{sec:implementation}
553 %
554 % In this section we describe the implementation of the functionality of the |proposal| package.
555 %
556 % \subsection{Package Options and Format Initialization}\label{sec:impl:options}
557 %
558 % We first set up the options for the package.
559 %
560 % \begin{macrocode}
561 %<*cls|reporting>
562 \newif\if@wpsubsection\@wpsubsectionfalse
563 \newif\ifsubmit\submitfalse
564 \newif\ifgrantagreement\grantagreementfalse
565 \newif\ifpublic\publicfalse
566 \newif\ifkeys\keysfalse
567 \newif\ifdelivs\delivsfalse
568 \newif\ifwork@areas\work@areastrue
569 \newif\if@RAM\@RAMfalse
570 \newif\if@svninfo\@svninfofalse
571 \newif\if@gitinfo\@gitinfofalse
572 \def\proposal@class{article}
573 \DeclareOption{wpsubsection}{\@wpsubsectiontrue}
574 \DeclareOption{submit}{\submittrue}
575 \DeclareOption{grantagreement}{\grantagreementtrue}
576 \DeclareOption{gitinfo}{\@gitinfotrue}
577 \DeclareOption{svninfo}{\@svninfotrue}
578 \DeclareOption{public}{\publictrue}
579 \DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}}
580 \DeclareOption{RAM}{\@RAMtrue}
581 \DeclareOption{report}{\def\proposal@class{report}}
582 \DeclareOption{keys}{\keystrue}
583 \DeclareOption{deliverables}{\delivstrue}
584 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
585 \ProcessOptions
586 % \end{macrocode}
587 %
588 % Then we load the packages we make use of
589 %
590 % \begin{macrocode}
591 \LoadClass[a4paper,twoside]{\proposal@class}
592 \RequirePackage{amssymb}
593 \RequirePackage{wasysym}
594 \RequirePackage{url}
595 \RequirePackage{graphicx}
596 \RequirePackage{colortbl}
597 \RequirePackage{xcolor}
598 \RequirePackage{rotating}
599 \RequirePackage{fancyhdr}
600 \RequirePackage{array}
601 \RequirePackage{xspace}
602 \RequirePackage{comment}
603 \AtBeginDocument{\ifpublic\excludecomment{private}\fi}
604 \RequirePackage{tikz}
605 \RequirePackage{paralist}
606 \RequirePackage[a4paper,margin=18mm]{geometry}
607 \RequirePackage{boxedminipage}
608 % so that ednotes in wps do not run out of symbols
609 \renewcommand{\thempfootnote}{\roman{mpfootnote}}
610 \renewcommand{\familydefault}{\sfdefault}
611 \RequirePackage[scaled=.90]{helvet}
612 \RequirePackage{textcomp}
613 \RequirePackage[hyperref=auto,style=alphabetic,defernumbers=true,backend=bibtex,backref=true,firstinits=true,maxbibnames=6]{biblatex}[2010/11-19]
614 \RequirePackage{csquotes}
615 \RequirePackage{mdframed}
616 \RequirePackage{pdata}
617 % \end{macrocode}
618 % in submit mode, we make the links a bit darker, so they print better.
619 % \begin{macrocode}
620 \definecolor{darkblue}{rgb}{0,0,.7}
621 \ifsubmit\def\prop@link@color{darkblue}\else\def\prop@link@color{blue}\fi
622 \RequirePackage[bookmarks=true,linkcolor=\prop@link@color,
623 citecolor=\prop@link@color,urlcolor=\prop@link@color,colorlinks=true,
624 breaklinks=true, bookmarksopen=true]{hyperref}
625 % \end{macrocode}
626 %
627 % the |ed| package~\cite{Kohlhase:ed:ctan} is very useful for collaborative writing and
628 % passing messages between collaborators or simply reminding yourself of editing tasks, so
629 % we preload it in the class. However, we only want to show the information in draft
630 % mode. Furthermore, we adapt the options for the |svninfo| and |gitinfo2| packages.
631 %
632 % \begin{macrocode}
633 \ifsubmit
634 \RequirePackage[hide]{ed}
635 \if@svninfo\RequirePackage[final,today]{svninfo}\fi
636 \else
637 \RequirePackage[show]{ed}
638 \if@svninfo\RequirePackage[eso-foot,today]{svninfo}\fi
639 \if@gitinfo\RequirePackage[mark]{gitinfo2}\fi
640 \fi
641 \renewcommand\ednoteshape{\sl\footnotesize}
642 % \end{macrocode}
643 %
644 % \begin{environment}{private}
645 % We configure the |comment| package, so that it provides the |private| environment
646 % depending on the status of the |public| option.
647 % \begin{macrocode}
648 \ifpublic\excludecomment{private}\else\includecomment{private}\fi
649 % \end{macrocode}
650 % \end{environment}
651 %
652 % And we set up the appearance of the proposal. We want numbered subsubsections.
653 % \begin{macrocode}
654 \setcounter{secnumdepth}{3}
655 % \end{macrocode}
656 % We specify the page headings.
657 % \begin{macrocode}
658 \newif\ifofpage\ofpagefalse
659 \ifgrantagreement
660 \fancyhead{}
661 \renewcommand{\headrulewidth}{0pt}
662 \renewcommand{\footrulewidth}{0.4pt}
663 \else
664 \fancyhead[RE,LO]{\prop@gen@acronym}
665 \fancyhfoffset{0pt}
666 \fi
667 \fancyfoot[C]{}
668 \newcommand\prop@of@pages[2]{page~#1\ifofpage~of~#2\fi}
669 \ifgrantagreement
670 \fancyfoot[L]{\prop@gen@proposalnumber\quad \prop@gen@acronym\quad --\quad Part B}
671 \fancyfoot[R]{\thepage}
672 \else
673 \fancyhead[LE,RO]{\prop@of@pages\thepage{\pdataref@num{prop}{page}{last}}}
674 \fi
675 \pagestyle{fancyplain}
676 %</cls|reporting>
677 % \end{macrocode}
678 %
679 % \subsection{Proposal Metadata}\label{sec:impl:metadata}
680 %
681 % Most of the metadata functionality is encapsulated into the \DescribeMacro{pdata}|pdata|
682 % package, which is shared by the proposal and report classes. |pdata.sty| first loads the
683 % |workaddress| package from sTeX and supplies the Euro symbol.
684 % \begin{macrocode}
685 %<*pdata>
686 \RequirePackage{workaddress}[2011/05/03]
687 \RequirePackage{eurosym}
688 % \end{macrocode}
689 % We define the keys for metadata declarations in the |proposal| environment, they park
690 % their argument in an internal macro for use in the title page. The |site| key is the
691 % most complicated, so we take care of it first: We need a switch |\if@sites| that is set
692 % to true when the |site| key is used. Furthermore |site=|\meta{site} makes new keys
693 % \meta{site}|RM| and \meta{site}|RAM| (if the |RAM| option was set) for the
694 % |workpackage| environment and records the sites in the |\prop@gen@sites| token register.
695 % \begin{macrocode}
696 \newif\if@sites\@sitesfalse\let\prop@gen@sites=\relax%
697 \newcounter{@site}%
698 \define@key{prop@gen}{site}{\@sitestrue\@dmp{site=#1}%
699 \stepcounter{@site}\pdata@def{site}{#1}{number}{\the@site}%
700 \@ifundefined{prop@gen@sites}{\xdef\prop@gen@sites{#1}}{\xdef\prop@gen@sites{\prop@gen@sites,#1}}%
701 \define@key{prop@gen}{#1RM}{\pdata@def{site}{#1}{intendedRM}{##1}}%
702 \define@key{prop@gen}{#1RAM}{\pdata@def{site}{#1}{intendedRAM}{##1}}
703 \define@key{workpackage}{#1RM}{\pdata@def\wp@id{#1}{RM}{##1}}%
704 \define@key{workpackage}{#1RAM}{\pdata@def\wp@id{#1}{RAM}{##1}}
705 \define@key{prop@gen}{#1employed}{{\let\tabularnewline\relax\let\hline\relax\let\wa@ref\relax%
706 \@ifundefined{prop@gen@employed@lines}%
707 {\xdef\prop@gen@employed@lines{\wa@ref{institution}{#1}{shortname} & ##1\tabularnewline\hline}}%
708 {\xdef\prop@gen@employed@lines{\prop@gen@employed@lines \wa@ref{institution}{#1}{shortname} & ##1\tabularnewline\hline}}}}}
709 % \end{macrocode}
710 % If there are no sites, then we have to define keys |RM| and |RAM| that store the
711 % intended research (assistant months). Unfortunately, we cannot just include this in the
712 % |\if@sites| conditional here, since that is only set at runtime.
713 % \begin{macrocode}
714 \define@key{prop@gen}{RM}{\@dmp{RM=#1}\if@sites%
715 \PackageWarning{Do not use the RM key in the presence of sites}\else%
716 \pdata@def{all}{intended}{RM}{#1}\fi}
717 \define@key{prop@gen}{RAM}{\@dmp{RAM=#1}\if@sites%
718 \PackageWarning{Do not use the RAM key in the presence of sites}\else%
719 \pdata@def{all}{intended}{RAM}{#1}\fi}
720 % \end{macrocode}
721 % similarly, the |PI| keys are registered in |\prop@gen@PIs|.
722 % \begin{macrocode}
723 \define@key{prop@gen}{PI}{\@dmp{PI=#1}%
724 \@ifundefined{prop@gen@PIs}{\xdef\prop@gen@PIs{#1}}{\xdef\prop@gen@PIs{\prop@gen@PIs,#1}}}
725 % \end{macrocode}
726 % and the |pubspage| keys in |\prop@gen@pubspages|.
727 % \begin{macrocode}
728 \define@key{prop@gen}{pubspage}{\@ifundefined{prop@gen@pubspages}%
729 {\xdef\prop@gen@pubspages{#1}}{\xdef\prop@gen@pubspages{\prop@gen@pubspages,#1}}}
730 % \end{macrocode}
731 % the |importfrom| key reads the proposal data from its argument.
732 % \begin{macrocode}
733 \define@key{prop@gen}{importfrom}{\message{importing proposal data from #1.pdata}\readpdata{#1}}
734 % \end{macrocode}
735 % The rest of the keys just store their value.
736 % \begin{macrocode}
737 \define@key{prop@gen}{instrument}{\def\prop@gen@instrument{#1}%
738 \pdata@def{prop}{gen}{instrument}{#1}\@dmp{inst=#1}}
739 \define@key{prop@gen}{title}{\def\prop@gen@title{#1}%
740 \pdata@def{prop}{gen}{title}{#1}}
741 \define@key{prop@gen}{acronym}{\gdef\prop@gen@acronym{#1}%
742 \pdata@def{prop}{gen}{acronym}{#1}\@dmp{acro=#1}}
743 \define@key{prop@gen}{acrolong}{\def\prop@gen@acrolong{#1}%
744 \pdata@def{prop}{gen}{acrolong}{#1}}
745 \define@key{prop@gen}{proposalnumber}{\def\prop@gen@proposalnumber{#1}%
746 \pdata@def{prop}{gen}{proposalnumber}{#1}}
747 \define@key{prop@gen}{discipline}{\def\prop@gen@discipline{#1}%
748 \pdata@def{prop}{gen}{discipline}{#1}}
749 \define@key{prop@gen}{areas}{\def\prop@gen@areas{#1}%
750 \pdata@def{prop}{gen}{areas}{#1}}
751 \define@key{prop@gen}{start}{\def\prop@gen@start{#1}%
752 \pdata@def{prop}{gen}{start}{#1}}
753 \define@key{prop@gen}{months}{\def\prop@gen@months{#1}%
754 \pdata@def{prop}{gen}{months}{#1}}
755 \define@key{prop@gen}{since}{\def\prop@gen@since{#1}%
756 \pdata@def{prop}{gen}{since}{#1}}
757 \define@key{prop@gen}{totalduration}{\def\prop@gen@totalduration{#1}%
758 \pdata@def{prop}{gen}{totalduration}{#1}}
759 \define@key{prop@gen}{fundsuntil}{\def\prop@gen@fundsuntil{#1}%
760 \pdata@def{prop}{gen}{fundsuntil}{#1}}
761 \define@key{prop@gen}{topdownPM}[true]{\def\prop@gen@topdownPM{#1}}
762 \define@key{prop@gen}{botupPM}[true]{\def\prop@gen@botupPM{#1}}
763 \define@key{prop@gen}{keywords}{\def\prop@gen@keywords{#1}}
764 % \end{macrocode}
765 % and the default values, these will be used, if the author does not specify something
766 % better.
767 %
768 % \begin{macrocode}
769 \newcommand\prop@gen@acro@default{ACRONYM}
770 \def\prop@gen@acro{\prop@gen@acro@default}
771 \newcommand\prop@gen@months@default{???months???}
772 \def\prop@gen@months{\prop@gen@months@default}
773 \newcommand\prop@gen@title@default{???Proposal Title???}
774 \def\prop@gen@title{\prop@gen@title@default}
775 \newcommand\prop@gen@instrument@default{??? Instrument ???}
776 \def\prop@gen@instrument{\prop@gen@instrument@default}
777 % \end{macrocode}
778 %
779 % \begin{macro}{\prop@tl}
780 % An auxiliary macro that is handy for making tables of WorkAddress data.
781 % \begin{macrocode}
782 \newcommand\prop@tl[2]{\xdef\tab@line{}
783 \@for\tl@ext:={#1}\do{\xdef\tab@line{\tab@line&#2}}
784 \tab@line}
785 % \end{macrocode}
786 % \end{macro}
787 %
788 % \subsection{Proposal Appearance}\label{sec:impl:appearance}
789 %
790 % We define the keys for the proposal appearance
791 % \begin{macrocode}
792 \def\prop@gen@compactht{false}
793 \define@key{prop@gen}{compactht}[true]{\def\prop@gen@compactht{#1}}
794 %</pdata>
795 % \end{macrocode}
796 %
797 % \begin{environment}{emphbox}
798 % \begin{macrocode}
799 %<*cls>
800 \newmdenv[settings=\large]{emphbox}
801 % \end{macrocode}
802 % \end{environment}
803 %
804 % \subsection{Title Page}\label{sec:impl:titlepage}
805 %
806 % \begin{environment}{prop@proposal}
807 % This internal environment is called in the |proposal| environment from the |proposal|
808 % class. The implementation here is only a stub to be substituted in a specialized
809 % class.
810 % \begin{macrocode}
811 \newenvironment{prop@proposal}
812 {\thispagestyle{empty}%
813 \begin{center}
814 {\LARGE \prop@gen@instrument}\\[.2cm]
815 {\LARGE\textbf{\prop@gen@title}}\\[.3cm]
816 {\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
817 {\large\today}\\[1em]
818 \begin{tabular}{c*{\the@PIs}{c}}
819 \prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{name}}\\
820 \prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{name}}
821 \end{tabular}\\[2cm]
822 \end{center}
823 \setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
824 % \end{macrocode}
825 % Now we come to the end of the environment:
826 % \begin{macrocode}
827 {\section{List of Attachments}
828 \begin{itemize}
829 \@for\@I:=\prop@gen@PIs\do{%
830 \item Curriculum Vitae and list of publications for
831 \wa@ref{person}\@I{personaltitle} \wa@ref{person}\@I{name}}
832 \end{itemize}\newpage
833 \printbibliography[heading=warnpubs]}
834 % \end{macrocode}
835 % \end{environment}
836 %
837 % \begin{environment}{proposal}
838 % The |proposal| environment reads the metadata keys defined above, and if there were no
839 % |site| keys, then it defines keys |RM| and |RAM| (unless the |noRAM| package option
840 % was given) for the |workpackage| environment. Also it reads the project data file and
841 % opens up the project data file |\pdata@out|, which it also closes at the end.
842 %
843 % The environment calls an internal version of the environment |prop@proposal| that can
844 % be customized by the specializing classes.
845 % \begin{macrocode}
846 \newenvironment{proposal}[1][]{\readpdata\jobname
847 \ofpagetrue\setkeys{prop@gen}{#1}
848 \pdata@open\jobname
849 \if@sites\else
850 \define@key{workpackage}{RM}{\pdata@def{wp}\wp@id{RM}{##1}\@dmp{RM=##1}}
851 \define@key{workpackage}{RAM}{\pdata@def{wp}\wp@id{RAM}{##1}\@dmp{RAM=##1}}
852 \fi
853 \newcounter{@PIs}
854 \@ifundefined{prop@gen@PIs}{}{\@for\@I:=\prop@gen@PIs\do{\stepcounter{@PIs}}}
855 \newcounter{@sites}
856 \@ifundefined{prop@gen@sites}{}{\@for\@I:=\prop@gen@sites\do{\stepcounter{@sites}}}
857 \setcounter{page}{0}
858 \begin{prop@proposal}}
859 % \end{macrocode}
860 % Now we come to the end of the environment, we take care of the last page and print the
861 % references.
862 % \begin{macrocode}
863 {\end{prop@proposal}
864 \pdata@def{prop}{page}{last}{\thepage}\ofpagefalse
865 \pdata@close}
866 %</cls>
867 % \end{macrocode}
868 % \end{environment}
869 %
870 % The |report| environment is similar, but somewhat simpler
871 %
872 % \begin{environment}{report}
873 % \begin{macrocode}
874 %<*reporting>
875 \newif\if@report\@reportfalse
876 \newenvironment{report}[1][]%
877 {\@reporttrue\readpdata\jobname%
878 \ofpagetrue\setkeys{prop@gen}{#1}%
879 \pdata@open\jobname%
880 \@ifundefined{prop@gen@PIs}{}{\newcounter{@PIs}\@for\@I:=\prop@gen@PIs\do{\stepcounter{@PIs}}}%
881 \@ifundefined{prop@gen@sites}{}{\newcounter{@sites}\@for\@I:=\prop@gen@sites\do{\stepcounter{@sites}}}%
882 \setcounter{page}{0}%
883 \begin{prop@report}}
884 {\end{prop@report}%
885 \pdata@def{prop}{page}{last}{\thepage}\ofpagefalse\newpage
886 \printbibliography[heading=warnpubs]
887 \pdata@close}
888 % \end{macrocode}
889 % \end{environment}
890 %
891 % \begin{environment}{prop@report}
892 % \begin{macrocode}
893 \newenvironment{prop@report}
894 {\begin{center}
895 {\LARGE Final Project Report}\\[.2cm]
896 {\LARGE\textbf{\prop@gen@title}}\\[.3cm]
897 {\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
898 {\large\today}\\[1em]
899 \begin{tabular}{c*{\the@PIs}{c}}
900 \prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{name}}\\
901 \prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{name}}
902 \end{tabular}\\[2cm]
903 \end{center}
904 \setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
905 {}
906 %</reporting>
907 % \end{macrocode}
908 % \end{environment}
909 %
910 % \begin{macro}{\site*}
911 % \begin{macrocode}
912 %<*cls>
913 \newcommand\site[1]{\hyperlink{site@#1@target}{\wa@ref{institution}{#1}{acronym}}}
914 \newcommand\sitename[1]{\hyperlink{site@#1@target}{\wa@ref{institution}{#1}{name}}}
915 % \end{macrocode}
916 % \end{macro}
917 %
918 % \subsection{Objectives}\label{sec:impl:objectives}
919 %
920 % We first define a presentation macro for objectives
921 % \begin{macro}{\objective@label}
922 % \begin{macrocode}
923 \newcommand\objective@label[1]{O#1}
924 % \end{macrocode}
925 % \end{macro}
926 % We define the keys for the objectives environment
927 % \begin{macrocode}
928 \define@key{obj}{id}{\def\obj@id{#1}\@dmp{id=#1}}
929 \define@key{obj}{title}{\def\obj@title{#1}\@dmp{title=#1}}
930 \define@key{obj}{short}{\def\obj@short{#1}\@dmp{short=#1}}
931 % \end{macrocode}
932 % And a counter for numbering objectives
933 % \begin{macrocode}
934 \newcounter{objective}
935 % \end{macrocode}
936 % \begin{environment}{objective}
937 % \begin{macrocode}
938 \newenvironment{objective}[1][]
939 {\let\obj@id\relax\let\obj@title\relax\let\obj@short\relax%
940 \setkeys{obj}{#1}\stepcounter{objective}%
941 \goodbreak\smallskip\par\noindent%
942 \textbf{\objective@label{\arabic{objective}}:%
943 ~\pdata@target{obj}{\obj@id}{\pdataref{obj}{\obj@id}{title}}\ignorespaces}%
944 \pdata@def{obj}\obj@id{label}{\objective@label\theobjective}%
945 \@ifundefined{obj@title}{}{\pdata@def{obj}\obj@id{title}\obj@title}%
946 \@ifundefined{obj@short}{}{\pdata@def{obj}\obj@id{short}\obj@short}}
947 {}
948 % \end{macrocode}
949 % \end{environment}
950 %
951 % \begin{macro}{\OBJref}
952 % \begin{macrocode}
953 \newcommand\OBJref[1]{\pdataRef{obj}{#1}{label}}
954 \newcommand\OBJtref[1]{\OBJref{#1}: \pdataRefFB{obj}{#1}{short}{title}}
955 % \end{macrocode}
956 % \end{macro}
957 %
958 % \subsection{Work Packages and Work Groups}\label{sec:impl:wpwa}
959 %
960 % We first define keys for work groups (if we are in an IP).
961 % \begin{macrocode}
962 \ifwork@areas
963 \define@key{workarea}{id}{\def\wa@id{#1}\@dmp{id=#1}}
964 \define@key{workarea}{title}{\pdata@def{wa}\wa@id{title}{#1}}
965 \define@key{workarea}{short}{\pdata@def{wa}\wa@id{short}{#1}}
966 \define@key{workarea}{lead}{\pdata@def{wa}\wa@id{lead}{#1}}
967 \fi
968 % \end{macrocode}
969 % work packages have similar ones.
970 % \begin{macrocode}
971 \define@key{workpackage}{id}{\def\wp@id{#1}\@dmp{id=#1}}
972 \define@key{workpackage}{title}{\pdata@def{wp}\wp@id{title}{#1}}
973 \define@key{workpackage}{short}{\pdata@def{wp}\wp@id{short}{#1}}
974 \define@key{workpackage}{lead}{\pdata@def{wp}\wp@id{lead}{#1}\def\wp@lead{#1}\@dmp{lead=#1}}
975 \define@key{workpackage}{type}{\def\wp@type{#1}\pdata@def{wp}\wp@id{type}{#1}}
976 \define@key{workpackage}{wphases}{\def\wp@wphases{#1}\pdata@def{wp}\wp@id{wphases}{#1}}
977 \define@key{workpackage}{swsites}[true]{\def\wp@swsites{#1}}
978 % \end{macrocode}
979 % We define the constructors for the work package and work group labels and titles.
980 % \begin{macrocode}
981 \newcommand\wp@mk@title[1]{Work Package {#1}}
982 \newcommand\wp@label[1]{WP{#1}}
983 \ifwork@areas
984 \newcommand\wa@label[1]{WA{#1}}
985 \newcommand\wa@mk@title[1]{Work Area {#1}}
986 \fi
987 % \end{macrocode}
988 % The |wa| and |wp| counters are for the work packages and work groups, the counter
989 % |deliv| for deliverables.
990 % \begin{macrocode}
991 \ifwork@areas\newcounter{wa}\newcounter{wp}[wa]\else\newcounter{wp}\fi
992 \ifdelivs\newcounter{deliv}[wp]\fi
993 \newcounter{allwp}
994 % \end{macrocode}
995 %
996 % \begin{macro}{\update@*}
997 % update the list |\@wps| of the work packages in the local group and the list |\@was|
998 % work groups for the staff efforts table: if |\@wps| is undefined, then initialize the
999 % comma-separated list, otherwise extend it.\ednote{with the current architecture, we
1000 % cannot have work areas that do not contain work packages, this leads to the error that
1001 % |\@wps| is undefined in |end{workplan}|}
1002 % \begin{macrocode}
1003 \newcommand\update@wps[1]{\@ifundefined{@wps}{\xdef\@wps{#1}}{\xdef\@wps{\@wps,#1}}}
1004 \newcommand\update@tasks[1]{\@ifundefined{@tasks}{\xdef\@tasks{#1}}{\xdef\@tasks{\@tasks,#1}}}
1005 \newcommand\update@deps[1]{\@ifundefined{task@deps}{\xdef\task@deps{#1}}{\xdef\task@deps{\task@deps,#1}}}
1006 \ifwork@areas\def\update@was#1{\@ifundefined{@was}{\xdef\@was{#1}}{\xdef\@was{\@was,#1}}}\fi
1007 % \end{macrocode}
1008 % \end{macro}
1009 %
1010 % \begin{macro}{\decode@wphase}
1011 % |\decode@wphase| decodes a string of the form \meta{start}|-|\meta{end}|!|\meta{force}
1012 % and defines the macros |\wphase@start|, |\wphase@end|, and |\wphase@force| with the
1013 % three parts and also computes |\wphase@len|. The intermediate parsing macro
1014 % |\decode@p@start| parses out the start (a number), and passes on to |\decode@p@end|,
1015 % which parses out the end (another number) and the force string, which is either empty
1016 % (if the |!|\meta{force} part is omitted) or of the form |!|\meta{force}. In the first
1017 % case the default value 1 is returned for |\decode@force| in the second \meta{force}.
1018 % \begin{macrocode}
1019 \newcommand\decode@wphase[1]{\expandafter\decode@p@start#1@%
1020 \local@count\wphase@end\advance\local@count by -\wphase@start%
1021 \def\wphase@len{\the\local@count}}
1022 \def\decode@p@start#1-#2@{\def\wphase@start{#1}\decode@p@end#2!@}
1023 \def\decode@p@end#1!#2@{\def\wphase@end{#1}\def\@test{#2}%
1024 \ifx\@test\@empty\def\wphase@force{1}\else\decode@p@force#2\fi}
1025 \def\decode@p@force#1!{\def\wphase@force{#1}}
1026 % \end{macrocode}
1027 % \end{macro}
1028 %
1029 % \begin{macro}{\startend@wphases}
1030 % We first iteratively decode the work phases, so that the last definition of
1031 % |\wphase@end| remains, then we parse out the start of the first workphase to define
1032 % |\wphase@start|
1033 % \begin{macrocode}
1034 \def\wphases@start#1-#2@{\def\wphase@start{#1}}
1035 \newcommand\startend@wphases[1]{\def\@test{#1}
1036 \ifx\@test\@empty\def\wphase@start{0}\def\wphase@end{0}\else%
1037 \@for\@I:=#1\do{\expandafter\decode@p@start\@I @}
1038 \expandafter\wphases@start#1@\fi}
1039 % \end{macrocode}
1040 % \end{macro}
1041 %
1042 % with these it is now relatively simple to define the interface macros.
1043 %
1044 % \begin{environment}{work@package}
1045 % The |workpackage| environment collects the keywords, steps the counters, writes the metadata
1046 % to the aux file, updates the work packages in the local group, generates the work
1047 % package number |\wp@num|.
1048 % \begin{macrocode}
1049 \newcounter{wp@RM}
1050 \if@RAM\newcounter{wp@RAM}\fi
1051 \newenvironment{work@package}[1][]%
1052 {\def\wp@wphases{0-0}% default values
1053 \def\wp@swsites{false}
1054 \setkeys{workpackage}{#1}\stepcounter{wp}\stepcounter{allwp}%
1055 \startend@wphases\wp@wphases%
1056 \pdata@def{wp}\wp@id{start}\wphase@start\pdata@def{wp}\wp@id{end}\wphase@end%
1057 \@ifundefined{wp@type}{}{\pdata@def{wp}\wp@id{type}\wp@type}%
1058 \let\@tasks=\relax%
1059 \edef\wp@num{\ifwork@areas\thewa.\fi\thewp}%
1060 \pdata@def{wp}\wp@id{label}{\wp@label\wp@num}%
1061 \pdata@def{wp}\wp@id{number}{\thewp}%
1062 \pdata@def{wp}\wp@id{page}{\thepage}%
1063 \update@wps\wp@id%
1064 \edef\wp@num{\ifwork@areas\thewa.\fi\thewp}%
1065 \pdata@def{wp}{\wp@id}{num}{\thewp}%
1066 % \end{macrocode}
1067 % If we have sites, we have to compute the total RM and RAM for this WP.
1068 % \begin{macrocode}
1069 \if@sites%
1070 \setcounter{wp@RM}{0}\if@RAM\setcounter{wp@RAM}{0}\fi%
1071 \@for\@site:=\prop@gen@sites\do{%
1072 \edef\@RM{\pdataref@num\wp@id\@site{RM}}\addtocounter{wp@RM}{\@RM}%
1073 \if@RAM\edef\@RAM{\pdataref@num\wp@id\@site{RAM}}\addtocounter{wp@RAM}{\@RAM}\fi}
1074 \pdata@def{wp}\wp@id{RM}{\thewp@RM}%
1075 \if@RAM\pdata@def{wp}\wp@id{RAM}{\thewp@RAM}\fi%
1076 \fi}% if@sites
1077 {\@ifundefined{@tasks}{}{\pdata@def{\wp@id}{task}{ids}\@tasks}}
1078 % \end{macrocode}
1079 % \end{environment}
1080 %
1081 % \begin{environment}{workpackage}
1082 % With this, it becomes simple to define a work package environment. We consider two
1083 % cases, if we have sites, then we make a header table. If not, we can make things much
1084 % simpler: we just generate a subsection
1085 % \begin{macrocode}
1086 \newenvironment{workpackage}[1][]%
1087 {\begin{work@package}[#1]%
1088 \ifgrantagreement\else
1089 %\if@wpsubsection\subsubsection*{{\wp@mk@title\thewp}: \pdataref{wp}\wp@id{title}}\fi
1090 \if@sites\goodbreak\medskip\wpheadertable%
1091 \else\subsubsection*{{\wptitle} (\wprm)}\fi%
1092 \addcontentsline{toc}{paragraph}{{\wp@mk@title\thewp}: \pdataref{wp}\wp@id{title}}%
1093 \noindent\ignorespaces%
1094 \fi}
1095 {\end{work@package}}
1096 % \end{macrocode}
1097 % \end{environment}
1098 %
1099 % \begin{macro}{\wptitle}
1100 % \ednote{document above}
1101 % \begin{macrocode}
1102 \newcommand\wptitle{\wp@mk@title{\wp@num}: \pdata@target{wp}{\wp@id}{\pdataref{wp}\wp@id{title}}}
1103 % \end{macrocode}
1104 % \end{macro}
1105 %
1106 % \begin{macro}{\wprm}
1107 % \ednote{document above}
1108 % \begin{macrocode}
1109 \newcommand\wprm{\pdataref@safe{wp}\wp@id{RM}\if@RAM\ RM+\pdataref{wp}\wp@id{RAM} RAM\fi}
1110 % \end{macrocode}
1111 % \end{macro}
1112 %
1113 % \begin{macro}{\if@site@contributes}
1114 % Called as |\if@site@contributes{|\meta{site}|}{|\meta{tokens}|}| the following
1115 % happens: If |\prop@gen@compactht| is |\@true| (set by the |compactht| attribute on the
1116 % |proposal| environment), then \meta{tokens} is processed. Otherwise, \meta{tokens} is
1117 % only processed if \meta{site} contributes to the current work package (i.e the |RM|
1118 % $\ne0$ and |RAM| $\ne0$)
1119 % \begin{macrocode}
1120 \newcount\site@contribution%
1121 \newcommand\if@site@contributes[2]{%
1122 \ifx\prop@gen@compactht\@true
1123 \if@RAM\ifnum\pdataref@num\wp@id{#1}{RM} > 0 \ifnum \pdataref@num\wp@id{#1}{RAM} > 0 #2\fi\fi
1124 \else\ifnum\pdataref@num\wp@id{#1}{RM} > 0 #2\fi\fi
1125 \else #2\fi}
1126 % \end{macrocode}
1127 % \end{macro}
1128 %
1129 % The following macro computes the sites line (in the token register
1130 % \DescribeMacro{\wp@sites@line}|\wp@sites@line|), the efforts line (in
1131 % \DescribeMacro{\wp@efforts@line}|\wp@efforts@line|), and the sites number (in the
1132 % counter \DescribeMacro{\wp@sites@num}|\sites@num|) for later inclusion in the
1133 % |\wpheadertable|. If |\prop@gen@compactht| is |\@true|, then no sites without
1134 % contributions are listed in the table.
1135 % \begin{macrocode}
1136 \newcounter{wp@sites@num}
1137 \newcommand\wp@sites@efforts@lines{%
1138 \setcounter{wp@sites@num}{0}
1139 {\let\G@refundefinedtrue=\relax\let\@latex@warning=\relax\let\@sw\relax%
1140 \let\site\relax\let\textbf\relax\let\sum@style\relax\let\lead@style\relax%
1141 \let\pn\relax\let\sys\relax%
1142 \xdef\wp@sites@line{\wp@legend@site}\xdef\wp@efforts@line{\wp@legend@effort}%initialize lines
1143 \@for\@site:=\prop@gen@sites\do{\if@site@contributes\@site{\stepcounter{wp@sites@num}}%
1144 \xdef\wp@sites@line{\wp@sites@line%
1145 \if@site@contributes\@site{&%
1146 \ifx\wp@swsites\@true%
1147 \@sw{\ifx\@site\wp@lead\lead@style{\site{\@site}}\else\site{\@site}\fi}%
1148 \else\ifx\@site\wp@lead\lead@style{\site{\@site}}\else\site{\@site}\fi%
1149 \fi}}%
1150 \xdef\wp@efforts@line{\wp@efforts@line%
1151 \if@site@contributes\@site{&%
1152 \ifx\@site\wp@lead%
1153 \lead@style{\pdataref@safe\wp@id\@site{RM}\if@RAM+\pdataref@safe\wp@id\@site{RAM}\fi}
1154 \else\pdataref@safe\wp@id\@site{RM}\if@RAM+\pdataref@safe\wp@id\@site{RAM}\fi\fi}}%
1155 }% do
1156 \xdef\wp@sites@line{\wp@sites@line&\sum@style{\wp@legend@all}}%
1157 \xdef\wp@efforts@line{\wp@efforts@line&
1158 \sum@style{\textbf{\pdataref{wp}\wp@id{RM}\if@RAM+\pdataref{wp}\wp@id{RAM}\fi}}}}}
1159 % \end{macrocode}
1160 %
1161 % \begin{macro}{\wpheadertable}
1162 % This macro computes the default work package header table, if there are sites.
1163 % \begin{macrocode}
1164 \newcommand\wpheadertable{%
1165 \wp@sites@efforts@lines%
1166 \par\noindent\begin{tabular}{|l||l|*{\thewp@sites@num}{c|}|c|}\hline%
1167 \textbf{\wp@mk@title{\wp@num}}&\wp@sites@line\\\hline%
1168 \textsf{\pdata@target{wp}{\wp@id}{\pdataref{wp}\wp@id{title}}} &\wp@efforts@line\\\hline%
1169 \end{tabular}\smallskip\par\noindent\ignorespaces}
1170 % \end{macrocode}
1171 % and now multilinguality support
1172 % \begin{macrocode}
1173 \newcommand\wp@legend@site{Site}
1174 \newcommand\wp@legend@effort{Effort\if@RAM{ (RM+RAM)}\fi}
1175 \newcommand\wp@legend@all{\textbf{all}}
1176 % \end{macrocode}
1177 % \end{macro}
1178 %
1179 % \begin{environment}{workarea}
1180 % the |workarea| environment for work groups is almost the same, but we also have to
1181 % initialize the work package counters. Also, the efforts can be computed from the work
1182 % packages in this group via the |wa@effort| counter
1183 % \begin{macrocode}
1184 \newcounter{prop@RM}\if@RAM\newcounter{prop@RAM}\fi
1185 \ifwork@areas
1186 \newcounter{wa@RM}\if@RAM\newcounter{wa@RAM}\fi\newcounter{wa@wps}
1187 \newenvironment{workarea}[1][]
1188 {\setkeys{workarea}{#1}
1189 \let\@wps=\relax
1190 \stepcounter{wa}
1191 \pdata@def{wa}{\wa@id}{label}{\wa@label\thewa}
1192 \pdata@def{wa}{\wa@id}{number}{\thewa}
1193 \pdata@def{wa}{\wa@id}{page}{\thepage}
1194 \update@was{\wa@id}
1195 \pdata@def{wa}{\wa@id}{num}{\thewa}
1196 \setcounter{wa@RM}{0}\if@RAM\setcounter{wa@RAM}{0}\fi\setcounter{wa@wps}{0}
1197 \edef\@@wps{\pdataref@aux\wa@id{wp}{ids}}
1198 \@for\@wp:=\@@wps\do{\stepcounter{wa@wps}%
1199 \if@sites
1200 \@for\@site:=\prop@gen@sites\do{%
1201 \edef\@RM{\pdataref@num\@wp\@site{RM}}
1202 \if@RAM\edef\@RAM{\pdataref@num\@wp\@site{RAM}}\fi
1203 \addtocounter{wa@RM}{\@RM}\addtocounter{prop@RM}{\@RM}
1204 \if@RAM\addtocounter{wa@RAM}{\@RAM}\addtocounter{prop@RAM}{\@RAM}\fi}
1205 \else
1206 \edef\@RM{\pdataref@num{wp}\@wp{RM}}
1207 \if@RAM\edef\@RAM{\pdataref@num{wp}\@wp{RAM}}\fi
1208 \addtocounter{wa@RM}{\@RM}\addtocounter{prop@RM}{\@RM}
1209 \if@RAM\addtocounter{wa@RAM}{\@RAM}\addtocounter{prop@RAM}{\@RAM}\fi
1210 \fi}
1211 \pdata@def{wa}\wa@id{RM}\thewa@RM
1212 \pdata@def{prop}{all}{RM}\theprop@RM
1213 \if@RAM
1214 \pdata@def{wa}\wa@id{RAM}\thewa@RAM
1215 \pdata@def{prop}{all}{RAM}\theprop@RAM
1216 \fi
1217 \subsubsection*{{\wa@mk@title\thewa}: {\pdata@target{wa}\wa@id{\pdataref{wa}\wa@id{title}}}}
1218 \addcontentsline{toc}{subsubsection}{{\wa@mk@title\thewa}: \pdataref{wa}\wa@id{title}}%
1219 \ignorespaces}
1220 {\@ifundefined{@wps}{}{\pdata@def\wa@id{wp}{ids}\@wps}\pdata@def\wa@id{wp}{count}\thewa@wps}\fi
1221 % \end{macrocode}
1222 % \end{environment}
1223 %
1224 % \begin{environment}{workplan}
1225 % The |workplan| environment sets up the accumulator macros |\@wps|, |\@was|, for the
1226 % collecting the identifiers of work packages and work groups. At the end of the
1227 % workplan description it writes out their content to the aux file for reference.
1228 % \begin{macrocode}
1229 \ifdelivs\newwrite\wpg@delivs\fi
1230 \newenvironment{workplan}%
1231 {\ifdelivs\immediate\openout\wpg@delivs=\jobname.delivs\fi
1232 \ifwork@areas\let\@was=\relax\else\let\@wps=\relax\fi}%
1233 {\@ifundefined{task@deps}{}{\pdata@def{all}{task}{deps}{\task@deps}}
1234 \pdata@def{all}{task}{count}{\thealltasks}
1235 \ifwork@areas
1236 \@ifundefined{@was}{}{\pdata@def{all}{wa}{ids}\@was}
1237 \else
1238 \@ifundefined{@wps}{}{\pdata@def{all}{wp}{ids}\@wps}
1239 \fi
1240 \ifdelivs\@ifundefined{mile@stones}{}
1241 {\@for\@I:=\mile@stones\do{%
1242 \pdata@def{mile}\@I{delivs}{\@ifundefined{\@I delivs}{}{\csname\@I delivs\endcsname}}}}\fi
1243 \ifwork@areas\pdata@def{all}{wa}{count}{\thewa}\fi
1244 \pdata@def{all}{wp}{count}{\theallwp}
1245 \ifdelivs
1246 \pdata@def{all}{deliverables}{count}{\thedeliverable}
1247 \pdata@def{all}{milestones}{count}{\themilestone}
1248 \fi
1249 \ifdelivs\closeout\wpg@delivs\fi}
1250 % \end{macrocode}
1251 % \end{environment}
1252 %
1253 %\subsection{Milestones and Deliverables}\label{sec:impl:deliverables}
1254 %
1255 % \begin{macro}{deliv@error}
1256 % this macro raises an error if deliverable commands are used without the |deliverables|
1257 % option being set.
1258 % \begin{macrocode}
1259 \newcommand\deliv@error{\PackageError{proposal}
1260 {To use use deliverables, you have to specify the option 'deliverables'}}
1261 % \end{macrocode}
1262 % \end{macro}
1263 %
1264 % \begin{environment}{wpdelivs}
1265 % \begin{macrocode}
1266 \newenvironment{wpdelivs}{\begin{wp@delivs}}{\end{wp@delivs}}
1267 % \end{macrocode}
1268 % \end{environment}
1269 %
1270 % \begin{environment}{wp@delivs}
1271 % \begin{macrocode}
1272 \newenvironment{wp@delivs}
1273 {\ifdelivs\textbf\deliv@legend@delivs:\\[-3ex]%
1274 \begin{compactdesc}\else\deliv@error\fi}
1275 {\ifdelivs\end{compactdesc}\fi}
1276 % \end{macrocode}
1277 % and now multilinguality support
1278 % \begin{macrocode}
1279 \newcommand\deliv@legend@delivs{Deliverables}
1280 % \end{macrocode}
1281 % \end{environment}
1282 %
1283 % \begin{macro}{\wadelivs}
1284 % \begin{macrocode}
1285 \newenvironment{wadelivs}
1286 {\textbf\deliv@legend@delivs:\\[-3ex]\begin{wp@delivs}}
1287 {\end{wp@delivs}}
1288 % \end{macrocode}
1289 % \end{macro}
1290 %
1291 % \begin{macro}{\lec}
1292 % This macro is generally useful to put a comment at the end of the line, possibly
1293 % making a new one if there is not enough space.
1294 % \begin{macrocode}
1295 \newcommand\lec[1]{\strut\hfil\strut\null\nobreak\hfill\hbox{$\leadsto$#1}\par}
1296 % \end{macrocode}
1297 % \end{macro}
1298 %
1299 % \begin{macro}{\deliv@label}
1300 % \begin{macrocode}
1301 \newcommand\deliv@label[1]{D{#1}}
1302 % \end{macrocode}
1303 % \end{macro}
1304 %
1305 % \begin{macro}{\*deliv*ref}
1306 % This macro is generally useful to put a comment at the end of the line, possibly
1307 % making a new one if there is not enough space.
1308 % \begin{macrocode}
1309 \newcommand\delivref[2]{\pdataRef{deliv}{#1#2}{label}}
1310 \newcommand\localdelivref[1]{\delivref{\wp@id}{#1}}
1311 \newcommand\delivtref[2]{\delivref{#1}{#2}: \pdataRefFB{deliv}{#1#2}{short}{title}}
1312 \newcommand\localdelivtref[1]{\delivtref{\wp@id}{#1}}
1313 % \end{macrocode}
1314 % \end{macro}
1315 %
1316 % \begin{macro}{\wpg@deliv}
1317 % We first define the keys
1318 % \begin{macrocode}
1319 \define@key{deliv}{id}{\def\deliv@id{#1}}
1320 \define@key{deliv}{due}{\def\deliv@due{#1}}
1321 \define@key{deliv}{dissem}{\def\deliv@dissem{#1}}
1322 \define@key{deliv}{nature}{\def\deliv@nature{#1}}
1323 \define@key{deliv}{miles}{\def\deliv@miles{#1}}
1324 \define@key{deliv}{short}{\def\deliv@short{#1}}
1325 \define@key{deliv}{lead}{\def\deliv@lead{#1}}
1326 % \end{macrocode}
1327 % The |\wpdeliv| macro cycles over the due dates and generates the relevant entries into
1328 % the deliverables file. The first step is to write the general metadata to the pdata
1329 % file.
1330 % \begin{macrocode}
1331 \newcounter{deliverable}
1332 \newcommand{\wpg@deliv}[3]{% keys, title, type
1333 \stepcounter{deliverable}
1334 \let\deliv@miles=\relax% clean state
1335 \def\@type{#3}\def\@wp{wp}% set up ifx
1336 \def\wpg@id{\csname #3@id\endcsname}
1337 \setkeys{deliv}{#1}\stepcounter{deliv}% set state
1338 \ifx\@type\@wp\def\current@label{\deliv@label{\ifwork@areas\thewa.\fi\thewp.\thedeliv}}
1339 \else\def\current@label{\deliv@label{\thewa.\thedeliv}}\fi
1340 \pdata@def{deliv}{\wpg@id\deliv@id}{label}{\current@label}
1341 \pdata@def{deliv}{\wpg@id\deliv@id}{title}{#2}
1342 \pdata@def{deliv}{\wpg@id\deliv@id}{page}{\thepage}%
1343 \@ifundefined{deliv@short}
1344 {\pdata@def{deliv}{\wpg@id\deliv@id}{short}{#2}}
1345 {\pdata@def{deliv}{\wpg@id\deliv@id}{short}{\deliv@short}}
1346 \@ifundefined{deliv@nature}
1347 {\protect\G@refundefinedtrue\@latex@warning{key 'nature' for Deliv \wpg@id undefined}}
1348 {\pdata@def{deliv}{\wpg@id\deliv@id}{nature}{\deliv@nature}}
1349 \@ifundefined{deliv@dissem}
1350 {\protect\G@refundefinedtrue\@latex@warning{key 'dissem' for Deliv \wpg@id undefined}}
1351 {\pdata@def{deliv}{\wpg@id\deliv@id}{dissem}{\deliv@dissem}}
1352 \@ifundefined{deliv@lead}
1353 {\protect\G@refundefinedtrue\@latex@warning{key 'lead' for Deliv \wpg@id undefined}}
1354 {\pdata@def{deliv}{\wpg@id\deliv@id}{lead}{\deliv@lead}}
1355 % \end{macrocode}
1356 % Then we iterate over the due dates and generate an entry for teach of them.
1357 % \begin{macrocode}
1358 \@ifundefined{deliv@due}{}{%
1359 \@for\@I:=\deliv@due\do{\protected@write\wpg@delivs{}{\string\deliverable%
1360 {\ifnum\@I<10 0\@I\else\@I\fi}% sort key
1361 {\@I}% due date
1362 {\current@label}% label
1363 {\@ifundefined{deliv@id}{??}{\wpg@id\deliv@id}}% id
1364 {\@ifundefined{deliv@dissem}{??}{\deliv@dissem}}% dissemination level
1365 {\@ifundefined{deliv@nature}{??}{\deliv@nature}}% nature
1366 {#2}
1367 {\ifx\@type\@wp{WP\ifwork@areas\thewa.\fi\thewp}\else{WA\thewa}\fi}%WP
1368 {\@ifundefined{deliv@lead}{??}{\string\site{\deliv@lead}}}}}}% lead
1369 % \end{macrocode}
1370 % And finally, we generate the entry into the deliverables table.
1371 % \begin{macrocode}
1372 \item[\current@label\ (%
1373 \delivs@legend@due: \@ifundefined{deliv@due}{??}{\deliv@due},
1374 \delivs@legend@nature: \@ifundefined{deliv@nature}{??}{\deliv@nature},
1375 \delivs@legend@dissem: \@ifundefined{deliv@dissem}{??}{\deliv@dissem},
1376 \delivs@legend@lead: \@ifundefined{deliv@lead}{??}{\site{\deliv@lead}})]
1377 \pdata@target{deliv}{\wpg@id\deliv@id}{\textit{#2}}
1378 \@ifundefined{deliv@miles}{}{% print the milestones and update their deliverables
1379 \let\m@sep=\relax% do not print the separator the first time round
1380 \lec{\@for\@I:=\deliv@miles\do{% Iterate over the milestones mentioned
1381 \m@sep\pdataRef{mile}{\@I}{label}% print the milestone reference
1382 \let\m@sep=,}}%set the separator for the next times
1383 \def\d@sep{,}
1384 \@for\@I:=\deliv@miles\do{% Iterate over the milestones mentioned
1385 \expandafter\ifx\csname\@I delivs\endcsname\relax% Check that the miles@delivs is empty
1386 {\expandafter\xdef\csname\@I delivs\endcsname{\wpg@id\deliv@id}}% if so, skip the separator
1387 \else\expandafter\xdef\csname\@I delivs\endcsname%if not add it
1388 {\csname\@I delivs\endcsname\d@sep\wpg@id\deliv@id}\fi}}}
1389 % \end{macrocode}
1390 % \end{macro}
1391 %
1392 % Now, we only need to instantiate
1393 %
1394 % \begin{environment}{wadeliv}
1395 % \begin{macrocode}
1396 \newenvironment{wadeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wa}\else\deliv@error\fi}{}
1397 % \end{macrocode}
1398 % \end{environment}
1399 %
1400 % \begin{environment}{wpdeliv}
1401 % \begin{macrocode}
1402 \newenvironment{wpdeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wp}\else\deliv@error\fi}{}
1403 % \end{macrocode}
1404 % \end{environment}
1405 %
1406 % \begin{macro}{\milestone@label}
1407 % \begin{macrocode}
1408 \newcommand\milestone@label[1]{M{#1}}
1409 % \end{macrocode}
1410 % \end{macro}
1411 %
1412 % \begin{macro}{\mileref}
1413 % This macro is generally useful to put a comment at the end of the line, possibly
1414 % making a new one if there is not enough space.
1415 % \begin{macrocode}
1416 \newcommand\mileref[1]{\pdataRef{mile}{#1}{label}}
1417 \newcommand\miletref[1]{\mileref{#1}: \pdataRefFB{mile}{#1}{short}{title}}
1418 % \end{macrocode}
1419 % \end{macro}
1420 %
1421 % \begin{macro}{\milestone}
1422 % create a new milestone, initialize its deliverables accumulator macro, set up
1423 % hyperlinking, and extend the milestones list.
1424 % \begin{macrocode}
1425 \newcounter{milestone}
1426 \define@key{milestone}{id}{\gdef\mile@id{#1}}
1427 \define@key{milestone}{month}{\gdef\mile@month{#1}}
1428 \define@key{milestone}{verif}{\gdef\mile@verif{#1}}
1429 \newcommand\milestone[3][]{%
1430 \ifdelivs%
1431 \setkeys{milestone}{#1}\stepcounter{milestone}%
1432 \pdata@def{mile}\mile@id{label}{\milestone@label{\themilestone}}%
1433 \pdata@def{mile}\mile@id{month}{\mile@month}%
1434 \pdata@def{mile}\mile@id{verif}{\mile@verif}%
1435 \pdata@def{mile}\mile@id{title}{#2}%
1436 \pdata@def{mile}\mile@id{description}{#3}%
1437 \@ifundefined{mile@stones}{\xdef\mile@stones{\mile@id}}{\xdef\mile@stones{\mile@stones,\mile@id}}%
1438 \@milestone{\mile@id}{#2}{#3}% presentation
1439 \else\deliv@error\fi}
1440 % \end{macrocode}
1441 % \end{macro}
1442 %
1443 % \begin{macro}{\@milestone}
1444 % the corresponding presentation macro.
1445 % \begin{macrocode}
1446 \newcommand\@milestone[3]{% id, title, description
1447 \item \textbf{\miles@legend@milestone \pdataref{mile}{#1}{label} (\miles@legend@month \pdataref{mile}\mile@id{month})
1448 \textbf{#2}} #3}
1449 \newcommand\miles@legend@month{Month}
1450 \newcommand\miles@legend@milestone{Milestone}
1451 % \end{macrocode}
1452 % \end{macro}
1453 %
1454 % \begin{environment}{milestones}
1455 % This does the metadata bookkeeping, the layout is delegated to the presentation
1456 % environment |@milestones| and the legend macros that can be customized for specific
1457 % proposals.
1458 % \begin{macrocode}
1459 \newenvironment{milestones}%
1460 {\ifdelivs\begin{@milestones}\else\deliv@error\fi}
1461 {\ifdelivs\pdata@def{all}{mile}{ids}{\mile@stones}%
1462 \pdata@def{all}{mile}{count}{\themilestone}%
1463 \end{@milestones}\fi}
1464 % \end{macrocode}
1465 % \end{environment}
1466 %
1467 % \begin{environment}{@milestones}
1468 % here we do the work.
1469 % \begin{macrocode}
1470 \newenvironment{@milestones}{\begin{enumerate}}{\end{enumerate}}
1471 % \end{macrocode}
1472 % \end{environment}
1473 %
1474 % \begin{macro}{\deliverable}
1475 % the first argument is an extended due date to facilitate sorting.
1476 % \begin{macrocode}
1477 \newcommand{\deliverable}[9]{\pdataRef{deliv}{#4}{label}&#7&#8&#9&#6&#5&#2\\\hline}%sortkey,due,label,id,title,type,level,lead
1478 % \end{macrocode}
1479 % \end{macro}
1480 %
1481 % \begin{environment}{deliverables}
1482 %
1483 % \begin{macrocode}
1484 \newenvironment{deliverables}[1]{\ifdelivs\begin{longtable}{|l|p{#1}|l|l|l|l|l|}\hline%
1485 \#&\textbf{\delivs@legend@name}&%
1486 \textbf{\delivs@legend@wp}&%
1487 \textbf{\delivs@legend@lead}&%
1488 \textbf{\delivs@legend@nature}&%
1489 \textbf{\delivs@legend@level}&%
1490 \textbf{\delivs@legend@due}\\\hline\hline%
1491 \endhead%
1492 \else\deliv@error\fi}
1493 {\ifdelivs\end{longtable}\fi}
1494 % \end{macrocode}
1495 % now the multilingual support
1496 % \begin{macrocode}
1497 \newcommand\delivs@legend@name{Deliverable name}
1498 \newcommand\delivs@legend@wp{WP}
1499 \newcommand\delivs@legend@nature{Type}
1500 \newcommand\delivs@legend@level{Level}
1501 \newcommand\delivs@legend@due{Due}
1502 \newcommand\delivs@legend@dissem{Dissem.}
1503 \newcommand\delivs@legend@lead{Lead}
1504 % \end{macrocode}
1505 % \end{environment}
1506 %
1507 % \begin{macro}{\inputdelivs}
1508 %
1509 % \begin{macrocode}
1510 \newcommand{\inputdelivs}[1]{%
1511 \begin{deliverables}{#1}%
1512 \IfFileExists{\jobname.deliverables}%
1513 {\input{\jobname.deliverables}}%
1514 {\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}}
1515 \end{deliverables}}
1516 % \end{macrocode}
1517 % \end{macro}
1518 %
1519 % \subsection{Tasks and Work Phases}\label{sec:impl:tasks}
1520 %
1521 % \begin{environment}{tasklist}
1522 % \begin{macrocode}
1523 \newenvironment{tasklist}
1524 {\begin{compactenum}}{\end{compactenum}}
1525 % \end{macrocode}
1526 % \end{environment}
1527 % The next step is to
1528 % \begin{macrocode}
1529 \newcommand\task@label[2]{\textbf{T#1.#2}}
1530 % \end{macrocode}
1531 % We define the keys for the task macro
1532 % \begin{macrocode}
1533 \define@key{task}{id}{\def\task@id{#1}\@dmp{id=#1}}
1534 \define@key{task}{wphases}{\def\task@wphases{#1}\pdata@def{task}{\taskin\task@id\wp@id}{wphases}{#1}\@dmp{wphases=#1}}
1535 \define@key{task}{requires}{\@requires\task@id{#1}\@dmp{req=#1}}
1536 \define@key{task}{title}{\def\task@title{#1}\pdata@def{task}{\taskin\task@id\wp@id}{title}{#1}}
1537 \define@key{task}{lead}{\def\task@lead{#1}\pdata@def{task}{\taskin\task@id\wp@id}{lead}{#1}}
1538 \define@key{task}{partners}{\def\task@partners{#1}\pdata@def{task}{\taskin\task@id\wp@id}{partners}{#1}}
1539 \define@key{task}{PM}{\def\task@PM{#1}\pdata@def{task}{\taskin\task@id\wp@id}{PM}{#1}}
1540 % \end{macrocode}
1541 % then we define an auxiliary function that gives them sensible defaults and sets the
1542 % internal macros.
1543 % \begin{macrocode}
1544 \def\task@set#1{\edef\task@id{task\thetask@all}
1545 \def\task@wphases{0-0}\def\task@partners{}\def\task@lead{}\def\task@PM{}
1546 \setkeys{task}{#1}}
1547 % \end{macrocode}
1548 %
1549 % \begin{macro}{\task@post@title@space}
1550 % make the space after the title tweakable
1551 % \begin{macrocode}
1552 \def\task@post@title@space{\;}
1553 % \end{macrocode}
1554 % \end{macro}
1555 %
1556 % \begin{environment}{task}
1557 % \begin{macrocode}
1558 \newcounter{alltasks}
1559 \def\task@post@title@space{\quad}
1560 \newcommand\task@legend@partners{Sites: }
1561 \newcommand\task@legend@PM{PM}
1562 \newenvironment{task}[1][]%
1563 {\stepcounter{alltasks}%
1564 \@task{#1}\item[\pdata@target{task}{\taskin\task@id\wp@id}{\task@label\thewp\thetask@wp}]%
1565 \@ifundefined{task@title}{}{\textbf\task@title}\task@post@title@space%
1566 \def\@initial{0-0}\ifx\task@wphases\@initial\else%
1567 \let\@@sep=\relax\@for\@I:=\task@wphases%
1568 \do{\decode@wphase\@I%
1569 \@@sep\show@wphase\wphase@start\wphase@end\wphase@force%
1570 \let\@@sep=\sep@wphases}%
1571 \fi% initial
1572 \hfill%
1573 \ifsubmit\else\ifx\task@PM\@empty\else\task@PM~\task@legend@PM;\fi\fi%
1574 \ifx\task@lead\@empty\else\ \task@legend@partners\site\task@lead~(\legend@lead)\fi%
1575 \@for\@I:=\task@partners\do{, \site\@I}\\%
1576 \ignorespaces}
1577 {\medskip}
1578 % \end{macrocode}
1579 % now the multilingual support and presentation configuration
1580 % \begin{macrocode}
1581 \newcommand\month@label[1]{M#1}
1582 \newcommand\show@wphase[3]{\edef\@test{#3}\def\@one{1}%
1583 \month@label{#1}-\month@label{#2}%
1584 \ifx\@test\@empty\else\ifx\@test\@one\else @#3\fi\fi}
1585 \newcommand\sep@wphases{; }
1586 \newcommand\legend@partners{Partners}
1587 \newcommand\legend@lead{lead}
1588 \newcommand\task@label@long{Task}
1589 % \end{macrocode}
1590 % \end{environment}
1591 %
1592 % \begin{macro}{\@task}
1593 % The |\@task| macro is a internal macro which takes a bunch of keyword keys and writes
1594 % their values to the aux file.
1595 % \begin{macrocode}
1596 \newcounter{task@all}\newcounter{task@wp}[wp]
1597 \newcount\task@@end
1598 \def\@task#1{\stepcounter{task@all}\stepcounter{task@wp}%
1599 \task@set{#1}%
1600 \pdata@def{task}{\taskin\task@id\wp@id}{wphases}\task@wphases
1601 \pdata@def{task}{\taskin\task@id\wp@id}{label}{\task@label\thewp\thetask@wp}%
1602 \pdata@def{task}{\taskin\task@id\wp@id}{number}{\thetask@wp}%
1603 \pdata@def{task}{\taskin\task@id\wp@id}{page}{\thepage}%
1604 \update@tasks{\taskin\task@id\wp@id}}
1605 % \end{macrocode}
1606 % \end{macro}
1607 %
1608 % \begin{macro}{\workphase}
1609 % \begin{macrocode}
1610 \newcommand\workphase[1]{\PackageError{proposal}
1611 {The \protect\workphase macro is deprecated,\MessageBreak
1612 use the attributes wphase on the workpackage environment instead!}}
1613 % \end{macrocode}
1614 % \end{macro}
1615 %
1616 % \begin{macro}{\*task*ref}
1617 % \begin{macrocode}
1618 \newcommand\taskin[2]{#2@#1}
1619 \newcommand\taskref[2]{\pdataRef{task}{#1@#2}{label}}
1620 \newcommand\taskreflong[2]{\pdataRef{task}{#2}{label}}
1621 \newcommand\tasktref[2]{\taskref{#1}{#2}: \pdataRefFB{task}{#1@#2}{short}{title}}
1622 \newcommand\localtaskref[1]{\taskref{\wp@id}{#1}}
1623 \newcommand\localtasktref[1]{\tasktref{\wp@id}{#1}}
1624 % \end{macrocode}
1625 % \end{macro}
1626 % now we initialize experimental infrastructure for task dependencies (not very well used/tested)
1627 % \begin{macrocode}
1628 \newcounter{gantt@deps}
1629 \def\@requires#1#2{\stepcounter{gantt@deps}%
1630 \edef\dep@id{taskdep\thegantt@deps}%
1631 \pdata@def{taskdep}\dep@id{from}{\taskin{#1}\wp@id}%
1632 \pdata@def{taskdep}\dep@id{to}{#2}%
1633 \update@deps\dep@id}
1634 %</cls>
1635 % \end{macrocode}
1636 %
1637 % \subsection{Project Data, Referencing \& Hyperlinking}\label{sec:impl:hyperlinking}
1638 %
1639 % \begin{macro}{\pdata@*}
1640 % |\pdata@out| is the file handle for the project data file, we define internal macros
1641 % to open and close it.
1642 % \begin{macrocode}
1643 %<*pdata>
1644 \newif\ifwork@areas\work@areastrue
1645 \DeclareOption{noworkareas}{\work@areasfalse}
1646 \ProcessOptions
1647 \RequirePackage{xspace}
1648 \newwrite\pdata@out
1649 \newcommand\pdata@open[1]{\immediate\openout\pdata@out=#1.pdata}
1650 \newcommand\pdata@close{\closeout\pdata@out}
1651 % \end{macrocode}
1652 % \end{macro}
1653 %
1654 % \begin{macro}{\readpdata}
1655 % This macro reads the project data file and its error handling
1656 % \begin{macrocode}
1657 \newcommand\readpdata[1]{\IfFileExists{#1.pdata}
1658 {\message{proposal: Reading Project Data}\makeatletter\input{#1.pdata}\makeatother}
1659 {proposal: No Project Data found, (forward) references may be compromized}}
1660 % \end{macrocode}
1661 % \end{macro}
1662 %
1663 % \begin{macro}{\pdata@target}
1664 % This internal macro makes a hyper-target:
1665 % |\pdata@target{|\meta{cat}|}{|\meta{id}|}{|\meta{label}|}| prints \meta{label} with a
1666 % target name \meta{cat}|@|\meta{id}|@target| attached to it.
1667 % \begin{macrocode}
1668 \newcommand\pdata@target[3]{\hypertarget{#1@#2@target}{#3}}
1669 % \end{macrocode}
1670 % \end{macro}
1671 %
1672 % \begin{macro}{\pdata@def}
1673 % This macro writes an |\@pdata@def| command to the current aux file and also executes it.
1674 % \begin{macrocode}
1675 \newcommand\pdata@def[4]{%\@pdata@def{#1}{#2}{#3}{#4}%
1676 \protected@write\pdata@out{}{\string\@pdata@def{#1}{#2}{#3}{#4}}}
1677 % \end{macrocode}
1678 % \end{macro}
1679 %
1680 % \begin{macro}{\@pdata@def}
1681 % This macro stores the value of its last argument in a custom macro for reference.
1682 % \begin{macrocode}
1683 \newcommand\@pdata@def[4]{\expandafter\gdef\csname #1@#2@#3\endcsname{#4}}
1684 % \end{macrocode}
1685 % \end{macro}
1686 %
1687 % \begin{macro}{\pdataref}
1688 % \begin{macrocode}
1689 \newcommand\pdataref[3]{\@ifundefined{#1@#2@#3}%
1690 {\protect\G@refundefinedtrue\@latex@warning{#3 for #1 #2 undefined}??}%
1691 {\csname #1@#2@#3\endcsname}}%
1692 \newcommand\pdataref@aux[3]{\@ifundefined{#1@#2@#3}{??}{\csname #1@#2@#3\endcsname}}%
1693 \newcommand\pdataref@num[3]{\@ifundefined{#1@#2@#3}{0}{\csname #1@#2@#3\endcsname}}%
1694 \newcommand\pdataref@safe[3]{\@ifundefined{#1@#2@#3}{}{\csname #1@#2@#3\endcsname}}%
1695 % \end{macrocode}
1696 % \end{macro}
1697 %
1698 % \begin{macro}{\pdatarefFB}
1699 % a variant with fallback field,
1700 % \begin{macrocode}
1701 \newcommand\pdatarefFB[4]{\@ifundefined{#1@#2@#3}%
1702 {\@ifundefined{#1@#2@#4}%
1703 {\protect\G@refundefinedtrue\@latex@warning{both #3 and its fallback #4 undefined for #1 #2}??}%
1704 {\csname #1@#2@#4\endcsname}}
1705 {\csname #1@#2@#3\endcsname}}
1706 % \end{macrocode}
1707 % \end{macro}
1708 %
1709 % \begin{macro}{\pdataRef}
1710 % \begin{macrocode}
1711 \newcommand\pdataRef[3]{\@ifundefined{#1@#2@#3}%
1712 {\protect\G@refundefinedtrue\@latex@warning{#3 for #1 #2 undefined}??}%
1713 {\hyperlink{#1@#2@target}{\csname #1@#2@#3\endcsname}}}
1714 % \end{macrocode}
1715 % \end{macro}
1716 %
1717 % \begin{macro}{\pdataRefFB}
1718 % a variant with fallback field,
1719 % \begin{macrocode}
1720 \newcommand\pdataRefFB[4]{\@ifundefined{#1@#2@#3}%
1721 {\@ifundefined{#1@#2@#4}%
1722 {\protect\G@refundefinedtrue\@latex@warning{both #3 and its fallback #4 undefined for #1 #2}??}%
1723 {\hyperlink{#1@#2@target}{\csname #1@#2@#4\endcsname}}}
1724 {\hyperlink{#1@#2@target}{\csname #1@#2@#3\endcsname}}}
1725 % \end{macrocode}
1726 % \end{macro}
1727 %
1728 % \begin{macro}{\pdatacount}
1729 % \begin{macrocode}
1730 \newcommand\prop@count[1]{\ifcase #1 zero\or one\or two\or three\or four\or five\or six\or seven \or
1731 eight\or nine\or ten\or eleven \or twelve\else#1\fi}
1732 \newcommand\pdatacount[2]{\prop@count{\pdataref@num{#1}{#2}{count}}}
1733 % \end{macrocode}
1734 % \end{macro}
1735 %
1736 % \begin{macro}{\pn*}
1737 % \begin{macrocode}
1738 \newcommand\pn{\pdataref{prop}{gen}{acronym}\xspace}
1739 \newcommand\pnlong{\pdataref{prop}{gen}{acrolong}\xspace}
1740 % \end{macrocode}
1741 % \end{macro}
1742 %
1743 % \begin{macro}{\W*ref}
1744 % \begin{macrocode}
1745 \newcommand\WPref[1]{\pdataRef{wp}{#1}{label}}
1746 \newcommand\WPtref[1]{\WPref{#1}: \pdataRefFB{wp}{#1}{short}{title}}
1747 \ifwork@areas
1748 \newcommand\WAref[1]{\pdataRef{wa}{#1}{label}}
1749 \newcommand\WAtref[1]{\WAref{#1}: \pdataRefFB{wa}{#1}{short}{title}}
1750 \fi
1751 %</pdata>
1752 % \end{macrocode}
1753 % \end{macro}
1754 %
1755 % \subsection{The Work Package Table}\label{sec:impl:wptable}
1756 %
1757 % \begin{macro}{\prop@lead}
1758 % \begin{macrocode}
1759 %<*cls>
1760 \newcommand\prop@lead[1]{\@ifundefined{wp@#1@lead}%
1761 {\protect\G@refundefinedtrue\@latex@warning{lead for WP #1 undefined}??}%
1762 {\csname wp@#1@lead\endcsname}}
1763 % \end{macrocode}
1764 % \end{macro}
1765 %
1766 % \begin{macro}{\*@style}
1767 % \ednote{This (and wpfig) should be documented above}
1768 % \begin{macrocode}
1769 \definecolorset{gray/rgb/hsb/cmyk}{}{}%
1770 {leadgray,.90/.90,.90,.90/0,0,.90/0,0,0,.10;%
1771 wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30;%
1772 ganttgray,.60/.60,.60,.60/0,0,.60/0,0,0,.40}
1773 \newcommand\sum@style[1]{\cellcolor{wagray}{\textbf{#1}}}
1774 \newcommand\wa@style[1]{\cellcolor{wagray}{\textbf{#1}}}
1775 \newcommand\wp@style[1]{#1}
1776 \newcommand\lead@style[1]{\cellcolor{leadgray}{\textit{#1}}}
1777 \newcommand\wp@lead@style@explained{light gray italicised}
1778 % \end{macrocode}
1779 % \end{macro}
1780 %
1781 % \begin{environment}{wp@figure}
1782 % \begin{macrocode}
1783 \newcounter{wpfig@options}
1784 \define@key{wpfig}{size}{\def\wpfig@size{#1}\@dmp{size=#1}}
1785 \def\@true{true}
1786 \def\wpfig@pages{false}
1787 \define@key{wpfig}{pages}[true]{\def\wpfig@pages{#1}\stepcounter{wpfig@options}}
1788 \def\wpfig@type{false}
1789 \define@key{wpfig}{type}[true]{\def\wpfig@type{#1}\stepcounter{wpfig@options}}
1790 \def\wpfig@start{false}
1791 \define@key{wpfig}{start}[true]{\def\wpfig@start{#1}\stepcounter{wpfig@options}}
1792 \def\wpfig@length{false}
1793 \define@key{wpfig}{length}[true]{\def\wpfig@length{#1}\stepcounter{wpfig@options}}
1794 \def\wpfig@end{false}
1795 \define@key{wpfig}{end}[true]{\def\wpfig@end{#1}\stepcounter{wpfig@options}}
1796 \define@key{wpfig}{label}{\def\wpfig@label{#1}}
1797 \define@key{wpfig}{caption}{\def\wpfig@caption{#1}}
1798 \def\@sw#1{\begin{sideways}#1\end{sideways}}
1799 \newenvironment{wp@figure}{\begin{table}[ht]\wpfig@style\begin{center}
1800 {\let\@sw\relax\let\textbf\relax\let\site\relax\let\pn\relax\let\sys\relax%
1801 \gdef\wpfig@headline{\wpfig@legend@wap&\wpfig@legend@title%
1802 \ifx\wpfig@type\@true&\wpfig@legend@type\fi%
1803 \ifx\wpfig@pages\@true&\@sw{\wpfig@legend@page}\fi%
1804 \ifx\wpfig@start\@true&\@sw{\wpfig@legend@start}\fi%
1805 \ifx\wpfig@length\@true&\@sw{\wpfig@legend@length}\fi
1806 \ifx\wpfig@end\@true&\@sw{\wpfig@legend@end}\fi}%
1807 \if@sites%
1808 \@for\@site:=\prop@gen@sites\do{%
1809 \xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@siteRM{\@site}}}%
1810 \if@RAM\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@siteRAM{\@site}}}\fi}%
1811 \xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@totalRM}}%
1812 \if@RAM\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@totalRAM}}\fi%
1813 \else% if@sites
1814 \xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
1815 \fi}%if@sites
1816 \if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
1817 \else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi%|
1818 \wpfig@headline\\\hline\hline}
1819 {\end{tabular}\smallskip\\
1820 \wpfig@legend@RAM@expl\if@sites; \wpfig@legend@lead@expl\fi
1821 \@ifundefined{wpfig@label}{\caption{\wpfig@legend@caption}}{\caption{\wpfig@caption}}
1822 \@ifundefined{wpfig@label}{\label{fig:wplist}}{\label{\wpfig@label}}
1823 \end{center}\end{table}}
1824 % \end{macrocode}
1825 % and now multilinguality support
1826 % \begin{macrocode}
1827 \newcommand\wpfig@legend@wap{\textbf{\ifwork@areas{WA/P}\else{WP}\fi}}
1828 \newcommand\wpfig@legend@title{\textbf{Title}}
1829 \newcommand\wpfig@legend@type{\textbf{type}}
1830 \newcommand\wpfig@legend@page{\textbf{page}}
1831 \newcommand\wpfig@legend@start{\textbf{start}}
1832 \newcommand\wpfig@legend@length{\textbf{length}}
1833 \newcommand\wpfig@legend@end{\textbf{end}}
1834 \newcommand\wpfig@legend@siteRM[1]{\site{#1}\if@RAM\ RM\fi}
1835 \newcommand\wpfig@legend@siteRAM[1]{\site{#1}\ RAM}
1836 \newcommand\wpfig@legend@totalRM{total\if@RAM\ RM\fi}
1837 \newcommand\wpfig@legend@totalRAM{total RAM}
1838 \newcommand\wpfig@legend@RM{RM}
1839 \newcommand\wpfig@legend@RAM{RAM}
1840 \newcommand\wpfig@legend@RAM@expl{\if@RAM R(A)M $\widehat=$ Researcher (Assistant) Months\else\ Efforts in PM\fi}
1841 \newcommand\wpfig@legend@lead@expl{WP lead efforts \wp@lead@style@explained}
1842 \newcommand\wpfig@legend@caption{{\ifwork@areas Work Areas and \fi}Work Packages}
1843 % \end{macrocode}
1844 % \end{environment}
1845 %
1846 %
1847 % \begin{macro}{\wpfigstyle}
1848 % \ednote{document above}
1849 % \begin{macrocode}
1850 \def\wpfig@style{}
1851 \newcommand\wpfigstyle[1]{\def\wpfig@style{#1}}
1852 % \end{macrocode}
1853 % \end{macro}
1854 %
1855 % \begin{macro}{\wpfig}
1856 % \ednote{The computation can be distributed much more efficiently (by intermingling the
1857 % counter advances with the row creation), but this works now}
1858 % \begin{macrocode}
1859 \newcount\local@count
1860 \newcount\@@@RM\if@RAM\newcount\@@@RAM\fi
1861 \newcount\all@@@RM\if@RAM\newcount\all@@@RAM\fi
1862 \newcommand{\wpfig}[1][]{\setcounter{wpfig@options}{0}\setkeys{wpfig}{#1}
1863 % \end{macrocode}
1864 % the first thing to do is to build the body of the table programmatically by (globally)
1865 % extending the |\@wp@lines| token register inside a bracket group which locally redefines
1866 % all macros we are using in the extensions, so that they do not get into the way. We
1867 % start this group now.
1868 % \begin{macrocode}
1869 {\gdef\@wp@lines{}%initialize
1870 \let\tabularnewline\relax\let\hline\relax\let\lead@style\relax% so they
1871 \let\wa@style\relax\let\wp@style\relax \let\@sw\relax\let\textbf\relax% do not
1872 \let\G@refundefinedtrue=\relax\let\@latex@warning=\relax\let\hyperlink=\relax% bother
1873 \let\pn\relax\let\xspace\relax% us
1874 % \end{macrocode}
1875 % The code that follows now, could be more elegant, if we had a better way of organizing
1876 % the data, but this works for now, we have four cases: with/without work areas and
1877 % with/without sites. All do something very similar.
1878 % \begin{macrocode}
1879 \ifwork@areas
1880 \edef\@@was{\pdataref@safe{all}{wa}{ids}}%
1881 \@for\@@wa:=\@@was\do{% iterate over the work areas
1882 \xdef\@@wa@line{\wa@style{\pdataRef{wa}\@@wa{label}}%
1883 &\wa@style{\@ifundefined{wa@\@@wa @short}{\pdataref{wa}\@@wa{title}}{\pdataref{wa}\@@wa{short}}}%
1884 \ifx\wpfig@type\@true&\wa@style{\pdataref{wa}\@@wa{type}}\fi%
1885 \ifx\wpfig@pages\@true&\wa@style{\pdataref{wa}\@@wa{page}}\fi%
1886 \ifx\wpfig@start\@true&\wa@style{\pdataref{wa}\@@wa{start}}\fi%
1887 \ifx\wpfig@length\@true&\wa@style{\pdataref{wa}\@@wa{len}}\fi%
1888 \ifx\wpfig@end\@true&\wa@style{\pdataref{wa}\@@wa{end}}\fi}
1889 \if@sites
1890 \@for\@site:=\prop@gen@sites\do{%
1891 \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
1892 \local@count 0%
1893 \@for\@@wp:=\@@wps\do{\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
1894 \pdata@def\@@wa\@site{RM}{\the\local@count}%
1895 \xdef\@@wa@line{\@@wa@line&\wa@style{\the\local@count}}%
1896 \if@RAM
1897 \local@count 0%
1898 \@for\@@wp:=\@@wps\do{\advance\local@count by \pdataref@num\@@wp\@site{RAM}}
1899 \pdata@def\@@wa\@site{RAM}{\the\local@count}%
1900 \xdef\@@wa@line{\@@wa@line&\wa@style{\the\local@count}}%
1901 \fi}
1902 \local@count0\relax%
1903 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wa\@site{RM}}%
1904 \xdef\@@wa@line{\@@wa@line &\wa@style{\textbf{\the\local@count}}}
1905 \if@RAM
1906 \local@count0\relax%
1907 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wa\@site{RAM}}%
1908 \xdef\@@wa@line{\@@wa@line &\wa@style{\textbf{\the\local@count}}}
1909 \fi
1910 \else% if@sites
1911 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
1912 \xdef\@@wa@line{\@@wa@line&\wa@style{\pdataref{wa}\@@wa{RM}}
1913 \if@RAM&\wa@style{\pdataref{wa}\@@wa{RAM}}\fi}%
1914 \fi% if@sites
1915 \xdef\@wp@lines{\@wp@lines\@@wa@line\tabularnewline\hline}% add the line for the workarea
1916 \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
1917 \@for\@@wp:=\@@wps\do{% iterate over its work packages
1918 \xdef\@@wp@line{\pdataRef{wp}\@@wp{label}%
1919 &\@ifundefined{wp@\@@wp @short}{\pdataref{wp}\@@wp{title}}{\pdataref{wp}\@@wp{short}}%
1920 \ifx\wpfig@type\@true&\pdataref{wp}\@@wp{type}\fi%
1921 \ifx\wpfig@pages\@true&\pdataref{wp}\@@wp{page}\fi%
1922 \ifx\wpfig@start\@true&\pdataref{wp}\@@wp{start}\fi%
1923 \ifx\wpfig@length\@true&\pdataref{wp}\@@wp{len}\fi%
1924 \ifx\wpfig@end\@true&\pdataref{wp}\@@wp{end}\fi}
1925 \if@sites
1926 \@for\@site:=\prop@gen@sites\do{%
1927 \edef\@@lead{\pdataref@safe{wp}\@@wp{lead}}
1928 \edef\@@RM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RM}}\else\wp@style{\pdataref@safe\@@wp\@site{RM}}\fi}
1929 \xdef\@@wp@line{\@@wp@line&\@@RM}
1930 \if@RAM
1931 \edef\@@RAM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RAM}}\else\wp@style{\pdataref@safe\@@wp\@site{RAM}}\fi}
1932 \xdef\@@wp@line{\@@wp@line&\@@RAM}
1933 \fi}
1934 \local@count0\relax%
1935 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
1936 \xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
1937 \if@RAM
1938 \global\local@count0\relax%
1939 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RAM}}%
1940 \xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
1941 \fi% if@sites
1942 \else% if@sites
1943 \xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RM}}}
1944 \if@RAM\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RAM}}}\fi
1945 \fi% if@sites
1946 \xdef\@wp@lines{\@wp@lines\@@wp@line\tabularnewline\hline}}}
1947 % \end{macrocode}
1948 % Now the case where we do not have work areas.
1949 % \begin{macrocode}
1950 \else% ifwork@areas
1951 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
1952 \@for\@@wp:=\@@wps\do{% iterate over its work packages
1953 \xdef\@@wp@line{\pdataRef{wp}\@@wp{label}%
1954 &\@ifundefined{wp@\@@wp @short}{\pdataref{wp}\@@wp{title}}{\pdataref{wp}\@@wp{short}}
1955 \ifx\wpfig@type\@true&\pdataref{wp}\@@wp{type}\fi%
1956 \ifx\wpfig@pages\@true&\pdataref{wp}\@@wp{page}\fi%
1957 \ifx\wpfig@start\@true&\pdataref{wp}\@@wp{start}\fi%
1958 \ifx\wpfig@length\@true&\pdataref{wp}\@@wp{len}\fi%
1959 \ifx\wpfig@end\@true&\pdataref{wp}\@@wp{end}\fi}
1960 \if@sites
1961 \@for\@site:=\prop@gen@sites\do{%
1962 \edef\@@lead{\pdataref@safe{wp}\@@wp{lead}}
1963 \edef\@@RM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RM}}\else\wp@style{\pdataref@safe\@@wp\@site{RM}}\fi}
1964 \xdef\@@wp@line{\@@wp@line&\@@RM}
1965 \if@RAM
1966 \edef\@@RAM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RAM}}\else\wp@style{\pdataref@safe\@@wp\@site{RAM}}\fi}
1967 \xdef\@@wp@line{\@@wp@line&\wp@style\@@RAM}
1968 \fi}
1969 \global\local@count0\relax%
1970 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
1971 \xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
1972 \if@RAM
1973 \global\local@count0\relax%
1974 \@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num{#1}\@site{RAM}}%
1975 \xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
1976 \fi
1977 \else% if@sites
1978 \xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RM}}}
1979 \if@RAM\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RAM}}\fi}
1980 \fi% if@sites
1981 \xdef\@wp@lines{\@wp@lines\@@wp@line\tabularnewline\hline}}
1982 \fi%ifwork@areas
1983 % \end{macrocode}
1984 % Now we compute the totals lines in the |\@totals| macros; again there are four cases to
1985 % consider
1986 % \begin{macrocode}
1987 \gdef\@totals{}
1988 \ifwork@areas
1989 \if@sites
1990 \@for\@site:=\prop@gen@sites\do{% iterate over the sites
1991 \@@@RM=0\if@RAM\@@@RAM=0\fi
1992 \edef\@@was{\pdataref@safe{all}{wa}{ids}}%
1993 \@for\@@wa:=\@@was\do{% iterate over the work areas
1994 \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
1995 \@for\@@wp:=\@@wps\do{% iterate over the work packages
1996 \advance\@@@RM by \pdataref@num\@@wp\@site{RM}%
1997 \if@RAM\advance\@@@RAM by \pdataref@num\@@wp\@site{RAM}\fi}}
1998 \pdata@def{all}\@site{RM}{\the\@@@RM}\if@RAM\pdata@def{all}\@site{RAM}{\the\@@@RAM}\fi
1999 \advance\all@@@RM by \the\@@@RM\if@RAM\advance\all@@@RAM by \the\@@@RAM\fi
2000 \xdef\@totals{\@totals & \textbf{\the\@@@RM}\if@RAM& \textbf{\the\@@@RAM}\fi}}
2001 \xdef\@totals{\@totals & \textbf{\the\all@@@RM}\if@RAM&\textbf{\the\all@@@RAM}\fi}
2002 \pdata@def{all}{total}{RM}{\the\all@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\all@@@RAM}\fi
2003 \else% if@sites
2004 \@@@RM=0\if@RAM\@@@RAM=0\fi
2005 \edef\@@was{\pdataref@safe{all}{wa}{ids}}%
2006 \@for\@@wa:=\@@was\do{\edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
2007 \@for\@@wp:=\@@wps\do{% iterate over the work packages
2008 \advance\@@@RM by \pdataref@num{wp}\@@wp{RM}%
2009 \if@RAM\advance\@@@RAM by \pdataref@num{wp}\@@wp{RAM}\fi}}
2010 \pdata@def{all}{total}{RM}{\the\@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\@@@RAM}\fi
2011 \xdef\@totals{&\the\@@@RM\if@RAM &\the\@@@RAM\fi}
2012 \fi% if@sites
2013 \else%i.e. no work@areas
2014 \if@sites
2015 \@for\@site:=\prop@gen@sites\do{%iterate over the sites
2016 \@@@RM=0\if@RAM\@@@RAM=0\fi%
2017 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
2018 \@for\@@wp:=\@@wps\do{% iterate over the work packages
2019 \advance\@@@RM by \pdataref@num\@@wp\@site{RM}%
2020 \if@RAM\advance\@@@RAM by \pdataref@num\@@wp\@site{RAM}\fi}
2021 \pdata@def{all}\@site{RM}{\the\@@@RM}\if@RAM\pdata@def{all}\@site{RAM}{\the\@@@RAM}\fi
2022 \xdef\@totals{\@totals & \textbf{\the\@@@RM}\if@RAM& \textbf{\the\@@@RAM}\fi}
2023 \advance\all@@@RM by \the\@@@RM\if@RAM\advance\all@@@RAM by \the\@@@RAM\fi}
2024 \xdef\@totals{\@totals &\textbf{\the\all@@@RM}\if@RAM&\textbf{\the\all@@@RAM}\fi}
2025 \pdata@def{all}{total}{RM}{\the\all@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\all@@@RAM}\fi
2026 \else% if@sites
2027 \@@@RM=0\if@RAM\@@@RAM=0\fi
2028 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
2029 \@for\@@wp:=\@@wps\do{% iterate over the work packages
2030 \advance\@@@RM by \pdataref@num{wp}\@@wp{RM}%
2031 \if@RAM\advance\@@@RAM by \pdataref@num{wp}\@@wp{RAM}\fi}
2032 \pdata@def{all}{total}{RM}{\the\@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\@@@RAM}\fi
2033 \xdef\@totals{&\the\@@@RM\if@RAM &\the\@@@RAM\fi}
2034 \fi% if@sites
2035 \fi
2036 % \end{macrocode}
2037 % And we finally have a line for the intended totals which we use in draft mode.
2038 % \begin{macrocode}
2039 \gdef\intended@totals{}\gdef\requested@totals{}
2040 \if@sites
2041 \@for\@site:=\prop@gen@sites\do{
2042 \xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{site}\@site{intendedRM}}}
2043 \xdef\requested@totals{\requested@totals&\pdataref@safe{site}\@site{reqPM}}
2044 \if@RAM\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{site}\@site{intendedRAM}}}\fi}
2045 \if@RAM\xdef\intended@totals{\intended@totals&&}\else%
2046 \xdef\intended@totals{\intended@totals&}%
2047 \xdef\requested@totals{\requested@totals&}%
2048 \fi
2049 \else% if@sites
2050 \xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{all}{intended}{RM}}}
2051 \if@RAM\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{all}{intended}{RAM}}}\fi
2052 \fi}% if@sites
2053 % \end{macrocode}
2054 % finally, we make all of this into a figure, computing the colspan of the the legend
2055 % cells for the totals via |\local@count| from the optional columns.
2056 % \begin{macrocode}
2057 \local@count\thewpfig@options\advance\local@count by 2
2058 \begin{wp@figure}
2059 \@wp@lines\hline%
2060 \multicolumn{\the\local@count}{|c|}{\prop@legend@totals}\@totals\\\hline%
2061 \ifsubmit\else%
2062 \ifx\prop@gen@topdownPM\@true%
2063 \multicolumn{\the\local@count}{|c|}{\prop@legend@intendedtotals}\intended@totals\\\hline%
2064 \fi% topdownPM
2065 \ifx\prop@gen@botupPM\@true%
2066 \multicolumn{\the\local@count}{|c|}{\prop@legend@requestedtotals}\requested@totals\\\hline%
2067 \fi% botupPM
2068 \fi% submit
2069 \end{wp@figure}}
2070 % \end{macrocode}
2071 % and now multilinguality support
2072 % \begin{macrocode}
2073 \newcommand\prop@legend@totals{\textbf{totals}}
2074 \newcommand\prop@legend@intendedtotals{\textbf{intended totals}}
2075 \newcommand\prop@legend@requestedtotals{\textbf{requested totals}}
2076 % \end{macrocode}
2077 % \end{macro}
2078 %
2079 % \subsection{Gantt Charts}\label{sec:impl:gantt}
2080 %
2081 % Gantt Charts are done with help of the the |tikz| package. The |gantt|
2082 % environments pick up on the declared duration of the proposal in months stored in the
2083 % |\prop@gen@months| macro.
2084 %
2085 % We define the keys for Gantt tables
2086 % \begin{macrocode}
2087 \newif\ifgantt@draft\gantt@draftfalse
2088 \newif\ifgantt@miles\gantt@milesfalse
2089 \define@key{gantt}{xscale}{\def\gantt@xscale{#1}}
2090 \define@key{gantt}{yscale}{\def\gantt@yscale{#1}}
2091 \define@key{gantt}{step}{\def\gantt@step{#1}}
2092 \define@key{gantt}{size}{\def\gantt@size{#1}}
2093 \define@key{gantt}{draft}[true]{\ifsubmit\else\gantt@drafttrue\fi}
2094 \define@key{gantt}{milestones}[true]{\gantt@milestrue}
2095 % \end{macrocode}
2096 % Then we define an auxiliary function that provides defaults for these keys and sets the
2097 % internal macros.
2098 % \begin{macrocode}
2099 \def\gantt@set#1{\gantt@draftfalse\def\gantt@xscale{1}\def\gantt@yscale{.35}\def\gantt@step{3}
2100 \setkeys{gantt}{#1}}
2101 % \end{macrocode}
2102 %
2103 % Finally, the Gantt Chart environment itself.
2104 %
2105 % \begin{environment}{gantt}
2106 % The |gantt[|\meta{keyvals}|]{|\meta{height}|}| environment sets up the grid and legend
2107 % for a gantt chart. The grid is |\prop@gen@months| wide and \meta{height} high.
2108 % \begin{macrocode}
2109 \newenvironment{gantt}[2][]
2110 {\gantt@set{#1}\gdef\gantt@height{#2}
2111 \def\@test{\prop@gen@months@default}
2112 \ifx\@test\prop@gen@months
2113 \ClassError{proposal}{Need overall project months to draw gantt
2114 chart - expect trouble;\MessageBreak specify
2115 \protect\begin{proposal}[...,months=??,...] to fix}\fi
2116 \@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
2117 \newdimen\gantt@ymonths
2118 \gantt@ymonths=\gantt@height cm
2119 \advance\gantt@ymonths by .8cm
2120 \begin{tikzpicture}[xscale=\gantt@xscale,yscale=\gantt@yscale]}
2121 {\draw[xstep=\gantt@step,very thin] (0,0) grid (\prop@gen@months,\gantt@height);
2122 \foreach \x in {0,\gantt@step,...,\prop@gen@months} \node at (\x,\gantt@ymonths) {\x};
2123 \ifgantt@miles
2124 \newdimen\gantt@ymiles\gantt@ymiles=\gantt@height cm
2125 \advance\gantt@ymiles by 2cm
2126 \newdimen\gantt@ymiles@top\gantt@ymiles@top=\gantt@height cm
2127 %\advance\gantt@ymiles@top by 2cm
2128 \edef\@@miles{\pdataref@safe{all}{mile}{ids}}
2129 \@for\@I:=\@@miles\do{%
2130 \edef\@@month{\pdataref@safe{mile}{\@I}{month}}
2131 \draw[very thick,blue] (\@@month,\gantt@ymiles@top) -- (\@@month,0);
2132 \node[blue] at (\@@month,\gantt@ymiles) {\pdataref{mile}{\@I}{label}};}
2133 \fi %gantt@miles
2134 \end{tikzpicture}}
2135 % \end{macrocode}
2136 % \end{environment}
2137 %
2138 % \begin{macro}{\@action}
2139 % In this we have used the macro that does the actual painting.
2140 % |\@action{|\meta{name}|}{|\meta{line}|}{|\meta{start}|}{|\meta{len}|}{|\meta{force}|}|
2141 % creates a gantt node with name \meta{name} in line \meta{line} starting at month
2142 % \meta{month} with length \meta{len} that is \meta{force} thick.
2143 % \begin{macrocode}
2144 \newdimen\gantt@ymid\newdimen\gantt@yinc\newdimen\gantt@xend
2145 \newcommand{\@action}[6][]{\def\@test{#1}%
2146 \ifx\@test\@empty\def\@@color{ganttgray}\else\def\@@color{#1}\fi
2147 \gantt@ymid=#3 cm\gantt@yinc=\gantt@yscale cm
2148 \gantt@xend=#4 cm\advance\gantt@xend by #5 cm
2149 \advance\gantt@ymid by \gantt@yinc
2150 \fill[\@@color] (#4,#3) rectangle +(#5,#6);
2151 \node (#2@left) at (#4,\gantt@ymid) {};
2152 \node (#2@right) at (\gantt@xend,\gantt@ymid) {};}
2153 % \end{macrocode}
2154 % \end{macro}
2155 %
2156 % \begin{macro}{\@dependency}
2157 % \begin{macrocode}
2158 \def\@dependency#1#2{\draw[->,line width=2pt,color=red] (#1@right) -- (#2@left);}
2159 % \end{macrocode}
2160 % \end{macro}
2161 %
2162 % \begin{macro}{\gantt@compute@effort}
2163 % A helper function that updates the dimension |\gantt@effort| according to whether the
2164 % counter |\gantt@month| is in the range. It is used in |\gantt@chart|
2165 % \begin{macrocode}
2166 \newcommand\gantt@compute@effort[3]{% start, len, force
2167 \@@e=#1\advance\@@e by #2
2168 \ifnum\thegantt@month<#1\else
2169 \ifnum\thegantt@month<\@@e
2170 \gantt@plus=#3cm\advance\gantt@effort by \gantt@plus\fi\fi}
2171 % \end{macrocode}
2172 % \end{macro}
2173 %
2174 % \begin{macro}{\ganttchart}
2175 % This macro iterates over the work areas, their work packages, and finally their work
2176 % phases to use the internal macro |\@action|. All of this in the gantt setting.
2177 % \begin{macrocode}
2178 \newcommand{\ganttchart}[1][]{\begin{figure}[ht]\centering
2179 \gantt@set{#1}
2180 \def\gantt@wps{\pdataref@num{all}{wp}{count}}
2181 \begin{gantt}[#1]{\gantt@wps}
2182 \newcounter{taskwps}\newcount\@@line
2183 \edef\@@was{\pdataref@safe{all}{wa}{ids}}
2184 \ifwork@areas
2185 \@for\@@wa:=\@@was\do{% iterate over work areas
2186 \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}
2187 \@for\@@wp:=\@@wps\do{% iterate over work packages
2188 \stepcounter{taskwps}
2189 \@@line=\gantt@wps\advance\@@line by -\thetaskwps
2190 \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
2191 \node at (-1/\gantt@xscale,\@@line) [above=-2pt] {\pdataRef{wp}\@@wp{label}};
2192 \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
2193 \@for\@@ft:=\@@wphases\do{%wp-level work phases
2194 \decode@wphase\@@ft
2195 \@action\@@wp\@@line\wphase@start\wphase@len\wphase@force}
2196 \@for\@@task:=\@@tasks\do{% tasks
2197 \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
2198 \@for\@@ft:=\@@wphases\do{%task-level work phases
2199 \decode@wphase\@@ft
2200 \@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
2201 \else% ifwork@areas false
2202 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
2203 \@for\@@wp:=\@@wps\do{% iterate over work packages
2204 \stepcounter{taskwps}
2205 \@@line=\gantt@wps\advance\@@line by -\thetaskwps
2206 \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
2207 \node at (-1/\gantt@xscale,\@@line) [above=-2pt] {\pdataRef{wp}\@@wp{label}};
2208 \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
2209 \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
2210 \decode@wphase\@@ft
2211 \@action\@@wp\@@line\wphase@start\wphase@len\wphase@force}
2212 \@for\@@task:=\@@tasks\do{% task-level work phases
2213 \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
2214 \@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
2215 \decode@wphase\@@ft
2216 \@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
2217 \fi% ifwork@areas end
2218 \edef\@@deps{\pdataref@safe{all}{task}{deps}}
2219 \@for\@@dep:=\@@deps\do{%
2220 \@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
2221 % \end{macrocode}
2222 % The next piece of code generates the effort sum table in draft mode
2223 % \begin{macrocode}
2224 \ifgantt@draft
2225 \newcounter{gantt@month}
2226 \newcount\@@e\newdimen\gantt@effort\newdimen\gantt@plus
2227 \@whilenum\thegantt@month<\prop@gen@months\do{% step over months
2228 \gantt@effort=0cm
2229 \ifwork@areas
2230 \edef\@@was{\pdataref@safe{all}{wa}{ids}}
2231 \@for\@@wa:=\@@was\do{% iterate over work areas
2232 \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}
2233 \@for\@@wp:=\@@wps\do{% iterate over work packages
2234 \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
2235 \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
2236 \decode@wphase\@@ft
2237 \gantt@compute@effort\wphase@start\wphase@len\wphase@force}
2238 \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
2239 \@for\@@task:=\@@tasks\do{% iterate over tasks
2240 \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
2241 \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
2242 \decode@wphase\@@ft
2243 \gantt@compute@effort\wphase@start\wphase@len\wphase@force}}}}
2244 \fill[ganttgray] (\thegantt@month,-5) rectangle +(1,\gantt@effort);
2245 \else% ifwork@areas
2246 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
2247 \@for\@@wp:=\@@wps\do{% iterate over work packages
2248 \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
2249 \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
2250 \decode@wphase\@@ft
2251 \gantt@compute@effort\wphase@start\wphase@len\wphase@force}
2252 \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
2253 \@for\@@task:=\@@tasks\do{% iterate over tasks
2254 \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
2255 \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
2256 \decode@wphase\@@ft
2257 \gantt@compute@effort\wphase@start\wphase@len\wphase@force}}}
2258 \fill[ganttgray] (\thegantt@month,-5) rectangle +(1,\gantt@effort);
2259 \fi% ifwork@areas
2260 \stepcounter{gantt@month}}
2261 \fi% ifgantt@draft
2262 \end{gantt}
2263 \caption{\gantt@caption}\label{fig:gantt}
2264 \end{figure}\footnotetext\gantt@footnote}
2265 % \end{macrocode}
2266 % now the multilingual support
2267 % \begin{macrocode}
2268 \newcommand\gantt@caption@main{Gantt Chart: Overview Work Package Activities}
2269 \newcommand\gantt@caption@lower{lower bar shows the overall effort \if@RAM (RAM only)\fi per month}
2270 \newcommand\gantt@caption{\gantt@caption@main\ifgantt@draft\xspace
2271 (\gantt@caption@lower)\fi}
2272 \newcommand\gantt@footnote{Bars shown at reduced height (e.g. 50\%) indicate reduced
2273 intensity during that work phase (e.g. to 50\%).}
2274 % \end{macrocode}
2275 % \end{macro}
2276 %
2277 % \begin{macro}{\gantttaskchart}
2278 % This macro is a variant of |\ganttchart|, but it shows the tasks consecutively, as is
2279 % useful for EU projects\ednote{this should be incorporated with the gantt chart above,
2280 % but I am currently to scared to do it so close to the deadline}
2281 % \begin{macrocode}
2282 \newcommand{\gantttaskchart}[1][]{\begin{figure}[hbtp]\centering\gantt@set{#1}
2283 \newcounter{gantt@all@tasks}%
2284 \setcounter{gantt@all@tasks}{\pdataref@num{all}{task}{count}}
2285 \addtocounter{gantt@all@tasks}{\pdataref@num{all}{wp}{count}}
2286 \begin{gantt}[#1]{\thegantt@all@tasks}
2287 \newcounter{gantt@tasks}\newcount\@@line
2288 \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
2289 \@for\@@wp:=\@@wps\do{% iterate over work packages
2290 \stepcounter{gantt@tasks}
2291 % \@action[white]{}\@@line0{48}1
2292 \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
2293 \@for\@@task:=\@@tasks\do{% iterate over the tasks
2294 \stepcounter{gantt@tasks}
2295 \@@line=\thegantt@all@tasks\advance\@@line by -\thegantt@tasks
2296 \node at (-.5/\gantt@xscale,\@@line) [above=-2pt] {{\footnotesize\taskreflong\@@wp\@@task}};
2297 \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
2298 \@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
2299 \decode@wphase\@@ft
2300 \@action\@@task\@@line\wphase@start\wphase@len\wphase@force
2301 }}}% end all iterations
2302 \end{gantt}
2303 \caption{\gantt@caption@main{} -- \emph{\gantt@footnote}}\label{fig:gantt}
2304 \end{figure}}
2305 % \end{macrocode}
2306 % \end{macro}
2307 %
2308 % \subsection{Coherence}\label{sec:impl:coherence}
2309 %
2310 % \begin{macro}{\j*}
2311 % \begin{macrocode}
2312 \newcommand\jpub{\textcolor{\prop@link@color}{\textbf{\Large{$\star$}}}}
2313 \newcommand\jpro{\textcolor{\prop@link@color}{\textbf{\Large{$\bullet$}}}}
2314 \newcommand\jsoft{\textcolor{\prop@link@color}{\textbf{@}}}
2315 \newcommand\jorga{\textcolor{\prop@link@color}{\textbf{\Large{$\circ$}}}}
2316 \newcommand\jsup{\textcolor{\prop@link@color}{\textbf{\smiley}}}
2317 % \end{macrocode}
2318 % \end{macro}
2319 %
2320 % \begin{macro}{\add@joint}
2321 % |\add@joint{|\meta{first}|}{|\meta{second}|}{|\meta{sym}|}| adds \meta{sym} to the the
2322 % |\coherence@|\meta{first}|@|\meta{second} macro for the coherence table.
2323 % \begin{macrocode}
2324 \newcommand\add@joint[3]{\@ifundefined{coherence@#1@#2}%
2325 {\@namedef{coherence@#1@#2}{#3}}%
2326 {\expandafter\g@addto@macro\csname coherence@#1@#2\endcsname{#3}}}
2327 % \end{macrocode}
2328 % \end{macro}
2329 %
2330 % \begin{macro}{\prop@joint}
2331 % This iterates over a comma-separated list of names and makes the necessary entries
2332 % into the coherence table.
2333 % \begin{macrocode}
2334 \newcommand\prop@joint[2]{\@for\@first:=#2\do{%
2335 \@for\@second:=#2\do{\ifx\@first\@second\else\add@joint\@first\@second{#1}\fi}}}
2336 % \end{macrocode}
2337 % \end{macro}
2338 %
2339 % \begin{macro}{\joint*}
2340 % Now, some instances that use these.
2341 % \begin{macrocode}
2342 \newcommand\jointproj[1]{\prop@joint\jpro{#1}}
2343 \newcommand\jointpub[1]{\prop@joint\jpub{#1}}
2344 \newcommand\jointorga[1]{\prop@joint\jorga{#1}}
2345 \newcommand\jointsoft[1]{\prop@joint\jsoft{#1}}
2346 \newcommand\jointsup[1]{\prop@joint\jsup{#1}}
2347 % \end{macrocode}
2348 % \end{macro}
2349 %
2350 % \begin{macro}{\coherencematrix}
2351 % \begin{macrocode}
2352 \newcommand{\coherencematrix}{
2353 {\let\tabularnewline\relax\let\hline\relax\let\site\relax% so they do
2354 \let\@sw\relax\let\jpub\relax\let\jpro\relax\let\jorga\relax% not bother
2355 \let\jsoft\relax\let\jsup\relax\let\cellcolor\relax% us
2356 \gdef\@ct@head{}%
2357 \@for\@site:=\prop@gen@sites\do{\xdef\@ct@head{\@ct@head%
2358 &\ifx\cht@swsites\@true\@sw{\site{\@site}}\else\site{\@site}\fi}}%
2359 \gdef\@ct@lines{\@ct@head\tabularnewline\hline\hline} %initialize with head line
2360 \@for\@site:=\prop@gen@sites\do{\xdef\@ct@line{\site{\@site}}%
2361 \@for\@@site:=\prop@gen@sites\do{%
2362 \xdef\@ct@line{\@ct@line&\ifx\@site\@@site{\cellcolor{wagray}{}}\fi%
2363 \@ifundefined{coherence@\@site @\@@site}{}{\@nameuse{coherence@\@site @\@@site}}}}%
2364 \xdef\@ct@lines{\@ct@lines\@ct@line\tabularnewline\hline}}}%
2365 \begin{tabular}{|l||*{\the@site}{c|}}\hline%
2366 \@ct@lines\hline%
2367 joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ project,
2368 \jorga $\hat=$ organization, \jsoft $\hat=$ software/resource dev,
2369 \jsup $\hat=$ supervision}\\\hline
2370 \end{tabular}}
2371 % \end{macrocode}
2372 % \end{macro}
2373 %
2374 % \begin{macro}{\coherencetable}
2375 % \begin{macrocode}
2376 \define@key{coherencetable}{swsites}[true]{\def\cht@swsites{#1}}
2377 \define@key{coherencetable}{stretch}{\def\cht@stretch{#1}}
2378 \newcommand\coherencetable[1][]{%
2379 \def\cht@swsites{false}%
2380 \def\cht@stretch{1}%
2381 \setkeys{coherencetable}{#1}%
2382 \begin{table}[ht]\centering%
2383 \small\setlength{\tabcolsep}{.5em}%
2384 \renewcommand{\arraystretch}{\cht@stretch}%
2385 \coherencematrix%
2386 \caption{\coherence@caption}\label{tab:collaboration}
2387 \end{table}}
2388 % \end{macrocode}
2389 % now the multilinguality support
2390 % \begin{macrocode}
2391 \newcommand\coherence@caption{Previous Collaboration between {\pn} members}
2392 %</cls>
2393 % \end{macrocode}
2394 % \end{macro}
2395 %
2396 %\subsection{Relevant Papers \& References}\label{sec:imple:papers}
2397 %
2398 % We first define a bibLaTeX bibliography heading that does not create headers, we need
2399 % it somewhere.
2400 % \begin{macrocode}
2401 %<*cls|reporting>
2402 \defbibheading{empty}{}
2403 % \end{macrocode}
2404 % We define an internal macro that prints a publication list of a given {bib\TeX} entry
2405 % type and title for convenience. It also adds a |notype=| to the token register
2406 % |\prop@rl| to deal with the unclassified entries from the list.
2407 % \begin{macrocode}
2408 \newif\if@allpapers\@allpaperstrue
2409 \newcommand\prop@ppl[3][]{\@allpapersfalse\message{ppl processing: #2}%
2410 \printbibliography[heading=subbibliography,type=#2,title=#3#1]%
2411 \@ifundefined{prop@rl}{\xdef\prop@rl{#2}}{\xdef\prop@rl{\prop@rl, #2}}}
2412 % \end{macrocode}
2413 % The following code does not work yet, it would have been nice to be able to just add a
2414 % key |unclassified| to catch the unclassified ones. I guess we just have to issue a
2415 % warning instead.
2416 % \begin{macrocode}
2417 \newcommand\prop@prl[1]{\message{unclassified: #1}%
2418 \printbibliography[heading=subbibliography,title=Unclassified,#1]}%
2419 \define@key{paperlist}{unclassified}[true]{\message{unclass: \prop@rl}\prop@prl\prop@rl}
2420 % \end{macrocode}
2421 % with this, we define a couple of keys that generate
2422 % \begin{macrocode}
2423 \define@key{paperlist}{articles}[true]{\prop@ppl{article}{Articles}}
2424 \define@key{paperlist}{chapters}[true]{\prop@ppl{inbook}{Book Chapters}}
2425 \define@key{paperlist}{confpapers}[true]{\prop@ppl[,keyword=conference]{inproceedings}{Conference Papers}}
2426 \define@key{paperlist}{wspapers}[true]{\prop@ppl[,notkeyword=conference]{inproceedings}{Workshop Papers}}
2427 \define@key{paperlist}{theses}[true]{\prop@ppl{thesis}{Theses}}
2428 \define@key{paperlist}{submitted}[true]{\prop@ppl[,keyword=submitted]{unpublished}{Submitted}}
2429 \define@key{paperlist}{books}[true]{\prop@ppl{book}{Monographs}}
2430 \define@key{paperlist}{techreports}[true]{\prop@ppl{techreport}{Technical Reports}}
2431 % \end{macrocode}
2432 %
2433 % \begin{macro}{featured}
2434 % We introduce a new bibLaTeX category |featured| for those papers that were already
2435 % mentioned in |\prop@paperlist| and the macros defined from it.
2436 % \begin{macrocode}
2437 \DeclareBibliographyCategory{featured}
2438 % \end{macrocode}
2439 % \end{macro}
2440 %
2441 % \begin{macro}{\prop@paperlist}
2442 % We generate a subsection with a |refsection| (this makes a separate bibliography for
2443 % this section) and activate the keys via |\nocite|. Then we just print the bibliography
2444 % with the empty header we created before.
2445 % \begin{macrocode}
2446 \newcommand\prop@paperlist[2][]{%
2447 \let\biboldfont\bibfont%
2448 \renewcommand{\bibfont}{\footnotesize}%
2449 \renewcommand{\baselinestretch}{.9}
2450 \def\do##1{\addtocategory{featured}{##1}}\docsvlist{#2}%
2451 \setkeys{paperlist}{#1}
2452 \@ifundefined{prop@rl}{}{\@latex@warning{some papers are not classified!}}
2453 \if@allpapers\printbibliography[category=featured,heading=empty]\fi%
2454 \let\bibfont\biboldfont}
2455 % \end{macrocode}
2456 % \end{macro}
2457 %
2458 % We only have to define the |warnpubs| and |empty| heading constructors
2459 %
2460 % \begin{macrocode}
2461 \def\prop@warnpubs@message{Many of the proposers' publications are online at one of the following URIs:}
2462 \def\prop@warnpubs@title{References}
2463 \defbibheading{warnpubs}{\section*{\prop@warnpubs@title}%
2464 \@ifundefined{prop@gen@pubspages}
2465 {\@latex@warning{No publication pages specified;
2466 use the pubspage key in the proposal environment!}}
2467 {\prop@warnpubs@message%
2468 \@for\@I:=\prop@gen@pubspages\do{\par\noindent\csname\@I\endcsname}}}
2469 \defbibheading{empty}{}
2470 %</cls|reporting>
2471 % \end{macrocode}
2472 %
2473 % \subsection{Miscellaneous}\label{sec:impl:misc}
2474 %
2475 % \begin{macro}{\signatures}
2476 % \begin{macrocode}
2477 %<*pdata>
2478 \newcommand{\signatures}[1]{\section{#1}
2479 \qquad\number\day. \number\month. \number\year\\[6ex]
2480 \strut\qquad Date\hfill\@for\@p:=\prop@gen@PIs\do{%
2481 \wa@ref{person}\@p{personaltitle}~\wa@ref{person}\@p{name}\hfill}}
2482 % \end{macrocode}
2483 % \end{macro}
2484 %
2485 %
2486 % \begin{macro}{\@dmp}
2487 % The |\@dmp| macro shows metadata information about the keys in the margin if
2488 % |\keystrue| is specified. This is a debugging tool.
2489 % \begin{macrocode}
2490 \def\@dmp#1{\ifkeys\marginpar{#1}\fi}
2491 % \end{macrocode}
2492 % \end{macro}
2493 %
2494 % \begin{macro}{\euro}
2495 % \begin{macrocode}
2496 \renewcommand\euro{\officialeuro\xspace}
2497 %</pdata>
2498 % \end{macrocode}
2499 % \end{macro}
2500 % \Finale
2501 \endinput
2502 % LocalWords: proposal dtx xkohlhase areastrue svninfo noworkareas twoside emph gitinfo
2503 % LocalWords: areasfalse wa textcomp amssymb url graphicx colortbl xcolor RO OJBref sl
2504 % LocalWords: fancyhdr keyval eurosym tikz calc USenglish ngerman linkcolor ne WPref gen
2505 % LocalWords: citecolor urlcolor colorlinks pagecolor breaklinks bookmarksopen WPref
2506 % LocalWords: hyperref LaTeX workpackage PIs thema acrolong anzungsantrag im Mitarbeiter
2507 % LocalWords: Einzelverfahren tabline Allgemeine Angaben Antragsteller worktel ifsvninfo
2508 % LocalWords: bitabline personaltitle academictitle birthdate Dienstanschrift Hilfskraft
2509 % LocalWords: workaddress atabline workfax Privatanschrift privaddress privtel ifgitinfo
2510 % LocalWords: dt Kennwort Fachgebiet und Arbeitsrichtung Voraussichtliche wa fancyfoot
2511 % LocalWords: Gesamtdauer Antragszeitraum Zusammenfassung workarea wp wps num prop@gen
2512 % LocalWords: refundefinedtrue lightgray gantt xstep Unterschriften Id areas acro Lutz
2513 % LocalWords: submit hide ed public article paper today array comment wide RE tweakable
2514 % LocalWords: babel true bookmarks blue LO LE page of prop sites key site RM hypertarget
2515 % LocalWords: def id title acronym discipline start months Proposal Erg by cls endinput
2516 % LocalWords: empty em name affiliation Applicants Work Address email The pn Hartenstein
2517 % LocalWords: curriculum vita the applicants are enclosed appendix reference Schr doctex
2518 % LocalWords: Research area and field work Scientific Fields Anticipated write botupPM
2519 % LocalWords: duration Application period Summary short lead Package label task botupMP
2520 % LocalWords: tasks deps number line Effort target ids count warning at pdata swsites
2521 % LocalWords: for undefined safe zero one two three four five six seven eight swsites
2522 % LocalWords: nine ten eleven twelve style lines totals Packages xscale yscale wphrases
2523 % LocalWords: step set gray very thin grid workphase len force phase length to endhead
2524 % LocalWords: taskdep from rectangle left right width pt color red above dep jointsub
2525 % LocalWords: Overview Activities Signatures Date paralist ymonths ymid yinc jointsoft
2526 % LocalWords: xend effort month iffalse eustrep.dtx fileversion maketitle Antr jointsoft
2527 % LocalWords: tableofcontents DescribeEnv ifpublic ifpublic compactitem wpfig jointsup
2528 % LocalWords: wpfig workplan workplan bookeeping wissenchaftliche tasklist dmp jointsup
2529 % LocalWords: tasklist taskin taskref taskref tasktref tasktref localtaskref jsoft jsoft
2530 % LocalWords: localtaskref ganttchart biblatex ifx dfgproposal.dtx newpage pn jsup jsup
2531 % LocalWords: bibtex proposal1-blx.aux pdataref WPtref WPtref WAref WAref WAtref wasysym
2532 % LocalWords: WAtref protectmacro thebibliography bibitem newblock newif inst
2533 % LocalWords: ifsubmit submitfalse publicfalse ifkeys keysfalse ifwork RAMtrue
2534 % LocalWords: submittrue publictrue excludecomment RAMfalse keystrue sfdefault
2535 % LocalWords: renewcommand familydefault helvet includecomment subsubsections
2536 % LocalWords: setcounter secnumdepth ifofpage ofpagefalse fancyhead thepage sw
2537 % LocalWords: pagestyle fancyplain sitesfalse sitestrue ifundefined gdef allwp
2538 % LocalWords: fundedperiod reportperiod textbf newenvironment titlepage auxout
2539 % LocalWords: thispagestyle newcounter stepcounter tocdepth ofpagetrue setkeys
2540 % LocalWords: finalreport orderzeitraum thewa thewp addtocounter bigskip pws
2541 % LocalWords: textsf smallskip ignorespaces subsubsection theallwp req pnlong
2542 % LocalWords: compactenum compactenum thetask newcount thegantt refsection tl
2543 % LocalWords: nocite defbibheading ourpubs printbibliography expandafter ifnum
2544 % LocalWords: csname endcsname count ifcase cellcolor wptable widehat qquad ct
2545 % LocalWords: tabularnewline wplist ifgantt drafttrue RMdisclaimer draftfalse
2546 % LocalWords: RMdisclaimerfalse RMdisclaimertrue newdimen taskwps thetaskwps
2547 % LocalWords: whilenum hfill marginpar texteuro officialeuro texttt pnlong wpg
2548 % LocalWords: roject xspace internallly OBJref OBJtref OJBtref ldots jointpub
2549 % LocalWords: pdatacount pdatacount coherencematrix coherencematrix jointpub
2550 % LocalWords: jointproj jointproj jointorga jointorga jpub jpub jproj jproj rl
2551 % LocalWords: jorga coherencetable coherencetable vspace ifdelivs delivsfalse
2552 % LocalWords: delivstrue boxedminipage ednotes thempfootnote mpfootnote xdef
2553 % LocalWords: csquotes eso-foot ednoteshape footnotesize importfrom readpdata
2554 % LocalWords: pubspage newcommand jobname.pdata jobname compromized warnpubs
2555 % LocalWords: maxbibnames reportfalse reporttrue noindent goodbreak theobjective
2556 % LocalWords: deliv ednote wpheadertable wptitle wprm hline theprop newwrite
2557 % LocalWords: delivs openout deliverables themilestone wpdelivs textwidth lec
2558 % LocalWords: compactdesc wadelivs hfil nobreak hbox leadsto delivref dissem
2559 % LocalWords: delivtref dissem wpdeliv thedeliv textit wadeliv verif verif rgb
2560 % LocalWords: milesfor longtable footnotemark footnotetext sortkey inputdelivs
2561 % LocalWords: makeatletter makeatother italicised tikzpicture paperlist jpro
2562 % LocalWords: textcolor namedef namedef nameuse setlength tabcolsep clange ppl
2563 % LocalWords: arraystretch thedeliverable biboldfont bibfont sitename darkblue
2564 % LocalWords: wpsubsection wpsubsection wpsubsectionfalse wpsubsectiontrue ppl
2565 % LocalWords: definecolor medskip fundsuntil fundsuntil defernumbers shortname
2566 % LocalWords: totalduration circ orga notype allpapers allpaperstrue prl sym
2567 % LocalWords: allpapersfalse subbibliography unclass inbook confpapers wphases
2568 % LocalWords: inproceedings wspapers notkeyword techreports techreport emphbox
2569 % LocalWords: textbackslash wpsectionheadings compactht compactht emphbox sym
2570 % LocalWords: dfgproposal Tsanko Tsankov mdframed newmdenv wphase thealltasks
2571 % LocalWords: alltasks taskreflong definecolorset leadgray wagray thewpfig fancyhfoffset
2572 % LocalWords: wpfigstyle colspan keyvals gantttaskchart baselinestretch NeedsTeXFormat
2573 % LocalWords: mileref mileref miletref backref firstinits wissenschaftlicher
2574 % LocalWords: wissenschaftliche startend@wphases addtocategory localdelivref
2575
2576 % \endinput
2577 % Local Variables:
2578 % mode: doctex
2579 % TeX-master: t
2580 % End: