summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/proposal
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/proposal')
-rw-r--r--macros/latex/contrib/proposal/README21
-rw-r--r--macros/latex/contrib/proposal/base/README12
-rw-r--r--macros/latex/contrib/proposal/base/proposal.dtx2580
-rw-r--r--macros/latex/contrib/proposal/base/proposal.ins37
-rw-r--r--macros/latex/contrib/proposal/bin/Modparse.pm189
-rw-r--r--macros/latex/contrib/proposal/bin/README32
-rwxr-xr-xmacros/latex/contrib/proposal/bin/checksum71
-rwxr-xr-xmacros/latex/contrib/proposal/bin/filedate45
-rwxr-xr-xmacros/latex/contrib/proposal/bin/generate-issues470
-rw-r--r--macros/latex/contrib/proposal/dfg/README15
-rw-r--r--macros/latex/contrib/proposal/dfg/dfgproposal.dtx622
-rw-r--r--macros/latex/contrib/proposal/dfg/dfgproposal.ins37
-rw-r--r--macros/latex/contrib/proposal/dfg/dfgproposal.pdfbin0 -> 246169 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/Makefile74
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/funds.tex81
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/preconditions.tex104
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/proposal.pdfbin0 -> 104932 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/proposal.tex97
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/public.pdfbin0 -> 91116 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/public.tex7
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/state.tex59
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/submit.pdfbin0 -> 91132 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/submit.tex7
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/workplan.tex215
-rw-r--r--macros/latex/contrib/proposal/dfg/proposal/zusammenfassung.tex20
-rw-r--r--macros/latex/contrib/proposal/dfg/report/Makefile67
-rw-r--r--macros/latex/contrib/proposal/dfg/report/README22
-rw-r--r--macros/latex/contrib/proposal/dfg/report/finalreport.pdfbin0 -> 43539 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/report/finalreport.tex52
-rw-r--r--macros/latex/contrib/proposal/dfg/report/letter_submission.pdfbin0 -> 34723 bytes
-rw-r--r--macros/latex/contrib/proposal/dfg/report/letter_submission.tex33
-rw-r--r--macros/latex/contrib/proposal/dfg/report/progressreport.tex28
-rw-r--r--macros/latex/contrib/proposal/dfg/report/progresssummary.tex18
-rw-r--r--macros/latex/contrib/proposal/eu/README14
-rw-r--r--macros/latex/contrib/proposal/eu/euproposal.dtx601
-rw-r--r--macros/latex/contrib/proposal/eu/euproposal.ins37
-rw-r--r--macros/latex/contrib/proposal/eu/euproposal.pdfbin0 -> 273933 bytes
-rw-r--r--macros/latex/contrib/proposal/eu/strep/Makefile77
-rw-r--r--macros/latex/contrib/proposal/eu/strep/README14
-rw-r--r--macros/latex/contrib/proposal/eu/strep/deliverables.tex34
-rw-r--r--macros/latex/contrib/proposal/eu/strep/draft.tex1
-rw-r--r--macros/latex/contrib/proposal/eu/strep/final.tex7
-rw-r--r--macros/latex/contrib/proposal/eu/strep/grantagreement.tex7
-rw-r--r--macros/latex/contrib/proposal/eu/strep/impact.tex40
-rw-r--r--macros/latex/contrib/proposal/eu/strep/implementation.tex103
-rw-r--r--macros/latex/contrib/proposal/eu/strep/issues.tex59
-rw-r--r--macros/latex/contrib/proposal/eu/strep/methodology.tex49
-rw-r--r--macros/latex/contrib/proposal/eu/strep/milestones.tex40
-rw-r--r--macros/latex/contrib/proposal/eu/strep/objectives.tex13
-rw-r--r--macros/latex/contrib/proposal/eu/strep/progress.tex11
-rw-r--r--macros/latex/contrib/proposal/eu/strep/propB.pdfbin0 -> 220999 bytes
-rw-r--r--macros/latex/contrib/proposal/eu/strep/propB.tex65
-rw-r--r--macros/latex/contrib/proposal/eu/strep/public.pdfbin0 -> 109019 bytes
-rw-r--r--macros/latex/contrib/proposal/eu/strep/public.tex7
-rw-r--r--macros/latex/contrib/proposal/eu/strep/quality.tex14
-rw-r--r--macros/latex/contrib/proposal/eu/strep/risks.tex17
-rw-r--r--macros/latex/contrib/proposal/eu/strep/site-bar.tex19
-rw-r--r--macros/latex/contrib/proposal/eu/strep/site-baz.tex13
-rw-r--r--macros/latex/contrib/proposal/eu/strep/site-efo.tex14
-rw-r--r--macros/latex/contrib/proposal/eu/strep/site-jacu.tex53
-rw-r--r--macros/latex/contrib/proposal/eu/strep/site-templatex.tex40
-rw-r--r--macros/latex/contrib/proposal/eu/strep/submit.pdfbin0 -> 97709 bytes
-rw-r--r--macros/latex/contrib/proposal/eu/strep/submit.tex7
-rw-r--r--macros/latex/contrib/proposal/eu/strep/workplan.tex19
-rw-r--r--macros/latex/contrib/proposal/eu/strep/wp-class.tex44
-rw-r--r--macros/latex/contrib/proposal/eu/strep/wp-dissem.tex62
-rw-r--r--macros/latex/contrib/proposal/eu/strep/wp-management.tex61
-rw-r--r--macros/latex/contrib/proposal/eu/strep/wp-temple.tex44
-rw-r--r--macros/latex/contrib/proposal/lib/Makefile.ctan88
-rw-r--r--macros/latex/contrib/proposal/lib/Makefile.in90
-rw-r--r--macros/latex/contrib/proposal/lib/Makefile.vars38
-rw-r--r--macros/latex/contrib/proposal/lib/proposal.bib76
72 files changed, 6893 insertions, 0 deletions
diff --git a/macros/latex/contrib/proposal/README b/macros/latex/contrib/proposal/README
new file mode 100644
index 0000000000..29c2b7e4d5
--- /dev/null
+++ b/macros/latex/contrib/proposal/README
@@ -0,0 +1,21 @@
+LaTeX-proposal: A set of LaTeX classes for preparing proposals for collaborative projects
+Version: 2016-04-15
+
+The base proposal class supports many of the general elements of project proposals. It is
+optimized towards collaborating on writing project proposals. This class is intended to be
+specialized to particular funding bodies that have their own styles.
+
+MANIFEST:
+base: the base proposal class
+dfg: the instance for Deutsche Forschungsgemeinschaft
+eu: the instance for EU proposals
+lib: Makefiles for the management of self-documenting packages
+bin: A script that makes GitHub issues from the deliverables of a
+ proposal for project managment if the proposal is granted.
+
+Copyright(c) 2016 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://github.com/KWARC/LaTeX-proposal
+This also contains examples and Makefiles that help the proposal writing process.
diff --git a/macros/latex/contrib/proposal/base/README b/macros/latex/contrib/proposal/base/README
new file mode 100644
index 0000000000..5077b8f827
--- /dev/null
+++ b/macros/latex/contrib/proposal/base/README
@@ -0,0 +1,12 @@
+proposal.cls: A class for preparing proposals for collaborative projects
+
+The proposal class supports many of the general elemenst of project proposals. It is
+optimized towards collaborate projects. This class is intended to be specialized to
+particular funding bodies that have their own styles.
+
+Copyright(c) 2010 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal
+
diff --git a/macros/latex/contrib/proposal/base/proposal.dtx b/macros/latex/contrib/proposal/base/proposal.dtx
new file mode 100644
index 0000000000..733f51aa51
--- /dev/null
+++ b/macros/latex/contrib/proposal/base/proposal.dtx
@@ -0,0 +1,2580 @@
+% \iffalse meta-comment
+% A class for preparing general proposals, to be instantiated for particular donors
+%
+% Copyright (c) 2011 Michael Kohlhase, all rights reserved
+%
+% This file is distributed under the terms of the LaTeX Project Public
+% License from CTAN archives in directory macros/latex/base/lppl.txt.
+% Either version 1.0 or, at your option, any later version.
+%
+% The development version of this file can be found at
+% https://github.com/KWARC/LaTeX-proposal
+% \fi
+%
+% \iffalse
+%<cls|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<cls>\ProvidesClass{proposal}[2016/04/15 v1.5 Project Proposal]
+%<pdata>\ProvidesPackage{pdata}[2016/04/15 v1.5 Project Data]
+%<reporting>\ProvidesPackage{reporting}[2016/04/15 v1.5 Project Reporting]
+%<*driver>
+\documentclass{ltxdoc}
+\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
+\DoNotIndex{\begin,\AtEndDocument,\newcommand,\newcounter,\stepcounter}
+\DoNotIndex{\immediate,\openout,\closeout,\message,\typeout}
+\DoNotIndex{\section,\scshape,\arabic}
+\EnableCrossrefs
+%\CodelineIndex
+%\OnlyDescription
+\RecordChanges
+\usepackage{textcomp,url,paralist,a4wide,xspace}
+\usepackage[show]{ed}
+\usepackage[maxbibnames=6,hyperref=auto,style=alphabetic,backend=bibtex]{biblatex}
+\addbibresource{../lib/proposal.bib}
+\usepackage[bookmarks=true,linkcolor=blue,
+ citecolor=blue,urlcolor=blue,colorlinks=true,
+ breaklinks=true, bookmarksopen=true]{hyperref}
+\makeindex
+\def\subversion{\textsc{Subversion}\xspace}
+\def\git{\textsc{Git}\xspace}
+\begin{document}
+\DocInput{proposal.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\CheckSum{4091}
+%
+% \changes{v0.4}{2009/05/12}{copied over from eustrep.dtx}
+% \changes{v0.5}{2009/05/27}{added gantt charts}
+% \changes{v0.6}{2009/06/27}{added task referencing system}
+% \changes{v0.7}{2010/09/22}{added final report infrastructure}
+% \changes{v0.7}{2010/10/29}{added noRAM option}
+% \changes{v0.7}{2010/11/01}{added paper list infrastructure}
+% \changes{v1.0}{2010/11/03}{this works well, releasing to CTAN}
+% \changes{v1.1}{2010/12/16}{deprecating workphase in favor of attributes}
+% \changes{v1.1}{2011/01/05}{separating out pdata.sty for data handling and referencing}
+% \changes{v1.2}{2011/03/18}{separating out dfgproposal.dtx}
+% \changes{v1.2}{2011/03/19}{adding deliverables}
+% \changes{v1.3}{2011/05/03}{adding general report handling}
+% \changes{v1.4}{2012/01/15}{better metadata handling for task-level work
+% phases and partners, using \texttt{wphases} instead of \texttt{start} and
+% lists of sites}
+% \changes{v1.4}{2012/01/18}{changing the argument structure of {\textbackslash joint*} to
+% \texttt{len} in work packages and tasks}
+% \changes{v1.4}{2012/01/18}{various extensions for the Jan 2012 EU proposals}
+% \changes{v1.4}{2012/01/28}{some localization support}
+% \changes{v1.4}{2013/01/12}{more documentation of milestones}
+% \changes{v1.5}{2014/01/14}{many layout tweaks support for CVs, milestones in gantt}
+%
+% \GetFileInfo{proposal.cls}
+%
+% \MakeShortVerb{\|}
+% \title{Preparing Proposals in {\LaTeX} with \texttt{proposal.cls}}
+% \author{Michael Kohlhase\\
+% Computer Science, Jacobs University Bremen\\
+% \url{http://kwarc.info/kohlhase}}
+% \maketitle
+%
+% \begin{abstract}
+% The |proposal| class supports many of the generic elements of Grant Proposals. It is
+% optimized towards collaborative projects, and should specialized to particular funding
+% agencies.
+% \end{abstract}
+%
+% \tableofcontents\newpage
+%
+% \section{Introduction}\label{sec:intro}
+%
+% Writing grant proposals is a collaborative effort that requires the integration of
+% contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
+% allows to coordinate the process via a source code control system like \git or
+% \subversion, allowing the proposal writing team to concentrate on the contents rather
+% than the mechanics of wrangling with text fragments and revisions. In fact the
+% |proposal| package has evolved out of a series of collaborative proposal writing
+% efforts, where large teams (up to 30 individuals from up to 20 sites) have written a
+% 100-page proposal in three weeks (with over 2000 commits). Such collaborative writing
+% sprints are impossible without a revision control system and a ``semantic'' document
+% class that generates tables, charts, and deliverable lists from content markup and thus
+% takes care of many of the routine tasks of keeping information consistent.
+%
+% The |proposal| class supports many of the generic elements of Grant Proposals. The
+% package documentation is still preliminary, fragmented and incomplete.
+%
+% The |proposal| class is distributed under the terms of the LaTeX Project Public License
+% from CTAN archives in directory |macros/latex/base/lppl.txt|. Either version 1.0 or, at
+% your option, any later version.
+%
+% The CTAN archive always contains the latest stable version, the development version can
+% be found on GitHub at \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports
+% please use the issue tracker there. Please feel free to fork the repository and provide
+% extensions and improvements.
+%
+% The development version also contains example proposals and a very useful script that
+% generates GitHub issues for all the workpackages, tasks, and deliverables. This is a
+% great way of starting up a project and controlling its progress. The OpenDreamKit EU
+% project (see \url{http://opendreamkit.org}) uses this for its (very public) project
+% planning on the issue tracker at \url{https://github.com/OpenDreamKit} after (also
+% publicly) developing the proposal on GitHub.
+%
+% Finally, the GitHub reposistory contains example project proposals and specialized
+% Makefiles that help start off the proposal development process. These are not part of
+% the CTAN/TeXLive distributions.
+%
+% \section{The User Interface}\label{sec:user-interface}
+%
+% In this section we will describe the functionality offered by the |proposal| class
+% along the lines of the macros and environments the class provides.
+%
+% \subsection{Package Options}\label{sec:user:options}
+%
+% The |proposal| package takes the options |submit|, |noworkareas|, |RAM|, |deliverables|,
+% |wpsubsection|, |keys|, |svninfo|, |gitinfo|, and |public|.
+%
+% The \DescribeMacro{submit}|submit| option will disable various proposal management decorations
+% which are enabled by default for submission.
+%
+% The \DescribeMacro{noworkareas}|noworkareas| option specifies that we do not want to structure
+% our work plan into work areas (see section~\ref{sec:user:wpwa}).
+%
+% The \DescribeMacro{RAM}|RAM| option specifies that we specify research assistant months
+% in the effort tallies (see section~\ref{sec:user:wpwa}).
+%
+% The \DescribeMacro{deliverables}|deliverables| option specifies that we specify
+% deliverables in the grant proposal (see section~\ref{sec:user:deliverables}). As the
+% deliverables management needs extra support, we only activate them via this option.
+%
+% The \DescribeMacro{wpsubsection}|wpsubsection| option specifies that we want to see
+% subsections headings for the WPs (and WAs, if we have them).
+%
+% The \DescribeMacro{report}|report| option specifies that we want to use the |report.cls|
+% class as a basis for |proposal| instead of the default |article.cls|.
+%
+% The \DescribeMacro{keys}|keys| option specifies that we want to see the values of various
+% keyval arguments in the margin.
+%
+% The \DescribeMacro{svninfo}|svninfo| option specifies specifies that we want to use the
+% |svninfo| package for displaying version control metadata in the document (except when
+% the |submit| option is also given). For this we need the |svninfo| metadata line of the
+% form
+% \begin{verbatim}
+% \SVN $Id: proposal.tex 13610 2007-07-11 04:30:16Z kohlhase $
+% \svnKeyword $HeadURL: https://svn.kwarc.info/../proposal.tex $
+% \end{verbatim}
+% at the beginning of each file (or in the preamble).
+%
+% Analogously, the \DescribeMacro{gitinfo}|gitinfo| option uses the |gitinfo2| package for
+% GIT metadata. Note that you will need to install the post-commit hooks in your working
+% copy according to~\cite{gitinfo2:on} for this to work.
+%
+% Finally, the \DescribeMacro{public}|public| option allows to hide certain sensitive
+% (e.g. financial) parts of the proposal. For this, the |proposal| class provides the
+% \DescribeEnv{private}|private| environment. If the option |public| is set, the parts of
+% the document between |\begin{private}| and |\end{private}| do not produce output. This
+% is useful for producing public versions of the proposal that hide confidential
+% parts. Note that both |\begin{private}| and |\end{private}| {\emph{have to be on lines
+% of their own may not have any leading whitespace}} otherwise an error occurs and
+% {\LaTeX} gives error messages that are difficult to comprehend. An alternative way to
+% distinguish private and public sections are to use the
+% \DescribeMacro{\ifpublic}|\ifpublic| conditional: |\ifpublic{3}\else{5}\fi| will result
+% in ``5'' in the submitted draft and ``3'' in the public document.
+%
+% \subsection{Proposal Metadata and Title page}\label{sec:user:metadata}
+%
+% The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal|
+% environment, which also generates the title page and the first section of the proposal
+% as well as the last pages of the proposal with the signatures, enclosures, and
+% references. The |proposal| environment should contain all the mandatory parts of the
+% proposal text. The |proposal| environment uses the following keys to specify metadata.
+% \begin{compactitem}
+% \item \DescribeMacro{title}|title| for the proposal title (used on the title page),
+% \item \DescribeMacro{instrument}|instrument| for the instrument of funding
+% that you would like to apply for,
+% \item \DescribeMacro{acronym}|acronym| for the proposal acronym, possibly accompanied
+% by an \DescribeMacro{acrolong}|acrolong| that explains it. The acronym will also be used in
+% the page headings.
+% \item \DescribeMacro{start}|start| for the start date of the proposed fragment of the
+% project, and \DescribeMacro{months}|months| for the length of the proposal in
+% months. Both have to be specified for the |proposal| class to work.
+% \item If the proposal only concerns a part of a longer-running project, the
+% \DescribeMacro{since}|since| key allows to specify the date since when the overall
+% project runs. Finally, the \DescribeMacro{fundsuntil}|fundsuntil| allows to specify a
+% date until which the funds last.
+% \item \DescribeMacro{discipline}|discipline| for the academic discipline and |areas| for
+% the research areas in that discipline.
+% \item \DescribeMacro{PI}|PI| to declare the principal investigator. For collaborative
+% proposals we can use the |PI| key multiple times. The |proposal| package uses the
+% |workaddress| package for representation of personal metadata,
+% see~\cite{Kohlhase:workaddress:ctan} or the file |proposal.tex| for details.
+% \item Many collaborative proposals are shared between two institutions, which we can
+% declare with the \DescribeMacro{site}|site| key. As this changes the interface this
+% should not be used for single-institution proposals. We will describe the setup for a
+% single-site proposal below and point out the differences. The example |proposal.tex|
+% is a two-site proposal.
+% \end{compactitem}
+% If the |acronym| and |acrolong| are given, then they automatically define the macros
+% \DescribeMacro{\pn}|\pn| and \DescribeMacro{\pnlong}|\pnlong| which allow to use the
+% project acronym (\underline{p}roject \underline{n}name) and its long version in the
+% text. Note that these macros use |\xspace| internallly, so they do not have to be
+% enclosed in curly braces.
+%
+% There are two ways of organizing the distribution of personnel resources when developing
+% a proposal. Either the coordinator takes a \emph{top-down approach} where she assigns
+% person months (PM) to the respective site, of she takes a \emph{bottom-up approach},
+% where the sites ``request'' personnel resources by marking them up in the CVs of the
+% researchers in the site descriptions. |proposal.cls| supports both of these. Support
+% for the first is configured via the \DescribeMacro{topdownPM}|topdownPM| key and for the
+% other via the \DescribeMacro{botupPM}|botupPM| key. They add respective lines for
+% planning in the WA/WP figure (see~\ref{sec:user:wpwa}).
+%
+% \subsection{Proposal Appearance}\label{sec:user:appearance}
+%
+% The |proposal| environment takes a second set of keyval arguments that allow to
+% fine-tune the appearance of the proposal document. \ednote{move the RAM,
+% wpsectionheadings,... options here.}
+% \begin{compactitem}
+% \item If the \DescribeMacro{compactht}|compactht| key is given (it does not need a
+% value), then the header tables\ednote{describe them somewhere and reference here} are
+% made compact, i.e. the sites that do not have a contribution to the work package or work
+% area do not get listed. This is useful for proposals with more than 8 partners.
+% \end{compactitem}
+%
+% The |proposal| package supplies the \DescribeEnv{emphbox}|emphbox| environment to create
+% boxes of emphasized material we want to call attention to.
+%
+% \subsection{Objectives}\label{sec:user:objectives}
+%
+% The work plan starts with a discussion of objectives, which may be referenced in the
+% text later. The |proposal| package provides the \DescribeEnv{objective}|objective|
+% environment that allows to mark up individual objectives. It takes a keyval argument
+% with the keys |id| for identification, |title| for the objective title, and |short| for
+% a short title that can be used for referencing when the title is too long. The
+% objectives can be referenced via \DescribeMacro{\OBJref}|\OJBref{|\meta{id}|}| by their
+% label and via \DescribeMacro{\OBJtref}|\OJBtref{|\meta{id}|}| by label and (short if it
+% was specified) title.
+%
+% \subsection{Work Areas and Work Packages}\label{sec:user:wpwa}
+%
+% Grant proposals have another part that is often highly stylized; the work plan. This is
+% usually structured into ``work packages'' --- i.e. work items that address a cohesive
+% aspect of the proposed work. These work packages are usually consecutively numbered,
+% have a title, and an associated effort estimation. As work packages are the ``atomic''
+% planning units, they are usually heavily cross-referenced. A well-written proposal
+% usually contains a table giving an overview over the work packages and their efforts and
+% a Gantt chart showing the temporal distribution of the proposed work to allow the
+% reviewers to get a clear picture of the feasibility of the research and development
+% proposed. But this picture is also essential during the development of a proposal (which
+% the |proposal| package aims to support), when the work packages (and their estimated
+% efforts) usually change considerably. Therefore the |proposal| class standardizes
+% markup for work packages and automatically computes the work package table (which can be
+% inserted into the table via the \DescribeMacro{\wpfig}|\wpfig| macro) and the Gantt
+% Chart (see Section~\ref{sec:user:gantt}).
+%
+% To achieve the automation, work plan is marked up by the
+% \DescribeEnv{workplan}|workplan| environment, which sets up various internal counters and
+% bookeeping macros. It contains texts and |workpackage| environments for the work
+% packages.
+%
+% The purpose of the \DescribeEnv{workpackage}|workpackage| environment is to mark up a
+% fragment of text as a work package description and specify the metadata so that it can
+% be used in the work package table and Gantt chart generation. The metadata is specified
+% by the following keys:
+% \begin{compactitem}
+% \item The \DescribeMacro{id}|id| key is used to specify a label for cross-referencing the
+% work package or work group, it must be document-unique.
+% \item The \DescribeMacro{title}|title| and \DescribeMacro{short}|short| keys are used
+% for the work package/group title. The short title is used in tables and should not be
+% longer than 15 characters.
+% \item The \DescribeMacro{wphases}|wphases| key is used according to
+% Section~\ref{sec:user:workphase}
+% \item The \DescribeMacro{requires}|requires| key can be used to mark, up dependencies
+% between tasks. If |requires=\taskin{|\meta{rid}|}{|\meta{wp}|}| is given in a task
+% with |id=|\meta{t}, then task \meta{rid} in work package \meta{wp} must be completed
+% for task \meta{t} to become possible. This key will draw an arrow into the gantt chart
+% from the end of task \meta{rid} to \meta{t}. Note that dependencies should always
+% point forward in time. Furthermore, note that the fact that dependencies always go
+% from the end of the source to the beginning of the target work phase is intentional,
+% if this does not meet your needs, then you should probably break a work phase into
+% pieces that can be addressed separately.
+% \item In single-site proposals, the \DescribeMacro{RM}|RM| (and \DescribeMacro{RAM}|RAM|
+% if the |RAM| option was given) keys are used to specify the estimated efforts to be
+% expended on research and development in this work package. Both are specified in
+% person months. |RM| is used for ``researcher months'' (wissenschaftlicher Mitarbeiter)
+% and |RAM| for ``research assistant months'' (wissenschaftliche Hilfskraft).
+% \item In multi-site proposals, the |proposal| package generates the keys
+% \DescribeMacro{*RM}\meta{site}|RM| (and \DescribeMacro{*RAM}\meta{site}|RAM|) where
+% \meta{site} is any site label declared via the |site| key in the top-level |proposal|
+% environment. This can be used to specify the person months that the site spends on
+% this work package (the value for work groups is automatically computed (remember to
+% run {\LaTeX} twice for this)).
+% \item In multi-site proposals the \DescribeMacro{lead} |lead| key specifies the work
+% package or work group lead, the value of this feature should be the short name of the
+% respective partner.
+% \item For work packages with many prospers the \DescribeMacro{swsites}|swsites| key
+% can be given (no value needed) to turn the site names sideways to conserve
+% (horizontal) space.
+% \end{compactitem}
+%
+% It is often useful to group the work packages in a proposal further (especially for
+% larger, collaborative proposals). This can be done via the
+% \DescribeEnv{workarea}|workarea| environment, which groups work packages. This
+% environment takes the same keys as the |workpackage| environment, except for the
+% efforts, which can be computed automatically from the work packages it groups.
+%
+% As the author of the |proposal| class likes more structured proposals, using work
+% areas is the default, but the |proposal| class can also be used with the
+% |noworkareas| option for less structured (smaller) proposals.
+%
+% \subsection{Tasks}\label{sec:user:task}
+%
+% In the work packages we can list tasks that need to be undertaken with the
+% \DescribeEnv{tasklist}|tasklist| environment. The individual tasks are marked up with
+% the \DescribeEnv{task}|task| environment. This takes a keyval argument with the keys
+% |id| for identification, |title| for a title, and the workphase keys |wphases|,
+% |start|, |end|, and |force| (see Section~\ref{sec:user:workphase}). For planning
+% involvement we can specify the overall person months via the |PM| key, the task lead via
+% |lead|, and the partners involved via the |partners| key. Finally task dependencies can
+% be specified via the |requires| key.
+%
+% Tasks can be referenced by the \DescribeMacro{\taskref}|\taskref| macro that takes two
+% arguments: the work package identifier and the task identifier. As for work packages and
+% work areas, there is a long reference variant with work package title:
+% \DescribeMacro{\tasktref}|\tasktref|. Finally,
+% \DescribeMacro{\localtaskref}|\localtaskref| references a task in the local work package
+% by the identifier in its argument.
+%
+% \subsection{Work Phase Metadata}\label{sec:user:workphase}
+%
+% The |task| and |workpackage| allow the \DescribeMacro{wphases}|wphases| key to specify
+% the a list of work phases. The value of this key is comma-separated list of work phase
+% specifications of the form \meta{start}|-|\meta{end} or
+% \meta{start}|-|\meta{end}|!|\meta{force}, where \meta{start} and \meta{end} delimit the
+% run time of the work phase and the optional |!|\meta{force} specifies the work force,
+% i.e. the intensity of work as a number between 0 and 1. If no force is given, the
+% default is 1. The main reason for specifying this metadata for tasks is to generate a
+% Gantt chart (see Section~\ref{sec:user:gantt}).
+%
+% \subsection{Gantt Charts}\label{sec:user:gantt}
+%
+% Gantt charts are used in proposals to show the distribution of activities in work
+% packages over time. A gantt chart is represented by the \DescribeEnv{gantt}|gantt|
+% environment that takes a on optional keyval argument. The keys
+% \DescribeMacro{xscale}|xscale| and \DescribeMacro{yscale}|yscale| are used to specify a
+% scale factors for the chart so that it fits on the page. The \DescribeMacro{step}|step|
+% key allows to specify the steps (in months) of the vertical auxiliary lines. Finally,
+% the \DescribeMacro{draft}|draft| key specifies that plausibility checks (that can be
+% expensive to run) are carried out. Note that the value does not have to be given, so
+% |\begin{gantt}{draft,yscale=.5,step=3}| is a perfectly good invocation.
+%
+% Usually, the |gantt| environment is not used however, since it is part of the
+% \DescribeMacro{\ganttchart} macro that takes the same keys. This generates a whole
+% Gantt chart automatically from the work phase specifications in the work packages. As
+% above we have to run {\LaTeX} two times for the work phases to show up.
+%
+% \subsection{Milestones and Deliverables}\label{sec:user:deliverables}
+%
+% Many proposal formats foresee that project progress will be tracked in the form of
+% \emph{milestones} -- points in the project, where a predefined state of affairs is
+% reached -- and \emph{deliverables} -- tangible project outcomes that have to be
+% delivered. Correspondingly, milestones and deliverables have to be specified in the
+% proposal and accounted for in the project reports. To facilitate this the |proposal|
+% class and its instances provide a simple infrastructure for dealing with milestones and
+% deliverables.
+%
+% Milestones are usually given in a special table\footnote{this is the default provided by
+% the base |proposal| class, it can be specialized for proposal class instances by
+% redefining the |@milestones| environment and correspondingly the |\@milestone| macro.},
+% which we markup up with the \DescribeMacro{milestones}|milestones| environment that
+% takes care of initialization and numbering issues. This contains a list of milestone
+% descriptions via the \DescribeMacro{\milestone}|\milestone| macro which is invoked as
+% |\milestone[|\meta{keys}|]{|\meta{title}|}{|\meta{desc}|}|, where \meta{keys} supports
+% the keys |id| for identification |month| for specifying the milestone date (in months of
+% the project duration). Milestones are numbered with labels whose shape can be customized
+% by redefining \DescribeMacro{\milestone@label}|\milestone@label| and referenced by the
+% \DescribeMacro{\mileref}|\mileref{|\meta{id}|}| and
+% \DescribeMacro{\miletref}|\miletref{|\meta{id}|}| for a reference with milestone
+% title. |\pdatacount{all}{miles}| gives the number of milestones.
+%
+% Deliverables are usually defined as part of the work package descriptions (see
+% Section~\ref{sec:user:wpwa}) and listed in an overview table in a separate of the
+% proposal. As for the milestones, we use an environment
+% \DescribeMacro{wpdelivs}|wpdelivs| that contains the deliverable descriptions. These are
+% marked up via the \DescribeMacro{wpdeliv} environment which takes an optional keyval
+% argument for the deliverable metadata a regular argument for the title and contains the
+% description of the deliverable as the body. For the metadata we have the keys |id| for
+% the deliverable identifier, |due| for the target date (a number that denotes the project
+% month), |nature| and |dissem| for specifying the deliverable nature and dissemination
+% status (usually as short strings prescribed by the proposal template), and |miles| for
+% the milestone this deliverable is targeted for (specified by the milestone
+% identifier). For repeating deliverables (e.g. project reports), both |due| and |miles|
+% can contain comma-separated lists. Deliverables are numbered by labels whose shape can
+% be customized by number, where the shape of the label can be specified by redefining
+% \DescribeMacro{\deliv@label}|\deliv@label| and referenced by
+% \DescribeMacro{\delivref}|\delivref{|\meta{wp}|}{|\meta{id}|}| where \meta{wp} is the
+% work package identifier and \meta{id} that if the deliverable and
+% \DescribeMacro{\delivtref}|\delivtref{|\meta{wp}|}{|\meta{id}|}| for a reference with
+% title. \DescribeMacro{\localdelivref}|\localdelivref| can be used to reference
+% deliverables in the same work package. |\pdatacount{|\meta{wp}|}{delivs}| gives the
+% number of milestones of the work package \meta{wp} |\pdatacount{all}{delivs}| that of
+% all deliverables (aggregating over all work packages).
+%
+% Some proposal templates ask for an overview table of the deliverables which aggregates
+% the deliverables of the respective work packages and areas ordered by due date. This can
+% be generated with the \DescribeMacro{\inputdelivs}|\inputdelivs| macro. This works index
+% generation in {\LaTeX}. The |wpdeliv| environment writes the deliverable data to a file
+% \meta{main}|.delivs|, which can be processed externally (usually just sorting with
+% |sort| in Unix is sufficient) into \meta{main}|.deliverables|, which is then input via
+% the |\inputdelivs| macro.
+%
+% In some proposals, also work areas can have deliverables, then the above hold
+% analogously for \DescribeMacro{wadelivs}|wpdelivs| and \DescribeMacro{wadeliv}|wadeliv|
+% environments.
+%
+% Note that handling deliverables adds considerable overhead to proposal formatting and
+% adds auxiliary files, so they are only activated if the |deliverables| option is given
+% (see Section~\ref{sec:user:options}).
+%
+% \subsection{Referencing and Hyperlinking}\label{sec:user:hyperlinking}
+%
+% The |proposal| package extends the hyperlinking provided by the |hyperref| package it
+% includes to work packages, work groups, \ldots. Whenever these are defined using the
+% |proposal| infrastructure, the class saves the relevant information in the auxiliary
+% file \meta{proposal}|.aux|. This information can be referenced via the
+% \DescribeMacro {\pdataref}|\pdataref| macro, which takes three arguments.
+%
+% In a reference |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{aspect}|}| the first argument
+% \meta{type} specifies the type of the object (currently one of |wp|, |wa|, and
+% |partner|) to be referenced, \meta{id} specifies the identifier of the referenced object
+% (it matches the identifier given in the |id| key of the object), and \meta{aspect}
+% specifies the aspect of the saved information that is referenced.
+%
+% \DescribeMacro{\pdatarefFB}|\pdatarefFB{|\meta{type}|}{|\meta{id}|}{|\meta{a1}|}{|\meta{a2}|}|
+% tries first |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{a1}|}| and if that is not
+% given |\pdataref{|\meta{type}|}{|\meta{id}|}{|\meta{a2}|}|.
+%
+% For a work package \meta{aspect} can be |number|, (the work package number), |label|
+% (the label {\bf{WP$n$}} where $n$ is the work package number for referencing), |title|
+% (the work package title), |lead| the work package leader, |short| (a short version of
+% the WP title for tables). For work groups we have the same aspects with analogous
+% meanings. In all cases, the referenced information carries a hyperlink to the referenced
+% object.
+%
+% The \DescribeMacro{\pdataRef}|\pdataRef| and \DescribeMacro{\pdataRefFB}|\pdataRefFB|
+% macros are variant of |\pdataref| and |\pdataRef| that also carry a hyperlink (if the
+% |hyperref| package is loaded).
+%
+% The \DescribeMacro{\pdatacount}|\pdatacount| macro gives access to the numbers of
+% certain aspects. For instance, the number of work packages in the proposal can be cited
+% by |\pdatacount{all}{wp}|, similarly for work areas (if they are enabled), and finally,
+% |\pdatacount{|\meta{wa}|}{wp}| gives the number of work packages for a work area
+% \meta{wa}. This is very useful for talking about work plans in a general way. Other
+% objects that can be counted are deliverables (|\pdatacount{all}{deliverables}|) and
+% milestones (|\pdatacount{all}{milestones}|).
+%
+% Note that since the referencable information is written into the project data file
+% \meta{proposal}|.pdata| file, it is available for forward references. However, it will
+% only become available when the project data file is read, so the proposal has to be
+% formatted twice for references to be correct.
+%
+% Finally, the |proposal| package supplies specialized reference macros for work packages
+% and areas. The \DescribeMacro{\WPref}|\WPref| macro takes a work package identifier as
+% an argument and makes a reference: |\WPref{|\meta{id}|}| abbreviates
+% |\pdataRef{wp}{|\meta{id}|}{label}|. The \DescribeMacro{\WPtref}|\WPtref| macro is
+% similar, but also prints out the (short) title: |\WPref{|\meta{id}|}| abbreviates
+% |\pdataRef{wp}{|\meta{id}|}{label}: \pdataRef{wp}{|\meta{id}|}{title}|. Unless the
+% |noworkareas| macro is set, we also have the variants \DescribeMacro{\WAref}|\WAref| and
+% \DescribeMacro{\WAtref}|\WAtref| for work areas.
+%
+% \subsection{Coherence}\label{sec:user:coherence}
+%
+% Many proposals require ways to show coherence between the partners. The |proposal| class
+% offers the macro \DescribeMacro{\coherencematrix}|\coherencematrix| for this which
+% generates a matrix of symbols specifying joint publications, project organization,
+% software/resource development, and supervision of students by the project partners that
+% have been declared by the \DescribeMacro{\jointpub}|\jointpub|,
+% \DescribeMacro{\jointsub}|\jointproj|, \DescribeMacro{\jointorga}|\jointorga|
+% \DescribeMacro{\jointsoft}|\jointsoft|, and \DescribeMacro{\jointsup}|\jointsup| macros
+% before. These macros all take a comma-separated list of site identifiers as an
+% argument. Use for instance |\jointproj{a,b,c}| to specify that the sites with the
+% identifiers |a|, |b| and |c| have a joint
+% project. \DescribeMacro{\coherencetable}|\coherencetable| is a variant which packages
+% the coherence table in a table figure with label |tab:collaboration|.
+%
+% The symbols used an be configured by redefining \DescribeMacro{\jpub}|\jpub|,
+% \DescribeMacro{\jproj}|\jproj|, and \DescribeMacro{\jorga}|\jorga|,
+% \DescribeMacro{\jsoft}|\jsoft|, and \DescribeMacro{\jsup}|\jsup|.
+%
+% \subsection{Localization}\label{sec:use:localization}
+%
+% The |proposal| class offers some basic support for localization. This is still partial
+% though, and I am not sure that this is the best way of setting things up. What I do is
+% to define macros for all generated texts that can be redefined in the proposal classes
+% that build in |proposal|. For instance the |dfgproposal| class~\cite{Kohlhase:pdrp:ctan}
+% provides an option |german| for german-language proposals and project reports that
+% triggers a redefinition of all of these macros at read time.
+%
+% \section{Limitations and Enhancements}\label{sec:limitations}
+%
+% The |proposal| is relatively early in its development, and many enhancements are
+% conceivable. We will list them here.
+% \begin{enumerate}
+% \item macros cannot be used in work package and work area titles. They really mess up our
+% |\wpfig| automation. The problem is that they are evaluated too early, and our trick
+% with making them undefined while collecting the parts of the table-rows only works if
+% we know which macros we may expect. We might specify all ``allowable'' macros in an
+% optional key |protectmacro|, which is defined via\vspace*{-.7em}
+% \begin{verbatim}
+% \define@key{wpfig}{protectmacro}{\epandafter\let\csname #1\endcsname=\relax}
+% \end{verbatim}
+% \vspace*{-2em} But I am not sure that this will work.
+% \item It would be great, if in the Gantt Charts, we could include some plausibility
+% checks (for draft = not |submit| mode). I can see two at the moment:
+% \begin{itemize}
+% \item calculating the effort (i.e. the weight of the black area) and visualizing
+% it. Then we could check whether that is larger than the effort declared for the work
+% package.
+% \item calculating (and visualizing) the monthly effort. That should be kind of even
+% (or it has to be explained in the positions requested).
+% \end{itemize}
+% \item we currently do not have a way to relate |PI|s to |site|s, but we do not really
+% need to.
+% \end{enumerate}
+% If you have other enhancements to propose or feel you can alleviate some limitation,
+% please feel free to contact the author.
+%
+% \section*{Acknowledgements}
+%
+% The author is indebted to Jake Hartenstein, Christoph Lange, Florian Rabe, Lutz
+% Schr\"oder, and Tsanko Tsankov for error reports, feature suggestions, and code
+% snippets.
+%
+% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage
+%
+% \section{The Implementation}\label{sec:implementation}
+%
+% In this section we describe the implementation of the functionality of the |proposal| package.
+%
+% \subsection{Package Options and Format Initialization}\label{sec:impl:options}
+%
+% We first set up the options for the package.
+%
+% \begin{macrocode}
+%<*cls|reporting>
+\newif\if@wpsubsection\@wpsubsectionfalse
+\newif\ifsubmit\submitfalse
+\newif\ifgrantagreement\grantagreementfalse
+\newif\ifpublic\publicfalse
+\newif\ifkeys\keysfalse
+\newif\ifdelivs\delivsfalse
+\newif\ifwork@areas\work@areastrue
+\newif\if@RAM\@RAMfalse
+\newif\if@svninfo\@svninfofalse
+\newif\if@gitinfo\@gitinfofalse
+\def\proposal@class{article}
+\DeclareOption{wpsubsection}{\@wpsubsectiontrue}
+\DeclareOption{submit}{\submittrue}
+\DeclareOption{grantagreement}{\grantagreementtrue}
+\DeclareOption{gitinfo}{\@gitinfotrue}
+\DeclareOption{svninfo}{\@svninfotrue}
+\DeclareOption{public}{\publictrue}
+\DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}}
+\DeclareOption{RAM}{\@RAMtrue}
+\DeclareOption{report}{\def\proposal@class{report}}
+\DeclareOption{keys}{\keystrue}
+\DeclareOption{deliverables}{\delivstrue}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions
+% \end{macrocode}
+%
+% Then we load the packages we make use of
+%
+% \begin{macrocode}
+\LoadClass[a4paper,twoside]{\proposal@class}
+\RequirePackage{amssymb}
+\RequirePackage{wasysym}
+\RequirePackage{url}
+\RequirePackage{graphicx}
+\RequirePackage{colortbl}
+\RequirePackage{xcolor}
+\RequirePackage{rotating}
+\RequirePackage{fancyhdr}
+\RequirePackage{array}
+\RequirePackage{xspace}
+\RequirePackage{comment}
+\AtBeginDocument{\ifpublic\excludecomment{private}\fi}
+\RequirePackage{tikz}
+\RequirePackage{paralist}
+\RequirePackage[a4paper,margin=18mm]{geometry}
+\RequirePackage{boxedminipage}
+% so that ednotes in wps do not run out of symbols
+\renewcommand{\thempfootnote}{\roman{mpfootnote}}
+\renewcommand{\familydefault}{\sfdefault}
+\RequirePackage[scaled=.90]{helvet}
+\RequirePackage{textcomp}
+\RequirePackage[hyperref=auto,style=alphabetic,defernumbers=true,backend=bibtex,backref=true,firstinits=true,maxbibnames=6]{biblatex}[2010/11-19]
+\RequirePackage{csquotes}
+\RequirePackage{mdframed}
+\RequirePackage{pdata}
+% \end{macrocode}
+% in submit mode, we make the links a bit darker, so they print better.
+% \begin{macrocode}
+\definecolor{darkblue}{rgb}{0,0,.7}
+\ifsubmit\def\prop@link@color{darkblue}\else\def\prop@link@color{blue}\fi
+\RequirePackage[bookmarks=true,linkcolor=\prop@link@color,
+ citecolor=\prop@link@color,urlcolor=\prop@link@color,colorlinks=true,
+ breaklinks=true, bookmarksopen=true]{hyperref}
+% \end{macrocode}
+%
+% the |ed| package~\cite{Kohlhase:ed:ctan} is very useful for collaborative writing and
+% passing messages between collaborators or simply reminding yourself of editing tasks, so
+% we preload it in the class. However, we only want to show the information in draft
+% mode. Furthermore, we adapt the options for the |svninfo| and |gitinfo2| packages.
+%
+% \begin{macrocode}
+\ifsubmit
+\RequirePackage[hide]{ed}
+\if@svninfo\RequirePackage[final,today]{svninfo}\fi
+\else
+\RequirePackage[show]{ed}
+\if@svninfo\RequirePackage[eso-foot,today]{svninfo}\fi
+\if@gitinfo\RequirePackage[mark]{gitinfo2}\fi
+\fi
+\renewcommand\ednoteshape{\sl\footnotesize}
+% \end{macrocode}
+%
+% \begin{environment}{private}
+% We configure the |comment| package, so that it provides the |private| environment
+% depending on the status of the |public| option.
+% \begin{macrocode}
+\ifpublic\excludecomment{private}\else\includecomment{private}\fi
+% \end{macrocode}
+% \end{environment}
+%
+% And we set up the appearance of the proposal. We want numbered subsubsections.
+% \begin{macrocode}
+\setcounter{secnumdepth}{3}
+% \end{macrocode}
+% We specify the page headings.
+% \begin{macrocode}
+\newif\ifofpage\ofpagefalse
+\ifgrantagreement
+\fancyhead{}
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0.4pt}
+\else
+\fancyhead[RE,LO]{\prop@gen@acronym}
+\fancyhfoffset{0pt}
+\fi
+\fancyfoot[C]{}
+\newcommand\prop@of@pages[2]{page~#1\ifofpage~of~#2\fi}
+\ifgrantagreement
+\fancyfoot[L]{\prop@gen@proposalnumber\quad \prop@gen@acronym\quad --\quad Part B}
+\fancyfoot[R]{\thepage}
+\else
+\fancyhead[LE,RO]{\prop@of@pages\thepage{\pdataref@num{prop}{page}{last}}}
+\fi
+\pagestyle{fancyplain}
+%</cls|reporting>
+% \end{macrocode}
+%
+% \subsection{Proposal Metadata}\label{sec:impl:metadata}
+%
+% Most of the metadata functionality is encapsulated into the \DescribeMacro{pdata}|pdata|
+% package, which is shared by the proposal and report classes. |pdata.sty| first loads the
+% |workaddress| package from sTeX and supplies the Euro symbol.
+% \begin{macrocode}
+%<*pdata>
+\RequirePackage{workaddress}[2011/05/03]
+\RequirePackage{eurosym}
+% \end{macrocode}
+% We define the keys for metadata declarations in the |proposal| environment, they park
+% their argument in an internal macro for use in the title page. The |site| key is the
+% most complicated, so we take care of it first: We need a switch |\if@sites| that is set
+% to true when the |site| key is used. Furthermore |site=|\meta{site} makes new keys
+% \meta{site}|RM| and \meta{site}|RAM| (if the |RAM| option was set) for the
+% |workpackage| environment and records the sites in the |\prop@gen@sites| token register.
+% \begin{macrocode}
+\newif\if@sites\@sitesfalse\let\prop@gen@sites=\relax%
+\newcounter{@site}%
+\define@key{prop@gen}{site}{\@sitestrue\@dmp{site=#1}%
+\stepcounter{@site}\pdata@def{site}{#1}{number}{\the@site}%
+\@ifundefined{prop@gen@sites}{\xdef\prop@gen@sites{#1}}{\xdef\prop@gen@sites{\prop@gen@sites,#1}}%
+\define@key{prop@gen}{#1RM}{\pdata@def{site}{#1}{intendedRM}{##1}}%
+\define@key{prop@gen}{#1RAM}{\pdata@def{site}{#1}{intendedRAM}{##1}}
+\define@key{workpackage}{#1RM}{\pdata@def\wp@id{#1}{RM}{##1}}%
+\define@key{workpackage}{#1RAM}{\pdata@def\wp@id{#1}{RAM}{##1}}
+\define@key{prop@gen}{#1employed}{{\let\tabularnewline\relax\let\hline\relax\let\wa@ref\relax%
+\@ifundefined{prop@gen@employed@lines}%
+{\xdef\prop@gen@employed@lines{\wa@ref{institution}{#1}{shortname} & ##1\tabularnewline\hline}}%
+{\xdef\prop@gen@employed@lines{\prop@gen@employed@lines \wa@ref{institution}{#1}{shortname} & ##1\tabularnewline\hline}}}}}
+% \end{macrocode}
+% If there are no sites, then we have to define keys |RM| and |RAM| that store the
+% intended research (assistant months). Unfortunately, we cannot just include this in the
+% |\if@sites| conditional here, since that is only set at runtime.
+% \begin{macrocode}
+\define@key{prop@gen}{RM}{\@dmp{RM=#1}\if@sites%
+\PackageWarning{Do not use the RM key in the presence of sites}\else%
+\pdata@def{all}{intended}{RM}{#1}\fi}
+\define@key{prop@gen}{RAM}{\@dmp{RAM=#1}\if@sites%
+\PackageWarning{Do not use the RAM key in the presence of sites}\else%
+\pdata@def{all}{intended}{RAM}{#1}\fi}
+% \end{macrocode}
+% similarly, the |PI| keys are registered in |\prop@gen@PIs|.
+% \begin{macrocode}
+\define@key{prop@gen}{PI}{\@dmp{PI=#1}%
+\@ifundefined{prop@gen@PIs}{\xdef\prop@gen@PIs{#1}}{\xdef\prop@gen@PIs{\prop@gen@PIs,#1}}}
+% \end{macrocode}
+% and the |pubspage| keys in |\prop@gen@pubspages|.
+% \begin{macrocode}
+\define@key{prop@gen}{pubspage}{\@ifundefined{prop@gen@pubspages}%
+{\xdef\prop@gen@pubspages{#1}}{\xdef\prop@gen@pubspages{\prop@gen@pubspages,#1}}}
+% \end{macrocode}
+% the |importfrom| key reads the proposal data from its argument.
+% \begin{macrocode}
+\define@key{prop@gen}{importfrom}{\message{importing proposal data from #1.pdata}\readpdata{#1}}
+% \end{macrocode}
+% The rest of the keys just store their value.
+% \begin{macrocode}
+\define@key{prop@gen}{instrument}{\def\prop@gen@instrument{#1}%
+\pdata@def{prop}{gen}{instrument}{#1}\@dmp{inst=#1}}
+\define@key{prop@gen}{title}{\def\prop@gen@title{#1}%
+\pdata@def{prop}{gen}{title}{#1}}
+\define@key{prop@gen}{acronym}{\gdef\prop@gen@acronym{#1}%
+\pdata@def{prop}{gen}{acronym}{#1}\@dmp{acro=#1}}
+\define@key{prop@gen}{acrolong}{\def\prop@gen@acrolong{#1}%
+\pdata@def{prop}{gen}{acrolong}{#1}}
+\define@key{prop@gen}{proposalnumber}{\def\prop@gen@proposalnumber{#1}%
+\pdata@def{prop}{gen}{proposalnumber}{#1}}
+\define@key{prop@gen}{discipline}{\def\prop@gen@discipline{#1}%
+\pdata@def{prop}{gen}{discipline}{#1}}
+\define@key{prop@gen}{areas}{\def\prop@gen@areas{#1}%
+\pdata@def{prop}{gen}{areas}{#1}}
+\define@key{prop@gen}{start}{\def\prop@gen@start{#1}%
+\pdata@def{prop}{gen}{start}{#1}}
+\define@key{prop@gen}{months}{\def\prop@gen@months{#1}%
+\pdata@def{prop}{gen}{months}{#1}}
+\define@key{prop@gen}{since}{\def\prop@gen@since{#1}%
+\pdata@def{prop}{gen}{since}{#1}}
+\define@key{prop@gen}{totalduration}{\def\prop@gen@totalduration{#1}%
+\pdata@def{prop}{gen}{totalduration}{#1}}
+\define@key{prop@gen}{fundsuntil}{\def\prop@gen@fundsuntil{#1}%
+\pdata@def{prop}{gen}{fundsuntil}{#1}}
+\define@key{prop@gen}{topdownPM}[true]{\def\prop@gen@topdownPM{#1}}
+\define@key{prop@gen}{botupPM}[true]{\def\prop@gen@botupPM{#1}}
+\define@key{prop@gen}{keywords}{\def\prop@gen@keywords{#1}}
+% \end{macrocode}
+% and the default values, these will be used, if the author does not specify something
+% better.
+%
+% \begin{macrocode}
+\newcommand\prop@gen@acro@default{ACRONYM}
+\def\prop@gen@acro{\prop@gen@acro@default}
+\newcommand\prop@gen@months@default{???months???}
+\def\prop@gen@months{\prop@gen@months@default}
+\newcommand\prop@gen@title@default{???Proposal Title???}
+\def\prop@gen@title{\prop@gen@title@default}
+\newcommand\prop@gen@instrument@default{??? Instrument ???}
+\def\prop@gen@instrument{\prop@gen@instrument@default}
+% \end{macrocode}
+%
+% \begin{macro}{\prop@tl}
+% An auxiliary macro that is handy for making tables of WorkAddress data.
+% \begin{macrocode}
+\newcommand\prop@tl[2]{\xdef\tab@line{}
+\@for\tl@ext:={#1}\do{\xdef\tab@line{\tab@line&#2}}
+\tab@line}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Proposal Appearance}\label{sec:impl:appearance}
+%
+% We define the keys for the proposal appearance
+% \begin{macrocode}
+\def\prop@gen@compactht{false}
+\define@key{prop@gen}{compactht}[true]{\def\prop@gen@compactht{#1}}
+%</pdata>
+% \end{macrocode}
+%
+% \begin{environment}{emphbox}
+% \begin{macrocode}
+%<*cls>
+\newmdenv[settings=\large]{emphbox}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Title Page}\label{sec:impl:titlepage}
+%
+% \begin{environment}{prop@proposal}
+% This internal environment is called in the |proposal| environment from the |proposal|
+% class. The implementation here is only a stub to be substituted in a specialized
+% class.
+% \begin{macrocode}
+\newenvironment{prop@proposal}
+{\thispagestyle{empty}%
+\begin{center}
+ {\LARGE \prop@gen@instrument}\\[.2cm]
+ {\LARGE\textbf{\prop@gen@title}}\\[.3cm]
+ {\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
+ {\large\today}\\[1em]
+ \begin{tabular}{c*{\the@PIs}{c}}
+ \prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{name}}\\
+ \prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{name}}
+ \end{tabular}\\[2cm]
+\end{center}
+\setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
+% \end{macrocode}
+% Now we come to the end of the environment:
+% \begin{macrocode}
+{\section{List of Attachments}
+\begin{itemize}
+\@for\@I:=\prop@gen@PIs\do{%
+\item Curriculum Vitae and list of publications for
+ \wa@ref{person}\@I{personaltitle} \wa@ref{person}\@I{name}}
+\end{itemize}\newpage
+\printbibliography[heading=warnpubs]}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{proposal}
+% The |proposal| environment reads the metadata keys defined above, and if there were no
+% |site| keys, then it defines keys |RM| and |RAM| (unless the |noRAM| package option
+% was given) for the |workpackage| environment. Also it reads the project data file and
+% opens up the project data file |\pdata@out|, which it also closes at the end.
+%
+% The environment calls an internal version of the environment |prop@proposal| that can
+% be customized by the specializing classes.
+% \begin{macrocode}
+\newenvironment{proposal}[1][]{\readpdata\jobname
+\ofpagetrue\setkeys{prop@gen}{#1}
+\pdata@open\jobname
+\if@sites\else
+\define@key{workpackage}{RM}{\pdata@def{wp}\wp@id{RM}{##1}\@dmp{RM=##1}}
+\define@key{workpackage}{RAM}{\pdata@def{wp}\wp@id{RAM}{##1}\@dmp{RAM=##1}}
+\fi
+\newcounter{@PIs}
+\@ifundefined{prop@gen@PIs}{}{\@for\@I:=\prop@gen@PIs\do{\stepcounter{@PIs}}}
+\newcounter{@sites}
+\@ifundefined{prop@gen@sites}{}{\@for\@I:=\prop@gen@sites\do{\stepcounter{@sites}}}
+\setcounter{page}{0}
+\begin{prop@proposal}}
+% \end{macrocode}
+% Now we come to the end of the environment, we take care of the last page and print the
+% references.
+% \begin{macrocode}
+{\end{prop@proposal}
+\pdata@def{prop}{page}{last}{\thepage}\ofpagefalse
+\pdata@close}
+%</cls>
+% \end{macrocode}
+% \end{environment}
+%
+% The |report| environment is similar, but somewhat simpler
+%
+% \begin{environment}{report}
+% \begin{macrocode}
+%<*reporting>
+\newif\if@report\@reportfalse
+\newenvironment{report}[1][]%
+{\@reporttrue\readpdata\jobname%
+\ofpagetrue\setkeys{prop@gen}{#1}%
+\pdata@open\jobname%
+\@ifundefined{prop@gen@PIs}{}{\newcounter{@PIs}\@for\@I:=\prop@gen@PIs\do{\stepcounter{@PIs}}}%
+\@ifundefined{prop@gen@sites}{}{\newcounter{@sites}\@for\@I:=\prop@gen@sites\do{\stepcounter{@sites}}}%
+\setcounter{page}{0}%
+\begin{prop@report}}
+{\end{prop@report}%
+\pdata@def{prop}{page}{last}{\thepage}\ofpagefalse\newpage
+\printbibliography[heading=warnpubs]
+\pdata@close}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{prop@report}
+% \begin{macrocode}
+\newenvironment{prop@report}
+{\begin{center}
+ {\LARGE Final Project Report}\\[.2cm]
+ {\LARGE\textbf{\prop@gen@title}}\\[.3cm]
+ {\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
+ {\large\today}\\[1em]
+ \begin{tabular}{c*{\the@PIs}{c}}
+ \prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{name}}\\
+ \prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{name}}
+ \end{tabular}\\[2cm]
+\end{center}
+\setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
+{}
+%</reporting>
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\site*}
+% \begin{macrocode}
+%<*cls>
+\newcommand\site[1]{\hyperlink{site@#1@target}{\wa@ref{institution}{#1}{acronym}}}
+\newcommand\sitename[1]{\hyperlink{site@#1@target}{\wa@ref{institution}{#1}{name}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Objectives}\label{sec:impl:objectives}
+%
+% We first define a presentation macro for objectives
+% \begin{macro}{\objective@label}
+% \begin{macrocode}
+\newcommand\objective@label[1]{O#1}
+% \end{macrocode}
+% \end{macro}
+% We define the keys for the objectives environment
+% \begin{macrocode}
+\define@key{obj}{id}{\def\obj@id{#1}\@dmp{id=#1}}
+\define@key{obj}{title}{\def\obj@title{#1}\@dmp{title=#1}}
+\define@key{obj}{short}{\def\obj@short{#1}\@dmp{short=#1}}
+% \end{macrocode}
+% And a counter for numbering objectives
+% \begin{macrocode}
+\newcounter{objective}
+% \end{macrocode}
+% \begin{environment}{objective}
+% \begin{macrocode}
+\newenvironment{objective}[1][]
+{\let\obj@id\relax\let\obj@title\relax\let\obj@short\relax%
+\setkeys{obj}{#1}\stepcounter{objective}%
+\goodbreak\smallskip\par\noindent%
+\textbf{\objective@label{\arabic{objective}}:%
+~\pdata@target{obj}{\obj@id}{\pdataref{obj}{\obj@id}{title}}\ignorespaces}%
+\pdata@def{obj}\obj@id{label}{\objective@label\theobjective}%
+\@ifundefined{obj@title}{}{\pdata@def{obj}\obj@id{title}\obj@title}%
+\@ifundefined{obj@short}{}{\pdata@def{obj}\obj@id{short}\obj@short}}
+{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\OBJref}
+% \begin{macrocode}
+\newcommand\OBJref[1]{\pdataRef{obj}{#1}{label}}
+\newcommand\OBJtref[1]{\OBJref{#1}: \pdataRefFB{obj}{#1}{short}{title}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Work Packages and Work Groups}\label{sec:impl:wpwa}
+%
+% We first define keys for work groups (if we are in an IP).
+% \begin{macrocode}
+\ifwork@areas
+\define@key{workarea}{id}{\def\wa@id{#1}\@dmp{id=#1}}
+\define@key{workarea}{title}{\pdata@def{wa}\wa@id{title}{#1}}
+\define@key{workarea}{short}{\pdata@def{wa}\wa@id{short}{#1}}
+\define@key{workarea}{lead}{\pdata@def{wa}\wa@id{lead}{#1}}
+\fi
+% \end{macrocode}
+% work packages have similar ones.
+% \begin{macrocode}
+\define@key{workpackage}{id}{\def\wp@id{#1}\@dmp{id=#1}}
+\define@key{workpackage}{title}{\pdata@def{wp}\wp@id{title}{#1}}
+\define@key{workpackage}{short}{\pdata@def{wp}\wp@id{short}{#1}}
+\define@key{workpackage}{lead}{\pdata@def{wp}\wp@id{lead}{#1}\def\wp@lead{#1}\@dmp{lead=#1}}
+\define@key{workpackage}{type}{\def\wp@type{#1}\pdata@def{wp}\wp@id{type}{#1}}
+\define@key{workpackage}{wphases}{\def\wp@wphases{#1}\pdata@def{wp}\wp@id{wphases}{#1}}
+\define@key{workpackage}{swsites}[true]{\def\wp@swsites{#1}}
+% \end{macrocode}
+% We define the constructors for the work package and work group labels and titles.
+% \begin{macrocode}
+\newcommand\wp@mk@title[1]{Work Package {#1}}
+\newcommand\wp@label[1]{WP{#1}}
+\ifwork@areas
+\newcommand\wa@label[1]{WA{#1}}
+\newcommand\wa@mk@title[1]{Work Area {#1}}
+\fi
+% \end{macrocode}
+% The |wa| and |wp| counters are for the work packages and work groups, the counter
+% |deliv| for deliverables.
+% \begin{macrocode}
+\ifwork@areas\newcounter{wa}\newcounter{wp}[wa]\else\newcounter{wp}\fi
+\ifdelivs\newcounter{deliv}[wp]\fi
+\newcounter{allwp}
+% \end{macrocode}
+%
+% \begin{macro}{\update@*}
+% update the list |\@wps| of the work packages in the local group and the list |\@was|
+% work groups for the staff efforts table: if |\@wps| is undefined, then initialize the
+% comma-separated list, otherwise extend it.\ednote{with the current architecture, we
+% cannot have work areas that do not contain work packages, this leads to the error that
+% |\@wps| is undefined in |end{workplan}|}
+% \begin{macrocode}
+\newcommand\update@wps[1]{\@ifundefined{@wps}{\xdef\@wps{#1}}{\xdef\@wps{\@wps,#1}}}
+\newcommand\update@tasks[1]{\@ifundefined{@tasks}{\xdef\@tasks{#1}}{\xdef\@tasks{\@tasks,#1}}}
+\newcommand\update@deps[1]{\@ifundefined{task@deps}{\xdef\task@deps{#1}}{\xdef\task@deps{\task@deps,#1}}}
+\ifwork@areas\def\update@was#1{\@ifundefined{@was}{\xdef\@was{#1}}{\xdef\@was{\@was,#1}}}\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\decode@wphase}
+% |\decode@wphase| decodes a string of the form \meta{start}|-|\meta{end}|!|\meta{force}
+% and defines the macros |\wphase@start|, |\wphase@end|, and |\wphase@force| with the
+% three parts and also computes |\wphase@len|. The intermediate parsing macro
+% |\decode@p@start| parses out the start (a number), and passes on to |\decode@p@end|,
+% which parses out the end (another number) and the force string, which is either empty
+% (if the |!|\meta{force} part is omitted) or of the form |!|\meta{force}. In the first
+% case the default value 1 is returned for |\decode@force| in the second \meta{force}.
+% \begin{macrocode}
+\newcommand\decode@wphase[1]{\expandafter\decode@p@start#1@%
+\local@count\wphase@end\advance\local@count by -\wphase@start%
+\def\wphase@len{\the\local@count}}
+\def\decode@p@start#1-#2@{\def\wphase@start{#1}\decode@p@end#2!@}
+\def\decode@p@end#1!#2@{\def\wphase@end{#1}\def\@test{#2}%
+\ifx\@test\@empty\def\wphase@force{1}\else\decode@p@force#2\fi}
+\def\decode@p@force#1!{\def\wphase@force{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\startend@wphases}
+% We first iteratively decode the work phases, so that the last definition of
+% |\wphase@end| remains, then we parse out the start of the first workphase to define
+% |\wphase@start|
+% \begin{macrocode}
+\def\wphases@start#1-#2@{\def\wphase@start{#1}}
+\newcommand\startend@wphases[1]{\def\@test{#1}
+\ifx\@test\@empty\def\wphase@start{0}\def\wphase@end{0}\else%
+\@for\@I:=#1\do{\expandafter\decode@p@start\@I @}
+\expandafter\wphases@start#1@\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% with these it is now relatively simple to define the interface macros.
+%
+% \begin{environment}{work@package}
+% The |workpackage| environment collects the keywords, steps the counters, writes the metadata
+% to the aux file, updates the work packages in the local group, generates the work
+% package number |\wp@num|.
+% \begin{macrocode}
+\newcounter{wp@RM}
+\if@RAM\newcounter{wp@RAM}\fi
+\newenvironment{work@package}[1][]%
+{\def\wp@wphases{0-0}% default values
+\def\wp@swsites{false}
+\setkeys{workpackage}{#1}\stepcounter{wp}\stepcounter{allwp}%
+\startend@wphases\wp@wphases%
+\pdata@def{wp}\wp@id{start}\wphase@start\pdata@def{wp}\wp@id{end}\wphase@end%
+\@ifundefined{wp@type}{}{\pdata@def{wp}\wp@id{type}\wp@type}%
+\let\@tasks=\relax%
+\edef\wp@num{\ifwork@areas\thewa.\fi\thewp}%
+\pdata@def{wp}\wp@id{label}{\wp@label\wp@num}%
+\pdata@def{wp}\wp@id{number}{\thewp}%
+\pdata@def{wp}\wp@id{page}{\thepage}%
+\update@wps\wp@id%
+\edef\wp@num{\ifwork@areas\thewa.\fi\thewp}%
+\pdata@def{wp}{\wp@id}{num}{\thewp}%
+% \end{macrocode}
+% If we have sites, we have to compute the total RM and RAM for this WP.
+% \begin{macrocode}
+\if@sites%
+\setcounter{wp@RM}{0}\if@RAM\setcounter{wp@RAM}{0}\fi%
+\@for\@site:=\prop@gen@sites\do{%
+\edef\@RM{\pdataref@num\wp@id\@site{RM}}\addtocounter{wp@RM}{\@RM}%
+\if@RAM\edef\@RAM{\pdataref@num\wp@id\@site{RAM}}\addtocounter{wp@RAM}{\@RAM}\fi}
+\pdata@def{wp}\wp@id{RM}{\thewp@RM}%
+\if@RAM\pdata@def{wp}\wp@id{RAM}{\thewp@RAM}\fi%
+\fi}% if@sites
+{\@ifundefined{@tasks}{}{\pdata@def{\wp@id}{task}{ids}\@tasks}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{workpackage}
+% With this, it becomes simple to define a work package environment. We consider two
+% cases, if we have sites, then we make a header table. If not, we can make things much
+% simpler: we just generate a subsection
+% \begin{macrocode}
+\newenvironment{workpackage}[1][]%
+{\begin{work@package}[#1]%
+\ifgrantagreement\else
+%\if@wpsubsection\subsubsection*{{\wp@mk@title\thewp}: \pdataref{wp}\wp@id{title}}\fi
+\if@sites\goodbreak\medskip\wpheadertable%
+\else\subsubsection*{{\wptitle} (\wprm)}\fi%
+\addcontentsline{toc}{paragraph}{{\wp@mk@title\thewp}: \pdataref{wp}\wp@id{title}}%
+\noindent\ignorespaces%
+\fi}
+{\end{work@package}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\wptitle}
+% \ednote{document above}
+% \begin{macrocode}
+\newcommand\wptitle{\wp@mk@title{\wp@num}: \pdata@target{wp}{\wp@id}{\pdataref{wp}\wp@id{title}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\wprm}
+% \ednote{document above}
+% \begin{macrocode}
+\newcommand\wprm{\pdataref@safe{wp}\wp@id{RM}\if@RAM\ RM+\pdataref{wp}\wp@id{RAM} RAM\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@site@contributes}
+% Called as |\if@site@contributes{|\meta{site}|}{|\meta{tokens}|}| the following
+% happens: If |\prop@gen@compactht| is |\@true| (set by the |compactht| attribute on the
+% |proposal| environment), then \meta{tokens} is processed. Otherwise, \meta{tokens} is
+% only processed if \meta{site} contributes to the current work package (i.e the |RM|
+% $\ne0$ and |RAM| $\ne0$)
+% \begin{macrocode}
+\newcount\site@contribution%
+\newcommand\if@site@contributes[2]{%
+\ifx\prop@gen@compactht\@true
+\if@RAM\ifnum\pdataref@num\wp@id{#1}{RM} > 0 \ifnum \pdataref@num\wp@id{#1}{RAM} > 0 #2\fi\fi
+\else\ifnum\pdataref@num\wp@id{#1}{RM} > 0 #2\fi\fi
+\else #2\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% The following macro computes the sites line (in the token register
+% \DescribeMacro{\wp@sites@line}|\wp@sites@line|), the efforts line (in
+% \DescribeMacro{\wp@efforts@line}|\wp@efforts@line|), and the sites number (in the
+% counter \DescribeMacro{\wp@sites@num}|\sites@num|) for later inclusion in the
+% |\wpheadertable|. If |\prop@gen@compactht| is |\@true|, then no sites without
+% contributions are listed in the table.
+% \begin{macrocode}
+\newcounter{wp@sites@num}
+\newcommand\wp@sites@efforts@lines{%
+\setcounter{wp@sites@num}{0}
+{\let\G@refundefinedtrue=\relax\let\@latex@warning=\relax\let\@sw\relax%
+\let\site\relax\let\textbf\relax\let\sum@style\relax\let\lead@style\relax%
+\let\pn\relax\let\sys\relax%
+\xdef\wp@sites@line{\wp@legend@site}\xdef\wp@efforts@line{\wp@legend@effort}%initialize lines
+\@for\@site:=\prop@gen@sites\do{\if@site@contributes\@site{\stepcounter{wp@sites@num}}%
+\xdef\wp@sites@line{\wp@sites@line%
+\if@site@contributes\@site{&%
+\ifx\wp@swsites\@true%
+\@sw{\ifx\@site\wp@lead\lead@style{\site{\@site}}\else\site{\@site}\fi}%
+\else\ifx\@site\wp@lead\lead@style{\site{\@site}}\else\site{\@site}\fi%
+\fi}}%
+\xdef\wp@efforts@line{\wp@efforts@line%
+\if@site@contributes\@site{&%
+\ifx\@site\wp@lead%
+\lead@style{\pdataref@safe\wp@id\@site{RM}\if@RAM+\pdataref@safe\wp@id\@site{RAM}\fi}
+\else\pdataref@safe\wp@id\@site{RM}\if@RAM+\pdataref@safe\wp@id\@site{RAM}\fi\fi}}%
+}% do
+\xdef\wp@sites@line{\wp@sites@line&\sum@style{\wp@legend@all}}%
+\xdef\wp@efforts@line{\wp@efforts@line&
+\sum@style{\textbf{\pdataref{wp}\wp@id{RM}\if@RAM+\pdataref{wp}\wp@id{RAM}\fi}}}}}
+% \end{macrocode}
+%
+% \begin{macro}{\wpheadertable}
+% This macro computes the default work package header table, if there are sites.
+% \begin{macrocode}
+\newcommand\wpheadertable{%
+\wp@sites@efforts@lines%
+\par\noindent\begin{tabular}{|l||l|*{\thewp@sites@num}{c|}|c|}\hline%
+\textbf{\wp@mk@title{\wp@num}}&\wp@sites@line\\\hline%
+\textsf{\pdata@target{wp}{\wp@id}{\pdataref{wp}\wp@id{title}}} &\wp@efforts@line\\\hline%
+\end{tabular}\smallskip\par\noindent\ignorespaces}
+% \end{macrocode}
+% and now multilinguality support
+% \begin{macrocode}
+\newcommand\wp@legend@site{Site}
+\newcommand\wp@legend@effort{Effort\if@RAM{ (RM+RAM)}\fi}
+\newcommand\wp@legend@all{\textbf{all}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{workarea}
+% the |workarea| environment for work groups is almost the same, but we also have to
+% initialize the work package counters. Also, the efforts can be computed from the work
+% packages in this group via the |wa@effort| counter
+% \begin{macrocode}
+\newcounter{prop@RM}\if@RAM\newcounter{prop@RAM}\fi
+\ifwork@areas
+\newcounter{wa@RM}\if@RAM\newcounter{wa@RAM}\fi\newcounter{wa@wps}
+\newenvironment{workarea}[1][]
+{\setkeys{workarea}{#1}
+\let\@wps=\relax
+\stepcounter{wa}
+\pdata@def{wa}{\wa@id}{label}{\wa@label\thewa}
+\pdata@def{wa}{\wa@id}{number}{\thewa}
+\pdata@def{wa}{\wa@id}{page}{\thepage}
+\update@was{\wa@id}
+\pdata@def{wa}{\wa@id}{num}{\thewa}
+\setcounter{wa@RM}{0}\if@RAM\setcounter{wa@RAM}{0}\fi\setcounter{wa@wps}{0}
+\edef\@@wps{\pdataref@aux\wa@id{wp}{ids}}
+\@for\@wp:=\@@wps\do{\stepcounter{wa@wps}%
+\if@sites
+\@for\@site:=\prop@gen@sites\do{%
+ \edef\@RM{\pdataref@num\@wp\@site{RM}}
+ \if@RAM\edef\@RAM{\pdataref@num\@wp\@site{RAM}}\fi
+ \addtocounter{wa@RM}{\@RM}\addtocounter{prop@RM}{\@RM}
+ \if@RAM\addtocounter{wa@RAM}{\@RAM}\addtocounter{prop@RAM}{\@RAM}\fi}
+\else
+\edef\@RM{\pdataref@num{wp}\@wp{RM}}
+\if@RAM\edef\@RAM{\pdataref@num{wp}\@wp{RAM}}\fi
+\addtocounter{wa@RM}{\@RM}\addtocounter{prop@RM}{\@RM}
+\if@RAM\addtocounter{wa@RAM}{\@RAM}\addtocounter{prop@RAM}{\@RAM}\fi
+\fi}
+\pdata@def{wa}\wa@id{RM}\thewa@RM
+\pdata@def{prop}{all}{RM}\theprop@RM
+\if@RAM
+\pdata@def{wa}\wa@id{RAM}\thewa@RAM
+\pdata@def{prop}{all}{RAM}\theprop@RAM
+\fi
+\subsubsection*{{\wa@mk@title\thewa}: {\pdata@target{wa}\wa@id{\pdataref{wa}\wa@id{title}}}}
+\addcontentsline{toc}{subsubsection}{{\wa@mk@title\thewa}: \pdataref{wa}\wa@id{title}}%
+\ignorespaces}
+{\@ifundefined{@wps}{}{\pdata@def\wa@id{wp}{ids}\@wps}\pdata@def\wa@id{wp}{count}\thewa@wps}\fi
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{workplan}
+% The |workplan| environment sets up the accumulator macros |\@wps|, |\@was|, for the
+% collecting the identifiers of work packages and work groups. At the end of the
+% workplan description it writes out their content to the aux file for reference.
+% \begin{macrocode}
+\ifdelivs\newwrite\wpg@delivs\fi
+\newenvironment{workplan}%
+{\ifdelivs\immediate\openout\wpg@delivs=\jobname.delivs\fi
+\ifwork@areas\let\@was=\relax\else\let\@wps=\relax\fi}%
+{\@ifundefined{task@deps}{}{\pdata@def{all}{task}{deps}{\task@deps}}
+\pdata@def{all}{task}{count}{\thealltasks}
+\ifwork@areas
+\@ifundefined{@was}{}{\pdata@def{all}{wa}{ids}\@was}
+\else
+\@ifundefined{@wps}{}{\pdata@def{all}{wp}{ids}\@wps}
+\fi
+\ifdelivs\@ifundefined{mile@stones}{}
+{\@for\@I:=\mile@stones\do{%
+\pdata@def{mile}\@I{delivs}{\@ifundefined{\@I delivs}{}{\csname\@I delivs\endcsname}}}}\fi
+\ifwork@areas\pdata@def{all}{wa}{count}{\thewa}\fi
+\pdata@def{all}{wp}{count}{\theallwp}
+\ifdelivs
+\pdata@def{all}{deliverables}{count}{\thedeliverable}
+\pdata@def{all}{milestones}{count}{\themilestone}
+\fi
+\ifdelivs\closeout\wpg@delivs\fi}
+% \end{macrocode}
+% \end{environment}
+%
+%\subsection{Milestones and Deliverables}\label{sec:impl:deliverables}
+%
+% \begin{macro}{deliv@error}
+% this macro raises an error if deliverable commands are used without the |deliverables|
+% option being set.
+% \begin{macrocode}
+\newcommand\deliv@error{\PackageError{proposal}
+{To use use deliverables, you have to specify the option 'deliverables'}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{wpdelivs}
+% \begin{macrocode}
+\newenvironment{wpdelivs}{\begin{wp@delivs}}{\end{wp@delivs}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{wp@delivs}
+% \begin{macrocode}
+\newenvironment{wp@delivs}
+{\ifdelivs\textbf\deliv@legend@delivs:\\[-3ex]%
+\begin{compactdesc}\else\deliv@error\fi}
+{\ifdelivs\end{compactdesc}\fi}
+% \end{macrocode}
+% and now multilinguality support
+% \begin{macrocode}
+\newcommand\deliv@legend@delivs{Deliverables}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\wadelivs}
+% \begin{macrocode}
+\newenvironment{wadelivs}
+{\textbf\deliv@legend@delivs:\\[-3ex]\begin{wp@delivs}}
+{\end{wp@delivs}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\lec}
+% This macro is generally useful to put a comment at the end of the line, possibly
+% making a new one if there is not enough space.
+% \begin{macrocode}
+\newcommand\lec[1]{\strut\hfil\strut\null\nobreak\hfill\hbox{$\leadsto$#1}\par}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\deliv@label}
+% \begin{macrocode}
+\newcommand\deliv@label[1]{D{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\*deliv*ref}
+% This macro is generally useful to put a comment at the end of the line, possibly
+% making a new one if there is not enough space.
+% \begin{macrocode}
+\newcommand\delivref[2]{\pdataRef{deliv}{#1#2}{label}}
+\newcommand\localdelivref[1]{\delivref{\wp@id}{#1}}
+\newcommand\delivtref[2]{\delivref{#1}{#2}: \pdataRefFB{deliv}{#1#2}{short}{title}}
+\newcommand\localdelivtref[1]{\delivtref{\wp@id}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\wpg@deliv}
+% We first define the keys
+% \begin{macrocode}
+\define@key{deliv}{id}{\def\deliv@id{#1}}
+\define@key{deliv}{due}{\def\deliv@due{#1}}
+\define@key{deliv}{dissem}{\def\deliv@dissem{#1}}
+\define@key{deliv}{nature}{\def\deliv@nature{#1}}
+\define@key{deliv}{miles}{\def\deliv@miles{#1}}
+\define@key{deliv}{short}{\def\deliv@short{#1}}
+\define@key{deliv}{lead}{\def\deliv@lead{#1}}
+% \end{macrocode}
+% The |\wpdeliv| macro cycles over the due dates and generates the relevant entries into
+% the deliverables file. The first step is to write the general metadata to the pdata
+% file.
+% \begin{macrocode}
+\newcounter{deliverable}
+\newcommand{\wpg@deliv}[3]{% keys, title, type
+\stepcounter{deliverable}
+\let\deliv@miles=\relax% clean state
+\def\@type{#3}\def\@wp{wp}% set up ifx
+\def\wpg@id{\csname #3@id\endcsname}
+\setkeys{deliv}{#1}\stepcounter{deliv}% set state
+\ifx\@type\@wp\def\current@label{\deliv@label{\ifwork@areas\thewa.\fi\thewp.\thedeliv}}
+\else\def\current@label{\deliv@label{\thewa.\thedeliv}}\fi
+\pdata@def{deliv}{\wpg@id\deliv@id}{label}{\current@label}
+\pdata@def{deliv}{\wpg@id\deliv@id}{title}{#2}
+\pdata@def{deliv}{\wpg@id\deliv@id}{page}{\thepage}%
+\@ifundefined{deliv@short}
+{\pdata@def{deliv}{\wpg@id\deliv@id}{short}{#2}}
+{\pdata@def{deliv}{\wpg@id\deliv@id}{short}{\deliv@short}}
+\@ifundefined{deliv@nature}
+{\protect\G@refundefinedtrue\@latex@warning{key 'nature' for Deliv \wpg@id undefined}}
+{\pdata@def{deliv}{\wpg@id\deliv@id}{nature}{\deliv@nature}}
+\@ifundefined{deliv@dissem}
+{\protect\G@refundefinedtrue\@latex@warning{key 'dissem' for Deliv \wpg@id undefined}}
+{\pdata@def{deliv}{\wpg@id\deliv@id}{dissem}{\deliv@dissem}}
+\@ifundefined{deliv@lead}
+{\protect\G@refundefinedtrue\@latex@warning{key 'lead' for Deliv \wpg@id undefined}}
+{\pdata@def{deliv}{\wpg@id\deliv@id}{lead}{\deliv@lead}}
+% \end{macrocode}
+% Then we iterate over the due dates and generate an entry for teach of them.
+% \begin{macrocode}
+\@ifundefined{deliv@due}{}{%
+\@for\@I:=\deliv@due\do{\protected@write\wpg@delivs{}{\string\deliverable%
+{\ifnum\@I<10 0\@I\else\@I\fi}% sort key
+{\@I}% due date
+{\current@label}% label
+{\@ifundefined{deliv@id}{??}{\wpg@id\deliv@id}}% id
+{\@ifundefined{deliv@dissem}{??}{\deliv@dissem}}% dissemination level
+{\@ifundefined{deliv@nature}{??}{\deliv@nature}}% nature
+{#2}
+{\ifx\@type\@wp{WP\ifwork@areas\thewa.\fi\thewp}\else{WA\thewa}\fi}%WP
+{\@ifundefined{deliv@lead}{??}{\string\site{\deliv@lead}}}}}}% lead
+% \end{macrocode}
+% And finally, we generate the entry into the deliverables table.
+% \begin{macrocode}
+\item[\current@label\ (%
+\delivs@legend@due: \@ifundefined{deliv@due}{??}{\deliv@due},
+\delivs@legend@nature: \@ifundefined{deliv@nature}{??}{\deliv@nature},
+\delivs@legend@dissem: \@ifundefined{deliv@dissem}{??}{\deliv@dissem},
+\delivs@legend@lead: \@ifundefined{deliv@lead}{??}{\site{\deliv@lead}})]
+ \pdata@target{deliv}{\wpg@id\deliv@id}{\textit{#2}}
+\@ifundefined{deliv@miles}{}{% print the milestones and update their deliverables
+\let\m@sep=\relax% do not print the separator the first time round
+\lec{\@for\@I:=\deliv@miles\do{% Iterate over the milestones mentioned
+\m@sep\pdataRef{mile}{\@I}{label}% print the milestone reference
+\let\m@sep=,}}%set the separator for the next times
+\def\d@sep{,}
+ \@for\@I:=\deliv@miles\do{% Iterate over the milestones mentioned
+ \expandafter\ifx\csname\@I delivs\endcsname\relax% Check that the miles@delivs is empty
+ {\expandafter\xdef\csname\@I delivs\endcsname{\wpg@id\deliv@id}}% if so, skip the separator
+ \else\expandafter\xdef\csname\@I delivs\endcsname%if not add it
+ {\csname\@I delivs\endcsname\d@sep\wpg@id\deliv@id}\fi}}}
+% \end{macrocode}
+% \end{macro}
+%
+% Now, we only need to instantiate
+%
+% \begin{environment}{wadeliv}
+% \begin{macrocode}
+\newenvironment{wadeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wa}\else\deliv@error\fi}{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{wpdeliv}
+% \begin{macrocode}
+\newenvironment{wpdeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wp}\else\deliv@error\fi}{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\milestone@label}
+% \begin{macrocode}
+\newcommand\milestone@label[1]{M{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mileref}
+% This macro is generally useful to put a comment at the end of the line, possibly
+% making a new one if there is not enough space.
+% \begin{macrocode}
+\newcommand\mileref[1]{\pdataRef{mile}{#1}{label}}
+\newcommand\miletref[1]{\mileref{#1}: \pdataRefFB{mile}{#1}{short}{title}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\milestone}
+% create a new milestone, initialize its deliverables accumulator macro, set up
+% hyperlinking, and extend the milestones list.
+% \begin{macrocode}
+\newcounter{milestone}
+\define@key{milestone}{id}{\gdef\mile@id{#1}}
+\define@key{milestone}{month}{\gdef\mile@month{#1}}
+\define@key{milestone}{verif}{\gdef\mile@verif{#1}}
+\newcommand\milestone[3][]{%
+\ifdelivs%
+\setkeys{milestone}{#1}\stepcounter{milestone}%
+\pdata@def{mile}\mile@id{label}{\milestone@label{\themilestone}}%
+\pdata@def{mile}\mile@id{month}{\mile@month}%
+\pdata@def{mile}\mile@id{verif}{\mile@verif}%
+\pdata@def{mile}\mile@id{title}{#2}%
+\pdata@def{mile}\mile@id{description}{#3}%
+\@ifundefined{mile@stones}{\xdef\mile@stones{\mile@id}}{\xdef\mile@stones{\mile@stones,\mile@id}}%
+\@milestone{\mile@id}{#2}{#3}% presentation
+\else\deliv@error\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@milestone}
+% the corresponding presentation macro.
+% \begin{macrocode}
+\newcommand\@milestone[3]{% id, title, description
+\item \textbf{\miles@legend@milestone \pdataref{mile}{#1}{label} (\miles@legend@month \pdataref{mile}\mile@id{month})
+\textbf{#2}} #3}
+\newcommand\miles@legend@month{Month}
+\newcommand\miles@legend@milestone{Milestone}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{milestones}
+% This does the metadata bookkeeping, the layout is delegated to the presentation
+% environment |@milestones| and the legend macros that can be customized for specific
+% proposals.
+% \begin{macrocode}
+\newenvironment{milestones}%
+{\ifdelivs\begin{@milestones}\else\deliv@error\fi}
+{\ifdelivs\pdata@def{all}{mile}{ids}{\mile@stones}%
+\pdata@def{all}{mile}{count}{\themilestone}%
+\end{@milestones}\fi}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{@milestones}
+% here we do the work.
+% \begin{macrocode}
+\newenvironment{@milestones}{\begin{enumerate}}{\end{enumerate}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\deliverable}
+% the first argument is an extended due date to facilitate sorting.
+% \begin{macrocode}
+\newcommand{\deliverable}[9]{\pdataRef{deliv}{#4}{label}&#7&#8&#9&#6&#5&#2\\\hline}%sortkey,due,label,id,title,type,level,lead
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{deliverables}
+%
+% \begin{macrocode}
+\newenvironment{deliverables}[1]{\ifdelivs\begin{longtable}{|l|p{#1}|l|l|l|l|l|}\hline%
+\#&\textbf{\delivs@legend@name}&%
+\textbf{\delivs@legend@wp}&%
+\textbf{\delivs@legend@lead}&%
+\textbf{\delivs@legend@nature}&%
+\textbf{\delivs@legend@level}&%
+\textbf{\delivs@legend@due}\\\hline\hline%
+\endhead%
+\else\deliv@error\fi}
+{\ifdelivs\end{longtable}\fi}
+% \end{macrocode}
+% now the multilingual support
+% \begin{macrocode}
+\newcommand\delivs@legend@name{Deliverable name}
+\newcommand\delivs@legend@wp{WP}
+\newcommand\delivs@legend@nature{Type}
+\newcommand\delivs@legend@level{Level}
+\newcommand\delivs@legend@due{Due}
+\newcommand\delivs@legend@dissem{Dissem.}
+\newcommand\delivs@legend@lead{Lead}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\inputdelivs}
+%
+% \begin{macrocode}
+\newcommand{\inputdelivs}[1]{%
+\begin{deliverables}{#1}%
+\IfFileExists{\jobname.deliverables}%
+{\input{\jobname.deliverables}}%
+{\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}}
+\end{deliverables}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Tasks and Work Phases}\label{sec:impl:tasks}
+%
+% \begin{environment}{tasklist}
+% \begin{macrocode}
+\newenvironment{tasklist}
+{\begin{compactenum}}{\end{compactenum}}
+% \end{macrocode}
+% \end{environment}
+% The next step is to
+% \begin{macrocode}
+\newcommand\task@label[2]{\textbf{T#1.#2}}
+% \end{macrocode}
+% We define the keys for the task macro
+% \begin{macrocode}
+\define@key{task}{id}{\def\task@id{#1}\@dmp{id=#1}}
+\define@key{task}{wphases}{\def\task@wphases{#1}\pdata@def{task}{\taskin\task@id\wp@id}{wphases}{#1}\@dmp{wphases=#1}}
+\define@key{task}{requires}{\@requires\task@id{#1}\@dmp{req=#1}}
+\define@key{task}{title}{\def\task@title{#1}\pdata@def{task}{\taskin\task@id\wp@id}{title}{#1}}
+\define@key{task}{lead}{\def\task@lead{#1}\pdata@def{task}{\taskin\task@id\wp@id}{lead}{#1}}
+\define@key{task}{partners}{\def\task@partners{#1}\pdata@def{task}{\taskin\task@id\wp@id}{partners}{#1}}
+\define@key{task}{PM}{\def\task@PM{#1}\pdata@def{task}{\taskin\task@id\wp@id}{PM}{#1}}
+% \end{macrocode}
+% then we define an auxiliary function that gives them sensible defaults and sets the
+% internal macros.
+% \begin{macrocode}
+\def\task@set#1{\edef\task@id{task\thetask@all}
+\def\task@wphases{0-0}\def\task@partners{}\def\task@lead{}\def\task@PM{}
+\setkeys{task}{#1}}
+% \end{macrocode}
+%
+% \begin{macro}{\task@post@title@space}
+% make the space after the title tweakable
+% \begin{macrocode}
+\def\task@post@title@space{\;}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{task}
+% \begin{macrocode}
+\newcounter{alltasks}
+\def\task@post@title@space{\quad}
+\newcommand\task@legend@partners{Sites: }
+\newcommand\task@legend@PM{PM}
+\newenvironment{task}[1][]%
+{\stepcounter{alltasks}%
+\@task{#1}\item[\pdata@target{task}{\taskin\task@id\wp@id}{\task@label\thewp\thetask@wp}]%
+\@ifundefined{task@title}{}{\textbf\task@title}\task@post@title@space%
+\def\@initial{0-0}\ifx\task@wphases\@initial\else%
+\let\@@sep=\relax\@for\@I:=\task@wphases%
+\do{\decode@wphase\@I%
+\@@sep\show@wphase\wphase@start\wphase@end\wphase@force%
+\let\@@sep=\sep@wphases}%
+\fi% initial
+\hfill%
+\ifsubmit\else\ifx\task@PM\@empty\else\task@PM~\task@legend@PM;\fi\fi%
+\ifx\task@lead\@empty\else\ \task@legend@partners\site\task@lead~(\legend@lead)\fi%
+\@for\@I:=\task@partners\do{, \site\@I}\\%
+\ignorespaces}
+{\medskip}
+% \end{macrocode}
+% now the multilingual support and presentation configuration
+% \begin{macrocode}
+\newcommand\month@label[1]{M#1}
+\newcommand\show@wphase[3]{\edef\@test{#3}\def\@one{1}%
+\month@label{#1}-\month@label{#2}%
+\ifx\@test\@empty\else\ifx\@test\@one\else @#3\fi\fi}
+\newcommand\sep@wphases{; }
+\newcommand\legend@partners{Partners}
+\newcommand\legend@lead{lead}
+\newcommand\task@label@long{Task}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@task}
+% The |\@task| macro is a internal macro which takes a bunch of keyword keys and writes
+% their values to the aux file.
+% \begin{macrocode}
+\newcounter{task@all}\newcounter{task@wp}[wp]
+\newcount\task@@end
+\def\@task#1{\stepcounter{task@all}\stepcounter{task@wp}%
+\task@set{#1}%
+\pdata@def{task}{\taskin\task@id\wp@id}{wphases}\task@wphases
+\pdata@def{task}{\taskin\task@id\wp@id}{label}{\task@label\thewp\thetask@wp}%
+\pdata@def{task}{\taskin\task@id\wp@id}{number}{\thetask@wp}%
+\pdata@def{task}{\taskin\task@id\wp@id}{page}{\thepage}%
+\update@tasks{\taskin\task@id\wp@id}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\workphase}
+% \begin{macrocode}
+\newcommand\workphase[1]{\PackageError{proposal}
+ {The \protect\workphase macro is deprecated,\MessageBreak
+ use the attributes wphase on the workpackage environment instead!}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\*task*ref}
+% \begin{macrocode}
+\newcommand\taskin[2]{#2@#1}
+\newcommand\taskref[2]{\pdataRef{task}{#1@#2}{label}}
+\newcommand\taskreflong[2]{\pdataRef{task}{#2}{label}}
+\newcommand\tasktref[2]{\taskref{#1}{#2}: \pdataRefFB{task}{#1@#2}{short}{title}}
+\newcommand\localtaskref[1]{\taskref{\wp@id}{#1}}
+\newcommand\localtasktref[1]{\tasktref{\wp@id}{#1}}
+% \end{macrocode}
+% \end{macro}
+% now we initialize experimental infrastructure for task dependencies (not very well used/tested)
+% \begin{macrocode}
+\newcounter{gantt@deps}
+\def\@requires#1#2{\stepcounter{gantt@deps}%
+\edef\dep@id{taskdep\thegantt@deps}%
+\pdata@def{taskdep}\dep@id{from}{\taskin{#1}\wp@id}%
+\pdata@def{taskdep}\dep@id{to}{#2}%
+\update@deps\dep@id}
+%</cls>
+% \end{macrocode}
+%
+% \subsection{Project Data, Referencing \& Hyperlinking}\label{sec:impl:hyperlinking}
+%
+% \begin{macro}{\pdata@*}
+% |\pdata@out| is the file handle for the project data file, we define internal macros
+% to open and close it.
+% \begin{macrocode}
+%<*pdata>
+\newif\ifwork@areas\work@areastrue
+\DeclareOption{noworkareas}{\work@areasfalse}
+\ProcessOptions
+\RequirePackage{xspace}
+\newwrite\pdata@out
+\newcommand\pdata@open[1]{\immediate\openout\pdata@out=#1.pdata}
+\newcommand\pdata@close{\closeout\pdata@out}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\readpdata}
+% This macro reads the project data file and its error handling
+% \begin{macrocode}
+\newcommand\readpdata[1]{\IfFileExists{#1.pdata}
+{\message{proposal: Reading Project Data}\makeatletter\input{#1.pdata}\makeatother}
+{proposal: No Project Data found, (forward) references may be compromized}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdata@target}
+% This internal macro makes a hyper-target:
+% |\pdata@target{|\meta{cat}|}{|\meta{id}|}{|\meta{label}|}| prints \meta{label} with a
+% target name \meta{cat}|@|\meta{id}|@target| attached to it.
+% \begin{macrocode}
+\newcommand\pdata@target[3]{\hypertarget{#1@#2@target}{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdata@def}
+% This macro writes an |\@pdata@def| command to the current aux file and also executes it.
+% \begin{macrocode}
+\newcommand\pdata@def[4]{%\@pdata@def{#1}{#2}{#3}{#4}%
+ \protected@write\pdata@out{}{\string\@pdata@def{#1}{#2}{#3}{#4}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@pdata@def}
+% This macro stores the value of its last argument in a custom macro for reference.
+% \begin{macrocode}
+\newcommand\@pdata@def[4]{\expandafter\gdef\csname #1@#2@#3\endcsname{#4}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdataref}
+% \begin{macrocode}
+\newcommand\pdataref[3]{\@ifundefined{#1@#2@#3}%
+ {\protect\G@refundefinedtrue\@latex@warning{#3 for #1 #2 undefined}??}%
+ {\csname #1@#2@#3\endcsname}}%
+\newcommand\pdataref@aux[3]{\@ifundefined{#1@#2@#3}{??}{\csname #1@#2@#3\endcsname}}%
+\newcommand\pdataref@num[3]{\@ifundefined{#1@#2@#3}{0}{\csname #1@#2@#3\endcsname}}%
+\newcommand\pdataref@safe[3]{\@ifundefined{#1@#2@#3}{}{\csname #1@#2@#3\endcsname}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdatarefFB}
+% a variant with fallback field,
+% \begin{macrocode}
+\newcommand\pdatarefFB[4]{\@ifundefined{#1@#2@#3}%
+{\@ifundefined{#1@#2@#4}%
+{\protect\G@refundefinedtrue\@latex@warning{both #3 and its fallback #4 undefined for #1 #2}??}%
+{\csname #1@#2@#4\endcsname}}
+{\csname #1@#2@#3\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdataRef}
+% \begin{macrocode}
+\newcommand\pdataRef[3]{\@ifundefined{#1@#2@#3}%
+{\protect\G@refundefinedtrue\@latex@warning{#3 for #1 #2 undefined}??}%
+{\hyperlink{#1@#2@target}{\csname #1@#2@#3\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdataRefFB}
+% a variant with fallback field,
+% \begin{macrocode}
+\newcommand\pdataRefFB[4]{\@ifundefined{#1@#2@#3}%
+{\@ifundefined{#1@#2@#4}%
+{\protect\G@refundefinedtrue\@latex@warning{both #3 and its fallback #4 undefined for #1 #2}??}%
+{\hyperlink{#1@#2@target}{\csname #1@#2@#4\endcsname}}}
+{\hyperlink{#1@#2@target}{\csname #1@#2@#3\endcsname}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdatacount}
+% \begin{macrocode}
+\newcommand\prop@count[1]{\ifcase #1 zero\or one\or two\or three\or four\or five\or six\or seven \or
+ eight\or nine\or ten\or eleven \or twelve\else#1\fi}
+\newcommand\pdatacount[2]{\prop@count{\pdataref@num{#1}{#2}{count}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pn*}
+% \begin{macrocode}
+\newcommand\pn{\pdataref{prop}{gen}{acronym}\xspace}
+\newcommand\pnlong{\pdataref{prop}{gen}{acrolong}\xspace}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\W*ref}
+% \begin{macrocode}
+\newcommand\WPref[1]{\pdataRef{wp}{#1}{label}}
+\newcommand\WPtref[1]{\WPref{#1}: \pdataRefFB{wp}{#1}{short}{title}}
+\ifwork@areas
+\newcommand\WAref[1]{\pdataRef{wa}{#1}{label}}
+\newcommand\WAtref[1]{\WAref{#1}: \pdataRefFB{wa}{#1}{short}{title}}
+\fi
+%</pdata>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The Work Package Table}\label{sec:impl:wptable}
+%
+% \begin{macro}{\prop@lead}
+% \begin{macrocode}
+%<*cls>
+\newcommand\prop@lead[1]{\@ifundefined{wp@#1@lead}%
+{\protect\G@refundefinedtrue\@latex@warning{lead for WP #1 undefined}??}%
+{\csname wp@#1@lead\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\*@style}
+% \ednote{This (and wpfig) should be documented above}
+% \begin{macrocode}
+\definecolorset{gray/rgb/hsb/cmyk}{}{}%
+{leadgray,.90/.90,.90,.90/0,0,.90/0,0,0,.10;%
+wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30;%
+ganttgray,.60/.60,.60,.60/0,0,.60/0,0,0,.40}
+\newcommand\sum@style[1]{\cellcolor{wagray}{\textbf{#1}}}
+\newcommand\wa@style[1]{\cellcolor{wagray}{\textbf{#1}}}
+\newcommand\wp@style[1]{#1}
+\newcommand\lead@style[1]{\cellcolor{leadgray}{\textit{#1}}}
+\newcommand\wp@lead@style@explained{light gray italicised}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{wp@figure}
+% \begin{macrocode}
+\newcounter{wpfig@options}
+\define@key{wpfig}{size}{\def\wpfig@size{#1}\@dmp{size=#1}}
+\def\@true{true}
+\def\wpfig@pages{false}
+\define@key{wpfig}{pages}[true]{\def\wpfig@pages{#1}\stepcounter{wpfig@options}}
+\def\wpfig@type{false}
+\define@key{wpfig}{type}[true]{\def\wpfig@type{#1}\stepcounter{wpfig@options}}
+\def\wpfig@start{false}
+\define@key{wpfig}{start}[true]{\def\wpfig@start{#1}\stepcounter{wpfig@options}}
+\def\wpfig@length{false}
+\define@key{wpfig}{length}[true]{\def\wpfig@length{#1}\stepcounter{wpfig@options}}
+\def\wpfig@end{false}
+\define@key{wpfig}{end}[true]{\def\wpfig@end{#1}\stepcounter{wpfig@options}}
+\define@key{wpfig}{label}{\def\wpfig@label{#1}}
+\define@key{wpfig}{caption}{\def\wpfig@caption{#1}}
+\def\@sw#1{\begin{sideways}#1\end{sideways}}
+\newenvironment{wp@figure}{\begin{table}[ht]\wpfig@style\begin{center}
+{\let\@sw\relax\let\textbf\relax\let\site\relax\let\pn\relax\let\sys\relax%
+\gdef\wpfig@headline{\wpfig@legend@wap&\wpfig@legend@title%
+\ifx\wpfig@type\@true&\wpfig@legend@type\fi%
+\ifx\wpfig@pages\@true&\@sw{\wpfig@legend@page}\fi%
+\ifx\wpfig@start\@true&\@sw{\wpfig@legend@start}\fi%
+\ifx\wpfig@length\@true&\@sw{\wpfig@legend@length}\fi
+\ifx\wpfig@end\@true&\@sw{\wpfig@legend@end}\fi}%
+\if@sites%
+\@for\@site:=\prop@gen@sites\do{%
+\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@siteRM{\@site}}}%
+\if@RAM\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@siteRAM{\@site}}}\fi}%
+\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@totalRM}}%
+\if@RAM\xdef\wpfig@headline{\wpfig@headline&\@sw{\wpfig@legend@totalRAM}}\fi%
+\else% if@sites
+\xdef\wpfig@headline{\wpfig@headline &\@sw{\wpfig@legend@RM}\if@RAM&\@sw{\wpfig@legend@RAM}\fi}
+\fi}%if@sites
+\if@RAM\begin{tabular}{|l|l|*{\thewpfig@options}{r|}*{\the@sites}{r|r|}|r|r|}\hline
+\else\begin{tabular}{|l|l|*{\thewpfig@options}{r|}|*{\the@sites}{r|}|r|}\hline\fi%|
+\wpfig@headline\\\hline\hline}
+{\end{tabular}\smallskip\\
+\wpfig@legend@RAM@expl\if@sites; \wpfig@legend@lead@expl\fi
+\@ifundefined{wpfig@label}{\caption{\wpfig@legend@caption}}{\caption{\wpfig@caption}}
+\@ifundefined{wpfig@label}{\label{fig:wplist}}{\label{\wpfig@label}}
+\end{center}\end{table}}
+% \end{macrocode}
+% and now multilinguality support
+% \begin{macrocode}
+\newcommand\wpfig@legend@wap{\textbf{\ifwork@areas{WA/P}\else{WP}\fi}}
+\newcommand\wpfig@legend@title{\textbf{Title}}
+\newcommand\wpfig@legend@type{\textbf{type}}
+\newcommand\wpfig@legend@page{\textbf{page}}
+\newcommand\wpfig@legend@start{\textbf{start}}
+\newcommand\wpfig@legend@length{\textbf{length}}
+\newcommand\wpfig@legend@end{\textbf{end}}
+\newcommand\wpfig@legend@siteRM[1]{\site{#1}\if@RAM\ RM\fi}
+\newcommand\wpfig@legend@siteRAM[1]{\site{#1}\ RAM}
+\newcommand\wpfig@legend@totalRM{total\if@RAM\ RM\fi}
+\newcommand\wpfig@legend@totalRAM{total RAM}
+\newcommand\wpfig@legend@RM{RM}
+\newcommand\wpfig@legend@RAM{RAM}
+\newcommand\wpfig@legend@RAM@expl{\if@RAM R(A)M $\widehat=$ Researcher (Assistant) Months\else\ Efforts in PM\fi}
+\newcommand\wpfig@legend@lead@expl{WP lead efforts \wp@lead@style@explained}
+\newcommand\wpfig@legend@caption{{\ifwork@areas Work Areas and \fi}Work Packages}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{macro}{\wpfigstyle}
+% \ednote{document above}
+% \begin{macrocode}
+\def\wpfig@style{}
+\newcommand\wpfigstyle[1]{\def\wpfig@style{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\wpfig}
+% \ednote{The computation can be distributed much more efficiently (by intermingling the
+% counter advances with the row creation), but this works now}
+% \begin{macrocode}
+\newcount\local@count
+\newcount\@@@RM\if@RAM\newcount\@@@RAM\fi
+\newcount\all@@@RM\if@RAM\newcount\all@@@RAM\fi
+\newcommand{\wpfig}[1][]{\setcounter{wpfig@options}{0}\setkeys{wpfig}{#1}
+% \end{macrocode}
+% the first thing to do is to build the body of the table programmatically by (globally)
+% extending the |\@wp@lines| token register inside a bracket group which locally redefines
+% all macros we are using in the extensions, so that they do not get into the way. We
+% start this group now.
+% \begin{macrocode}
+{\gdef\@wp@lines{}%initialize
+\let\tabularnewline\relax\let\hline\relax\let\lead@style\relax% so they
+\let\wa@style\relax\let\wp@style\relax \let\@sw\relax\let\textbf\relax% do not
+\let\G@refundefinedtrue=\relax\let\@latex@warning=\relax\let\hyperlink=\relax% bother
+\let\pn\relax\let\xspace\relax% us
+% \end{macrocode}
+% The code that follows now, could be more elegant, if we had a better way of organizing
+% the data, but this works for now, we have four cases: with/without work areas and
+% with/without sites. All do something very similar.
+% \begin{macrocode}
+\ifwork@areas
+\edef\@@was{\pdataref@safe{all}{wa}{ids}}%
+\@for\@@wa:=\@@was\do{% iterate over the work areas
+\xdef\@@wa@line{\wa@style{\pdataRef{wa}\@@wa{label}}%
+&\wa@style{\@ifundefined{wa@\@@wa @short}{\pdataref{wa}\@@wa{title}}{\pdataref{wa}\@@wa{short}}}%
+\ifx\wpfig@type\@true&\wa@style{\pdataref{wa}\@@wa{type}}\fi%
+\ifx\wpfig@pages\@true&\wa@style{\pdataref{wa}\@@wa{page}}\fi%
+\ifx\wpfig@start\@true&\wa@style{\pdataref{wa}\@@wa{start}}\fi%
+\ifx\wpfig@length\@true&\wa@style{\pdataref{wa}\@@wa{len}}\fi%
+\ifx\wpfig@end\@true&\wa@style{\pdataref{wa}\@@wa{end}}\fi}
+\if@sites
+\@for\@site:=\prop@gen@sites\do{%
+\edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
+\local@count 0%
+\@for\@@wp:=\@@wps\do{\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
+\pdata@def\@@wa\@site{RM}{\the\local@count}%
+\xdef\@@wa@line{\@@wa@line&\wa@style{\the\local@count}}%
+\if@RAM
+\local@count 0%
+\@for\@@wp:=\@@wps\do{\advance\local@count by \pdataref@num\@@wp\@site{RAM}}
+\pdata@def\@@wa\@site{RAM}{\the\local@count}%
+\xdef\@@wa@line{\@@wa@line&\wa@style{\the\local@count}}%
+\fi}
+\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wa\@site{RM}}%
+\xdef\@@wa@line{\@@wa@line &\wa@style{\textbf{\the\local@count}}}
+\if@RAM
+\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wa\@site{RAM}}%
+\xdef\@@wa@line{\@@wa@line &\wa@style{\textbf{\the\local@count}}}
+\fi
+\else% if@sites
+\edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
+\xdef\@@wa@line{\@@wa@line&\wa@style{\pdataref{wa}\@@wa{RM}}
+\if@RAM&\wa@style{\pdataref{wa}\@@wa{RAM}}\fi}%
+\fi% if@sites
+\xdef\@wp@lines{\@wp@lines\@@wa@line\tabularnewline\hline}% add the line for the workarea
+\edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over its work packages
+\xdef\@@wp@line{\pdataRef{wp}\@@wp{label}%
+&\@ifundefined{wp@\@@wp @short}{\pdataref{wp}\@@wp{title}}{\pdataref{wp}\@@wp{short}}%
+\ifx\wpfig@type\@true&\pdataref{wp}\@@wp{type}\fi%
+\ifx\wpfig@pages\@true&\pdataref{wp}\@@wp{page}\fi%
+\ifx\wpfig@start\@true&\pdataref{wp}\@@wp{start}\fi%
+\ifx\wpfig@length\@true&\pdataref{wp}\@@wp{len}\fi%
+\ifx\wpfig@end\@true&\pdataref{wp}\@@wp{end}\fi}
+\if@sites
+\@for\@site:=\prop@gen@sites\do{%
+\edef\@@lead{\pdataref@safe{wp}\@@wp{lead}}
+\edef\@@RM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RM}}\else\wp@style{\pdataref@safe\@@wp\@site{RM}}\fi}
+\xdef\@@wp@line{\@@wp@line&\@@RM}
+\if@RAM
+\edef\@@RAM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RAM}}\else\wp@style{\pdataref@safe\@@wp\@site{RAM}}\fi}
+\xdef\@@wp@line{\@@wp@line&\@@RAM}
+\fi}
+\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
+\xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
+\if@RAM
+\global\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RAM}}%
+\xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
+\fi% if@sites
+\else% if@sites
+\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RM}}}
+\if@RAM\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RAM}}}\fi
+\fi% if@sites
+\xdef\@wp@lines{\@wp@lines\@@wp@line\tabularnewline\hline}}}
+% \end{macrocode}
+% Now the case where we do not have work areas.
+% \begin{macrocode}
+\else% ifwork@areas
+\edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over its work packages
+\xdef\@@wp@line{\pdataRef{wp}\@@wp{label}%
+&\@ifundefined{wp@\@@wp @short}{\pdataref{wp}\@@wp{title}}{\pdataref{wp}\@@wp{short}}
+\ifx\wpfig@type\@true&\pdataref{wp}\@@wp{type}\fi%
+\ifx\wpfig@pages\@true&\pdataref{wp}\@@wp{page}\fi%
+\ifx\wpfig@start\@true&\pdataref{wp}\@@wp{start}\fi%
+\ifx\wpfig@length\@true&\pdataref{wp}\@@wp{len}\fi%
+\ifx\wpfig@end\@true&\pdataref{wp}\@@wp{end}\fi}
+\if@sites
+\@for\@site:=\prop@gen@sites\do{%
+\edef\@@lead{\pdataref@safe{wp}\@@wp{lead}}
+\edef\@@RM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RM}}\else\wp@style{\pdataref@safe\@@wp\@site{RM}}\fi}
+\xdef\@@wp@line{\@@wp@line&\@@RM}
+\if@RAM
+\edef\@@RAM{\ifx\@@lead\@site\lead@style{\pdataref@safe\@@wp\@site{RAM}}\else\wp@style{\pdataref@safe\@@wp\@site{RAM}}\fi}
+\xdef\@@wp@line{\@@wp@line&\wp@style\@@RAM}
+\fi}
+\global\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num\@@wp\@site{RM}}%
+\xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
+\if@RAM
+\global\local@count0\relax%
+\@for\@site:=\prop@gen@sites\do{\global\advance\local@count by \pdataref@num{#1}\@site{RAM}}%
+\xdef\@@wp@line{\@@wp@line &\textbf{\the\local@count}}
+\fi
+\else% if@sites
+\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RM}}}
+\if@RAM\xdef\@@wp@line{\@@wp@line&\wp@style{\pdataref@safe{wp}\@@wp{RAM}}\fi}
+\fi% if@sites
+\xdef\@wp@lines{\@wp@lines\@@wp@line\tabularnewline\hline}}
+\fi%ifwork@areas
+% \end{macrocode}
+% Now we compute the totals lines in the |\@totals| macros; again there are four cases to
+% consider
+% \begin{macrocode}
+\gdef\@totals{}
+\ifwork@areas
+\if@sites
+\@for\@site:=\prop@gen@sites\do{% iterate over the sites
+\@@@RM=0\if@RAM\@@@RAM=0\fi
+\edef\@@was{\pdataref@safe{all}{wa}{ids}}%
+\@for\@@wa:=\@@was\do{% iterate over the work areas
+\edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over the work packages
+\advance\@@@RM by \pdataref@num\@@wp\@site{RM}%
+\if@RAM\advance\@@@RAM by \pdataref@num\@@wp\@site{RAM}\fi}}
+\pdata@def{all}\@site{RM}{\the\@@@RM}\if@RAM\pdata@def{all}\@site{RAM}{\the\@@@RAM}\fi
+\advance\all@@@RM by \the\@@@RM\if@RAM\advance\all@@@RAM by \the\@@@RAM\fi
+\xdef\@totals{\@totals & \textbf{\the\@@@RM}\if@RAM& \textbf{\the\@@@RAM}\fi}}
+\xdef\@totals{\@totals & \textbf{\the\all@@@RM}\if@RAM&\textbf{\the\all@@@RAM}\fi}
+\pdata@def{all}{total}{RM}{\the\all@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\all@@@RAM}\fi
+\else% if@sites
+\@@@RM=0\if@RAM\@@@RAM=0\fi
+\edef\@@was{\pdataref@safe{all}{wa}{ids}}%
+\@for\@@wa:=\@@was\do{\edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over the work packages
+\advance\@@@RM by \pdataref@num{wp}\@@wp{RM}%
+\if@RAM\advance\@@@RAM by \pdataref@num{wp}\@@wp{RAM}\fi}}
+\pdata@def{all}{total}{RM}{\the\@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\@@@RAM}\fi
+\xdef\@totals{&\the\@@@RM\if@RAM &\the\@@@RAM\fi}
+\fi% if@sites
+\else%i.e. no work@areas
+\if@sites
+\@for\@site:=\prop@gen@sites\do{%iterate over the sites
+\@@@RM=0\if@RAM\@@@RAM=0\fi%
+\edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over the work packages
+\advance\@@@RM by \pdataref@num\@@wp\@site{RM}%
+\if@RAM\advance\@@@RAM by \pdataref@num\@@wp\@site{RAM}\fi}
+\pdata@def{all}\@site{RM}{\the\@@@RM}\if@RAM\pdata@def{all}\@site{RAM}{\the\@@@RAM}\fi
+\xdef\@totals{\@totals & \textbf{\the\@@@RM}\if@RAM& \textbf{\the\@@@RAM}\fi}
+\advance\all@@@RM by \the\@@@RM\if@RAM\advance\all@@@RAM by \the\@@@RAM\fi}
+\xdef\@totals{\@totals &\textbf{\the\all@@@RM}\if@RAM&\textbf{\the\all@@@RAM}\fi}
+\pdata@def{all}{total}{RM}{\the\all@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\all@@@RAM}\fi
+\else% if@sites
+\@@@RM=0\if@RAM\@@@RAM=0\fi
+\edef\@@wps{\pdataref@safe{all}{wp}{ids}}%
+\@for\@@wp:=\@@wps\do{% iterate over the work packages
+\advance\@@@RM by \pdataref@num{wp}\@@wp{RM}%
+\if@RAM\advance\@@@RAM by \pdataref@num{wp}\@@wp{RAM}\fi}
+\pdata@def{all}{total}{RM}{\the\@@@RM}\if@RAM\pdata@def{all}{total}{RAM}{\the\@@@RAM}\fi
+\xdef\@totals{&\the\@@@RM\if@RAM &\the\@@@RAM\fi}
+\fi% if@sites
+\fi
+% \end{macrocode}
+% And we finally have a line for the intended totals which we use in draft mode.
+% \begin{macrocode}
+\gdef\intended@totals{}\gdef\requested@totals{}
+\if@sites
+\@for\@site:=\prop@gen@sites\do{
+\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{site}\@site{intendedRM}}}
+\xdef\requested@totals{\requested@totals&\pdataref@safe{site}\@site{reqPM}}
+\if@RAM\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{site}\@site{intendedRAM}}}\fi}
+\if@RAM\xdef\intended@totals{\intended@totals&&}\else%
+\xdef\intended@totals{\intended@totals&}%
+\xdef\requested@totals{\requested@totals&}%
+\fi
+\else% if@sites
+\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{all}{intended}{RM}}}
+\if@RAM\xdef\intended@totals{\intended@totals&\textbf{\pdataref@safe{all}{intended}{RAM}}}\fi
+\fi}% if@sites
+% \end{macrocode}
+% finally, we make all of this into a figure, computing the colspan of the the legend
+% cells for the totals via |\local@count| from the optional columns.
+% \begin{macrocode}
+\local@count\thewpfig@options\advance\local@count by 2
+\begin{wp@figure}
+\@wp@lines\hline%
+\multicolumn{\the\local@count}{|c|}{\prop@legend@totals}\@totals\\\hline%
+\ifsubmit\else%
+\ifx\prop@gen@topdownPM\@true%
+\multicolumn{\the\local@count}{|c|}{\prop@legend@intendedtotals}\intended@totals\\\hline%
+\fi% topdownPM
+\ifx\prop@gen@botupPM\@true%
+\multicolumn{\the\local@count}{|c|}{\prop@legend@requestedtotals}\requested@totals\\\hline%
+\fi% botupPM
+\fi% submit
+\end{wp@figure}}
+% \end{macrocode}
+% and now multilinguality support
+% \begin{macrocode}
+\newcommand\prop@legend@totals{\textbf{totals}}
+\newcommand\prop@legend@intendedtotals{\textbf{intended totals}}
+\newcommand\prop@legend@requestedtotals{\textbf{requested totals}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Gantt Charts}\label{sec:impl:gantt}
+%
+% Gantt Charts are done with help of the the |tikz| package. The |gantt|
+% environments pick up on the declared duration of the proposal in months stored in the
+% |\prop@gen@months| macro.
+%
+% We define the keys for Gantt tables
+% \begin{macrocode}
+\newif\ifgantt@draft\gantt@draftfalse
+\newif\ifgantt@miles\gantt@milesfalse
+\define@key{gantt}{xscale}{\def\gantt@xscale{#1}}
+\define@key{gantt}{yscale}{\def\gantt@yscale{#1}}
+\define@key{gantt}{step}{\def\gantt@step{#1}}
+\define@key{gantt}{size}{\def\gantt@size{#1}}
+\define@key{gantt}{draft}[true]{\ifsubmit\else\gantt@drafttrue\fi}
+\define@key{gantt}{milestones}[true]{\gantt@milestrue}
+% \end{macrocode}
+% Then we define an auxiliary function that provides defaults for these keys and sets the
+% internal macros.
+% \begin{macrocode}
+\def\gantt@set#1{\gantt@draftfalse\def\gantt@xscale{1}\def\gantt@yscale{.35}\def\gantt@step{3}
+\setkeys{gantt}{#1}}
+% \end{macrocode}
+%
+% Finally, the Gantt Chart environment itself.
+%
+% \begin{environment}{gantt}
+% The |gantt[|\meta{keyvals}|]{|\meta{height}|}| environment sets up the grid and legend
+% for a gantt chart. The grid is |\prop@gen@months| wide and \meta{height} high.
+% \begin{macrocode}
+\newenvironment{gantt}[2][]
+{\gantt@set{#1}\gdef\gantt@height{#2}
+\def\@test{\prop@gen@months@default}
+\ifx\@test\prop@gen@months
+\ClassError{proposal}{Need overall project months to draw gantt
+ chart - expect trouble;\MessageBreak specify
+ \protect\begin{proposal}[...,months=??,...] to fix}\fi
+\@ifundefined{gantt@size}{}{\csname\gantt@size\endcsname}
+\newdimen\gantt@ymonths
+\gantt@ymonths=\gantt@height cm
+\advance\gantt@ymonths by .8cm
+\begin{tikzpicture}[xscale=\gantt@xscale,yscale=\gantt@yscale]}
+{\draw[xstep=\gantt@step,very thin] (0,0) grid (\prop@gen@months,\gantt@height);
+\foreach \x in {0,\gantt@step,...,\prop@gen@months} \node at (\x,\gantt@ymonths) {\x};
+\ifgantt@miles
+\newdimen\gantt@ymiles\gantt@ymiles=\gantt@height cm
+\advance\gantt@ymiles by 2cm
+\newdimen\gantt@ymiles@top\gantt@ymiles@top=\gantt@height cm
+%\advance\gantt@ymiles@top by 2cm
+\edef\@@miles{\pdataref@safe{all}{mile}{ids}}
+\@for\@I:=\@@miles\do{%
+\edef\@@month{\pdataref@safe{mile}{\@I}{month}}
+\draw[very thick,blue] (\@@month,\gantt@ymiles@top) -- (\@@month,0);
+\node[blue] at (\@@month,\gantt@ymiles) {\pdataref{mile}{\@I}{label}};}
+\fi %gantt@miles
+\end{tikzpicture}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@action}
+% In this we have used the macro that does the actual painting.
+% |\@action{|\meta{name}|}{|\meta{line}|}{|\meta{start}|}{|\meta{len}|}{|\meta{force}|}|
+% creates a gantt node with name \meta{name} in line \meta{line} starting at month
+% \meta{month} with length \meta{len} that is \meta{force} thick.
+% \begin{macrocode}
+\newdimen\gantt@ymid\newdimen\gantt@yinc\newdimen\gantt@xend
+\newcommand{\@action}[6][]{\def\@test{#1}%
+\ifx\@test\@empty\def\@@color{ganttgray}\else\def\@@color{#1}\fi
+\gantt@ymid=#3 cm\gantt@yinc=\gantt@yscale cm
+\gantt@xend=#4 cm\advance\gantt@xend by #5 cm
+\advance\gantt@ymid by \gantt@yinc
+\fill[\@@color] (#4,#3) rectangle +(#5,#6);
+\node (#2@left) at (#4,\gantt@ymid) {};
+\node (#2@right) at (\gantt@xend,\gantt@ymid) {};}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@dependency}
+% \begin{macrocode}
+\def\@dependency#1#2{\draw[->,line width=2pt,color=red] (#1@right) -- (#2@left);}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\gantt@compute@effort}
+% A helper function that updates the dimension |\gantt@effort| according to whether the
+% counter |\gantt@month| is in the range. It is used in |\gantt@chart|
+% \begin{macrocode}
+\newcommand\gantt@compute@effort[3]{% start, len, force
+ \@@e=#1\advance\@@e by #2
+ \ifnum\thegantt@month<#1\else
+ \ifnum\thegantt@month<\@@e
+ \gantt@plus=#3cm\advance\gantt@effort by \gantt@plus\fi\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ganttchart}
+% This macro iterates over the work areas, their work packages, and finally their work
+% phases to use the internal macro |\@action|. All of this in the gantt setting.
+% \begin{macrocode}
+\newcommand{\ganttchart}[1][]{\begin{figure}[ht]\centering
+\gantt@set{#1}
+\def\gantt@wps{\pdataref@num{all}{wp}{count}}
+\begin{gantt}[#1]{\gantt@wps}
+ \newcounter{taskwps}\newcount\@@line
+ \edef\@@was{\pdataref@safe{all}{wa}{ids}}
+ \ifwork@areas
+ \@for\@@wa:=\@@was\do{% iterate over work areas
+ \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}
+ \@for\@@wp:=\@@wps\do{% iterate over work packages
+ \stepcounter{taskwps}
+ \@@line=\gantt@wps\advance\@@line by -\thetaskwps
+ \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
+ \node at (-1/\gantt@xscale,\@@line) [above=-2pt] {\pdataRef{wp}\@@wp{label}};
+ \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
+ \@for\@@ft:=\@@wphases\do{%wp-level work phases
+ \decode@wphase\@@ft
+ \@action\@@wp\@@line\wphase@start\wphase@len\wphase@force}
+ \@for\@@task:=\@@tasks\do{% tasks
+ \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
+ \@for\@@ft:=\@@wphases\do{%task-level work phases
+ \decode@wphase\@@ft
+ \@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}}
+ \else% ifwork@areas false
+ \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
+ \@for\@@wp:=\@@wps\do{% iterate over work packages
+ \stepcounter{taskwps}
+ \@@line=\gantt@wps\advance\@@line by -\thetaskwps
+ \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
+ \node at (-1/\gantt@xscale,\@@line) [above=-2pt] {\pdataRef{wp}\@@wp{label}};
+ \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
+ \decode@wphase\@@ft
+ \@action\@@wp\@@line\wphase@start\wphase@len\wphase@force}
+ \@for\@@task:=\@@tasks\do{% task-level work phases
+ \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
+ \decode@wphase\@@ft
+ \@action\@@task\@@line\wphase@start\wphase@len\wphase@force}}}
+ \fi% ifwork@areas end
+ \edef\@@deps{\pdataref@safe{all}{task}{deps}}
+ \@for\@@dep:=\@@deps\do{%
+ \@dependency{\pdataref@safe{taskdep}\@@dep{from}}{\pdataref@safe{taskdep}\@@dep{to}}}
+% \end{macrocode}
+% The next piece of code generates the effort sum table in draft mode
+% \begin{macrocode}
+ \ifgantt@draft
+ \newcounter{gantt@month}
+ \newcount\@@e\newdimen\gantt@effort\newdimen\gantt@plus
+ \@whilenum\thegantt@month<\prop@gen@months\do{% step over months
+ \gantt@effort=0cm
+ \ifwork@areas
+ \edef\@@was{\pdataref@safe{all}{wa}{ids}}
+ \@for\@@wa:=\@@was\do{% iterate over work areas
+ \edef\@@wps{\pdataref@safe\@@wa{wp}{ids}}
+ \@for\@@wp:=\@@wps\do{% iterate over work packages
+ \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
+ \decode@wphase\@@ft
+ \gantt@compute@effort\wphase@start\wphase@len\wphase@force}
+ \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
+ \@for\@@task:=\@@tasks\do{% iterate over tasks
+ \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
+ \decode@wphase\@@ft
+ \gantt@compute@effort\wphase@start\wphase@len\wphase@force}}}}
+ \fill[ganttgray] (\thegantt@month,-5) rectangle +(1,\gantt@effort);
+ \else% ifwork@areas
+ \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
+ \@for\@@wp:=\@@wps\do{% iterate over work packages
+ \edef\@@wphases{\pdataref@safe{wp}\@@wp{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
+ \decode@wphase\@@ft
+ \gantt@compute@effort\wphase@start\wphase@len\wphase@force}
+ \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
+ \@for\@@task:=\@@tasks\do{% iterate over tasks
+ \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the wp-level work phases
+ \decode@wphase\@@ft
+ \gantt@compute@effort\wphase@start\wphase@len\wphase@force}}}
+ \fill[ganttgray] (\thegantt@month,-5) rectangle +(1,\gantt@effort);
+ \fi% ifwork@areas
+ \stepcounter{gantt@month}}
+ \fi% ifgantt@draft
+ \end{gantt}
+ \caption{\gantt@caption}\label{fig:gantt}
+\end{figure}\footnotetext\gantt@footnote}
+% \end{macrocode}
+% now the multilingual support
+% \begin{macrocode}
+\newcommand\gantt@caption@main{Gantt Chart: Overview Work Package Activities}
+\newcommand\gantt@caption@lower{lower bar shows the overall effort \if@RAM (RAM only)\fi per month}
+\newcommand\gantt@caption{\gantt@caption@main\ifgantt@draft\xspace
+ (\gantt@caption@lower)\fi}
+\newcommand\gantt@footnote{Bars shown at reduced height (e.g. 50\%) indicate reduced
+ intensity during that work phase (e.g. to 50\%).}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\gantttaskchart}
+% This macro is a variant of |\ganttchart|, but it shows the tasks consecutively, as is
+% useful for EU projects\ednote{this should be incorporated with the gantt chart above,
+% but I am currently to scared to do it so close to the deadline}
+% \begin{macrocode}
+\newcommand{\gantttaskchart}[1][]{\begin{figure}[hbtp]\centering\gantt@set{#1}
+\newcounter{gantt@all@tasks}%
+\setcounter{gantt@all@tasks}{\pdataref@num{all}{task}{count}}
+\addtocounter{gantt@all@tasks}{\pdataref@num{all}{wp}{count}}
+\begin{gantt}[#1]{\thegantt@all@tasks}
+ \newcounter{gantt@tasks}\newcount\@@line
+ \edef\@@wps{\pdataref@safe{all}{wp}{ids}}
+ \@for\@@wp:=\@@wps\do{% iterate over work packages
+ \stepcounter{gantt@tasks}
+% \@action[white]{}\@@line0{48}1
+ \edef\@@tasks{\pdataref@safe\@@wp{task}{ids}}
+ \@for\@@task:=\@@tasks\do{% iterate over the tasks
+ \stepcounter{gantt@tasks}
+ \@@line=\thegantt@all@tasks\advance\@@line by -\thegantt@tasks
+ \node at (-.5/\gantt@xscale,\@@line) [above=-2pt] {{\footnotesize\taskreflong\@@wp\@@task}};
+ \edef\@@wphases{\pdataref@safe{task}\@@task{wphases}}
+ \@for\@@ft:=\@@wphases\do{%iterate over the task-level work phases
+ \decode@wphase\@@ft
+ \@action\@@task\@@line\wphase@start\wphase@len\wphase@force
+ }}}% end all iterations
+ \end{gantt}
+ \caption{\gantt@caption@main{} -- \emph{\gantt@footnote}}\label{fig:gantt}
+\end{figure}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Coherence}\label{sec:impl:coherence}
+%
+% \begin{macro}{\j*}
+% \begin{macrocode}
+\newcommand\jpub{\textcolor{\prop@link@color}{\textbf{\Large{$\star$}}}}
+\newcommand\jpro{\textcolor{\prop@link@color}{\textbf{\Large{$\bullet$}}}}
+\newcommand\jsoft{\textcolor{\prop@link@color}{\textbf{@}}}
+\newcommand\jorga{\textcolor{\prop@link@color}{\textbf{\Large{$\circ$}}}}
+\newcommand\jsup{\textcolor{\prop@link@color}{\textbf{\smiley}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\add@joint}
+% |\add@joint{|\meta{first}|}{|\meta{second}|}{|\meta{sym}|}| adds \meta{sym} to the the
+% |\coherence@|\meta{first}|@|\meta{second} macro for the coherence table.
+% \begin{macrocode}
+\newcommand\add@joint[3]{\@ifundefined{coherence@#1@#2}%
+{\@namedef{coherence@#1@#2}{#3}}%
+{\expandafter\g@addto@macro\csname coherence@#1@#2\endcsname{#3}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prop@joint}
+% This iterates over a comma-separated list of names and makes the necessary entries
+% into the coherence table.
+% \begin{macrocode}
+\newcommand\prop@joint[2]{\@for\@first:=#2\do{%
+\@for\@second:=#2\do{\ifx\@first\@second\else\add@joint\@first\@second{#1}\fi}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\joint*}
+% Now, some instances that use these.
+% \begin{macrocode}
+\newcommand\jointproj[1]{\prop@joint\jpro{#1}}
+\newcommand\jointpub[1]{\prop@joint\jpub{#1}}
+\newcommand\jointorga[1]{\prop@joint\jorga{#1}}
+\newcommand\jointsoft[1]{\prop@joint\jsoft{#1}}
+\newcommand\jointsup[1]{\prop@joint\jsup{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\coherencematrix}
+% \begin{macrocode}
+\newcommand{\coherencematrix}{
+{\let\tabularnewline\relax\let\hline\relax\let\site\relax% so they do
+ \let\@sw\relax\let\jpub\relax\let\jpro\relax\let\jorga\relax% not bother
+ \let\jsoft\relax\let\jsup\relax\let\cellcolor\relax% us
+\gdef\@ct@head{}%
+\@for\@site:=\prop@gen@sites\do{\xdef\@ct@head{\@ct@head%
+&\ifx\cht@swsites\@true\@sw{\site{\@site}}\else\site{\@site}\fi}}%
+\gdef\@ct@lines{\@ct@head\tabularnewline\hline\hline} %initialize with head line
+\@for\@site:=\prop@gen@sites\do{\xdef\@ct@line{\site{\@site}}%
+ \@for\@@site:=\prop@gen@sites\do{%
+ \xdef\@ct@line{\@ct@line&\ifx\@site\@@site{\cellcolor{wagray}{}}\fi%
+ \@ifundefined{coherence@\@site @\@@site}{}{\@nameuse{coherence@\@site @\@@site}}}}%
+ \xdef\@ct@lines{\@ct@lines\@ct@line\tabularnewline\hline}}}%
+\begin{tabular}{|l||*{\the@site}{c|}}\hline%
+\@ct@lines\hline%
+joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ project,
+ \jorga $\hat=$ organization, \jsoft $\hat=$ software/resource dev,
+ \jsup $\hat=$ supervision}\\\hline
+\end{tabular}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\coherencetable}
+% \begin{macrocode}
+\define@key{coherencetable}{swsites}[true]{\def\cht@swsites{#1}}
+\define@key{coherencetable}{stretch}{\def\cht@stretch{#1}}
+\newcommand\coherencetable[1][]{%
+\def\cht@swsites{false}%
+\def\cht@stretch{1}%
+\setkeys{coherencetable}{#1}%
+\begin{table}[ht]\centering%
+\small\setlength{\tabcolsep}{.5em}%
+\renewcommand{\arraystretch}{\cht@stretch}%
+\coherencematrix%
+\caption{\coherence@caption}\label{tab:collaboration}
+\end{table}}
+% \end{macrocode}
+% now the multilinguality support
+% \begin{macrocode}
+\newcommand\coherence@caption{Previous Collaboration between {\pn} members}
+%</cls>
+% \end{macrocode}
+% \end{macro}
+%
+%\subsection{Relevant Papers \& References}\label{sec:imple:papers}
+%
+% We first define a bibLaTeX bibliography heading that does not create headers, we need
+% it somewhere.
+% \begin{macrocode}
+%<*cls|reporting>
+\defbibheading{empty}{}
+% \end{macrocode}
+% We define an internal macro that prints a publication list of a given {bib\TeX} entry
+% type and title for convenience. It also adds a |notype=| to the token register
+% |\prop@rl| to deal with the unclassified entries from the list.
+% \begin{macrocode}
+\newif\if@allpapers\@allpaperstrue
+\newcommand\prop@ppl[3][]{\@allpapersfalse\message{ppl processing: #2}%
+\printbibliography[heading=subbibliography,type=#2,title=#3#1]%
+\@ifundefined{prop@rl}{\xdef\prop@rl{#2}}{\xdef\prop@rl{\prop@rl, #2}}}
+% \end{macrocode}
+% The following code does not work yet, it would have been nice to be able to just add a
+% key |unclassified| to catch the unclassified ones. I guess we just have to issue a
+% warning instead.
+% \begin{macrocode}
+\newcommand\prop@prl[1]{\message{unclassified: #1}%
+\printbibliography[heading=subbibliography,title=Unclassified,#1]}%
+\define@key{paperlist}{unclassified}[true]{\message{unclass: \prop@rl}\prop@prl\prop@rl}
+% \end{macrocode}
+% with this, we define a couple of keys that generate
+% \begin{macrocode}
+\define@key{paperlist}{articles}[true]{\prop@ppl{article}{Articles}}
+\define@key{paperlist}{chapters}[true]{\prop@ppl{inbook}{Book Chapters}}
+\define@key{paperlist}{confpapers}[true]{\prop@ppl[,keyword=conference]{inproceedings}{Conference Papers}}
+\define@key{paperlist}{wspapers}[true]{\prop@ppl[,notkeyword=conference]{inproceedings}{Workshop Papers}}
+\define@key{paperlist}{theses}[true]{\prop@ppl{thesis}{Theses}}
+\define@key{paperlist}{submitted}[true]{\prop@ppl[,keyword=submitted]{unpublished}{Submitted}}
+\define@key{paperlist}{books}[true]{\prop@ppl{book}{Monographs}}
+\define@key{paperlist}{techreports}[true]{\prop@ppl{techreport}{Technical Reports}}
+% \end{macrocode}
+%
+% \begin{macro}{featured}
+% We introduce a new bibLaTeX category |featured| for those papers that were already
+% mentioned in |\prop@paperlist| and the macros defined from it.
+% \begin{macrocode}
+\DeclareBibliographyCategory{featured}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prop@paperlist}
+% We generate a subsection with a |refsection| (this makes a separate bibliography for
+% this section) and activate the keys via |\nocite|. Then we just print the bibliography
+% with the empty header we created before.
+% \begin{macrocode}
+\newcommand\prop@paperlist[2][]{%
+\let\biboldfont\bibfont%
+\renewcommand{\bibfont}{\footnotesize}%
+\renewcommand{\baselinestretch}{.9}
+\def\do##1{\addtocategory{featured}{##1}}\docsvlist{#2}%
+\setkeys{paperlist}{#1}
+\@ifundefined{prop@rl}{}{\@latex@warning{some papers are not classified!}}
+\if@allpapers\printbibliography[category=featured,heading=empty]\fi%
+\let\bibfont\biboldfont}
+% \end{macrocode}
+% \end{macro}
+%
+% We only have to define the |warnpubs| and |empty| heading constructors
+%
+% \begin{macrocode}
+\def\prop@warnpubs@message{Many of the proposers' publications are online at one of the following URIs:}
+\def\prop@warnpubs@title{References}
+\defbibheading{warnpubs}{\section*{\prop@warnpubs@title}%
+ \@ifundefined{prop@gen@pubspages}
+ {\@latex@warning{No publication pages specified;
+ use the pubspage key in the proposal environment!}}
+ {\prop@warnpubs@message%
+ \@for\@I:=\prop@gen@pubspages\do{\par\noindent\csname\@I\endcsname}}}
+\defbibheading{empty}{}
+%</cls|reporting>
+% \end{macrocode}
+%
+% \subsection{Miscellaneous}\label{sec:impl:misc}
+%
+% \begin{macro}{\signatures}
+% \begin{macrocode}
+%<*pdata>
+\newcommand{\signatures}[1]{\section{#1}
+\qquad\number\day. \number\month. \number\year\\[6ex]
+\strut\qquad Date\hfill\@for\@p:=\prop@gen@PIs\do{%
+\wa@ref{person}\@p{personaltitle}~\wa@ref{person}\@p{name}\hfill}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@dmp}
+% The |\@dmp| macro shows metadata information about the keys in the margin if
+% |\keystrue| is specified. This is a debugging tool.
+% \begin{macrocode}
+\def\@dmp#1{\ifkeys\marginpar{#1}\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\euro}
+% \begin{macrocode}
+\renewcommand\euro{\officialeuro\xspace}
+%</pdata>
+% \end{macrocode}
+% \end{macro}
+% \Finale
+\endinput
+% LocalWords: proposal dtx xkohlhase areastrue svninfo noworkareas twoside emph gitinfo
+% LocalWords: areasfalse wa textcomp amssymb url graphicx colortbl xcolor RO OJBref sl
+% LocalWords: fancyhdr keyval eurosym tikz calc USenglish ngerman linkcolor ne WPref gen
+% LocalWords: citecolor urlcolor colorlinks pagecolor breaklinks bookmarksopen WPref
+% LocalWords: hyperref LaTeX workpackage PIs thema acrolong anzungsantrag im Mitarbeiter
+% LocalWords: Einzelverfahren tabline Allgemeine Angaben Antragsteller worktel ifsvninfo
+% LocalWords: bitabline personaltitle academictitle birthdate Dienstanschrift Hilfskraft
+% LocalWords: workaddress atabline workfax Privatanschrift privaddress privtel ifgitinfo
+% LocalWords: dt Kennwort Fachgebiet und Arbeitsrichtung Voraussichtliche wa fancyfoot
+% LocalWords: Gesamtdauer Antragszeitraum Zusammenfassung workarea wp wps num prop@gen
+% LocalWords: refundefinedtrue lightgray gantt xstep Unterschriften Id areas acro Lutz
+% LocalWords: submit hide ed public article paper today array comment wide RE tweakable
+% LocalWords: babel true bookmarks blue LO LE page of prop sites key site RM hypertarget
+% LocalWords: def id title acronym discipline start months Proposal Erg by cls endinput
+% LocalWords: empty em name affiliation Applicants Work Address email The pn Hartenstein
+% LocalWords: curriculum vita the applicants are enclosed appendix reference Schr doctex
+% LocalWords: Research area and field work Scientific Fields Anticipated write botupPM
+% LocalWords: duration Application period Summary short lead Package label task botupMP
+% LocalWords: tasks deps number line Effort target ids count warning at pdata swsites
+% LocalWords: for undefined safe zero one two three four five six seven eight swsites
+% LocalWords: nine ten eleven twelve style lines totals Packages xscale yscale wphrases
+% LocalWords: step set gray very thin grid workphase len force phase length to endhead
+% LocalWords: taskdep from rectangle left right width pt color red above dep jointsub
+% LocalWords: Overview Activities Signatures Date paralist ymonths ymid yinc jointsoft
+% LocalWords: xend effort month iffalse eustrep.dtx fileversion maketitle Antr jointsoft
+% LocalWords: tableofcontents DescribeEnv ifpublic ifpublic compactitem wpfig jointsup
+% LocalWords: wpfig workplan workplan bookeeping wissenchaftliche tasklist dmp jointsup
+% LocalWords: tasklist taskin taskref taskref tasktref tasktref localtaskref jsoft jsoft
+% LocalWords: localtaskref ganttchart biblatex ifx dfgproposal.dtx newpage pn jsup jsup
+% LocalWords: bibtex proposal1-blx.aux pdataref WPtref WPtref WAref WAref WAtref wasysym
+% LocalWords: WAtref protectmacro thebibliography bibitem newblock newif inst
+% LocalWords: ifsubmit submitfalse publicfalse ifkeys keysfalse ifwork RAMtrue
+% LocalWords: submittrue publictrue excludecomment RAMfalse keystrue sfdefault
+% LocalWords: renewcommand familydefault helvet includecomment subsubsections
+% LocalWords: setcounter secnumdepth ifofpage ofpagefalse fancyhead thepage sw
+% LocalWords: pagestyle fancyplain sitesfalse sitestrue ifundefined gdef allwp
+% LocalWords: fundedperiod reportperiod textbf newenvironment titlepage auxout
+% LocalWords: thispagestyle newcounter stepcounter tocdepth ofpagetrue setkeys
+% LocalWords: finalreport orderzeitraum thewa thewp addtocounter bigskip pws
+% LocalWords: textsf smallskip ignorespaces subsubsection theallwp req pnlong
+% LocalWords: compactenum compactenum thetask newcount thegantt refsection tl
+% LocalWords: nocite defbibheading ourpubs printbibliography expandafter ifnum
+% LocalWords: csname endcsname count ifcase cellcolor wptable widehat qquad ct
+% LocalWords: tabularnewline wplist ifgantt drafttrue RMdisclaimer draftfalse
+% LocalWords: RMdisclaimerfalse RMdisclaimertrue newdimen taskwps thetaskwps
+% LocalWords: whilenum hfill marginpar texteuro officialeuro texttt pnlong wpg
+% LocalWords: roject xspace internallly OBJref OBJtref OJBtref ldots jointpub
+% LocalWords: pdatacount pdatacount coherencematrix coherencematrix jointpub
+% LocalWords: jointproj jointproj jointorga jointorga jpub jpub jproj jproj rl
+% LocalWords: jorga coherencetable coherencetable vspace ifdelivs delivsfalse
+% LocalWords: delivstrue boxedminipage ednotes thempfootnote mpfootnote xdef
+% LocalWords: csquotes eso-foot ednoteshape footnotesize importfrom readpdata
+% LocalWords: pubspage newcommand jobname.pdata jobname compromized warnpubs
+% LocalWords: maxbibnames reportfalse reporttrue noindent goodbreak theobjective
+% LocalWords: deliv ednote wpheadertable wptitle wprm hline theprop newwrite
+% LocalWords: delivs openout deliverables themilestone wpdelivs textwidth lec
+% LocalWords: compactdesc wadelivs hfil nobreak hbox leadsto delivref dissem
+% LocalWords: delivtref dissem wpdeliv thedeliv textit wadeliv verif verif rgb
+% LocalWords: milesfor longtable footnotemark footnotetext sortkey inputdelivs
+% LocalWords: makeatletter makeatother italicised tikzpicture paperlist jpro
+% LocalWords: textcolor namedef namedef nameuse setlength tabcolsep clange ppl
+% LocalWords: arraystretch thedeliverable biboldfont bibfont sitename darkblue
+% LocalWords: wpsubsection wpsubsection wpsubsectionfalse wpsubsectiontrue ppl
+% LocalWords: definecolor medskip fundsuntil fundsuntil defernumbers shortname
+% LocalWords: totalduration circ orga notype allpapers allpaperstrue prl sym
+% LocalWords: allpapersfalse subbibliography unclass inbook confpapers wphases
+% LocalWords: inproceedings wspapers notkeyword techreports techreport emphbox
+% LocalWords: textbackslash wpsectionheadings compactht compactht emphbox sym
+% LocalWords: dfgproposal Tsanko Tsankov mdframed newmdenv wphase thealltasks
+% LocalWords: alltasks taskreflong definecolorset leadgray wagray thewpfig fancyhfoffset
+% LocalWords: wpfigstyle colspan keyvals gantttaskchart baselinestretch NeedsTeXFormat
+% LocalWords: mileref mileref miletref backref firstinits wissenschaftlicher
+% LocalWords: wissenschaftliche startend@wphases addtocategory localdelivref
+
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:
diff --git a/macros/latex/contrib/proposal/base/proposal.ins b/macros/latex/contrib/proposal/base/proposal.ins
new file mode 100644
index 0000000000..a7aaf16324
--- /dev/null
+++ b/macros/latex/contrib/proposal/base/proposal.ins
@@ -0,0 +1,37 @@
+%%
+%% This file generates files required to use the proposal package.
+%% At your command prompt write
+%%
+%% latex proposal.ins
+%%
+%% Copyright(c) 2011 Michael Kohlhase
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%% $Id: proposal.ins 21941 2011-06-30 07:02:41Z kohlhase $
+%% $HeadURL: https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/base/proposal.ins $
+
+\input docstrip
+\preamble
+\endpreamble
+
+%\usedir{tex/latex/listings}
+\keepsilent
+\askforoverwritefalse
+
+% generate base package
+\generate{\file{proposal.cls}{\from{proposal.dtx}{cls}}}
+\generate{\file{reporting.cls}{\from{proposal.dtx}{reporting}}}
+\generate{\file{pdata.sty}{\from{proposal.dtx}{pdata}}}
+
+\Msg{*}
+\Msg{* You probably need to move the file proposal.cls into a directory}
+\Msg{* searched by TeX.}
+\Msg{*}
+\Msg{* And don't forget to refresh your filename database}
+\Msg{* if your TeX distribution uses such a database.}
+\Msg{*}
+
+\endbatchfile
diff --git a/macros/latex/contrib/proposal/bin/Modparse.pm b/macros/latex/contrib/proposal/bin/Modparse.pm
new file mode 100644
index 0000000000..2fd732b063
--- /dev/null
+++ b/macros/latex/contrib/proposal/bin/Modparse.pm
@@ -0,0 +1,189 @@
+#######################################################################################
+# A module for loading .tex files and feeding the data to the various applications. #
+# Copyright (c) 2005, Ioan Sucan, released under the Gnu General Public License (GPL) #
+# see http://www.gnu.org/copyleft/gpl.html #
+# $URL: svn://kwarc.eecs.iu-bremen.de/repos/kwarc/projects/content/bin/Modparse.pm$ #
+# $Date: 2005-09-26 12:44:28 -0500 (Mon, 26 Sep 2005) $ $Rev: 4243 $ #
+#######################################################################################
+
+package Modparse;
+
+use File::Basename;
+use File::Path;
+
+# if both snippath and snippathList are specified,
+# snippathList is ignored !
+
+# if a default snippath definition file is found
+# (snippath.def) it is used if no snippath is given
+# as argument;
+sub new {
+ my ($class, %options) = @_;
+
+ $options{recursion} = 1 unless defined $options{recursion};
+ $options{requireStatus} = 'include|exclude' unless defined $options{requireStatus};
+ $options{loadInputs} = 1 unless defined $options{loadInputs};
+ $options{onlyModuleLines} = 0 unless defined $options{onlyModuleLines};
+
+ if ( !(%{$options{snippath}}) && (-e "snippath.def") ) {
+ open(SNIPPATHDEF, 'snippath.def');
+ my @snlist = <SNIPPATHDEF>;
+ close(SNIPPATHDEF);
+ for (my $i = 0 ; $i <= $#snlist; $i++) { chomp($snlist[$i]); }
+ %{$options{snippath}} = @snlist; }
+ @{$options{snippathList}} = keys(%{$options{snippath}})
+ if ($options{snippath} && %{$options{snippath}});
+ $options{debug} = 0;
+
+ bless(\%options, $class); }
+
+sub execute{
+ my ($self, $file) = @_;
+
+ local *run_event = sub {
+ my ($event, $arg) = @_;
+ if ($self->{$event}) { $self->{$event}($arg); }
+ };
+
+ local *go = sub {
+ my ($location, %param) = @_;
+ my ($tex, $path, @tex_data) = $self->readLocation($location);
+ return unless @tex_data;
+ my $NL = $#tex_data+1;
+
+ $param{filename} = $tex;
+ $param{depth}++;
+ $param{filecount}++;
+ my $i = 0;
+
+ $param{nextline} = sub { $tex_data[++$i]; };
+ $param{prevline} = sub { $tex_data[--$i]; };
+ $param{rewriteline}= sub { $tex_data[$i] = $_[0]; };
+
+ print "Processing $tex...\n" if $self->{verbose};
+ run_event('onBeginFile', \%param);
+
+ while ($i<$NL){
+ $param{original} = $tex_data[$i];
+ $_ = $tex_data[$i]; chomp; /([^%]*)((%.*)?)/;
+ ($param{tex}, $param{comment}) = ($1, $2); $_ = $1;
+ s/\s+//g; $param{simple_tex} = $_;
+
+ if (/\\begin\{module\}(\[([^\]]*)\])?/) {
+ if ($param{in_module}) {
+ push(@{$param{module_stack}}, [$param{module_id}, $param{module_arg}]); }
+ $param{in_module} = 1;
+ $param{module_args} = $1 ? $2 : undef;
+ $param{module_id} = ($param{module_args} &&
+ $param{module_args} =~ /id=([^\],]+)/) ? $1 : undef;
+ $param{module_nesting}++;
+ run_event('onBeginModule', \%param); }
+
+ if (/\\end\{module\}/) {
+ run_event('onEndModule', \%param);
+ if ($#{$param{module_stack}} >= 0) {
+ ($param{module_id}, $param{module_args}) = @{pop(@{$param{module_stack}})};
+ } else {
+ $param{in_module} = 0;
+ ($param{module_id}, $param{module_args}) = (undef, undef); }
+ $param{module_nesting}--;
+ }
+
+ foreach my $srch_snippath(@{$self->{snippathList}}){
+ $self->{snippath}{$srch_snippath} = $1
+ if (/\\def\\$srch_snippath\#1\{([^\#]+)\#1\}$/); }
+
+ if ($self->{follow} && (/\\((requiremodules(\[($self->{requireStatus})\])?)|input|include)\{([^\}]+)\}/)){
+ my $req_filename = $5; my $req_spath = ''; my $command = $1;
+ my $is_require = ($command =~ /requiremodules/) ? 1 : 0;
+ if ($is_require || $self->{loadInputs}) {
+ foreach my $srch_snippath(@{$self->{snippathList}}){
+ if ($req_filename =~ /\\$srch_snippath\{(.+)/){
+ ($req_spath, $req_filename) = ($self->{snippath}{$srch_snippath}, $1);
+ last; }}
+ run_event('onRecurse', \%param);
+ if ($self->{recursion} || !$is_require) {
+ go($self->makeLocation($req_filename, $path, $req_spath), %param); }
+ }
+ }
+ run_event('onEveryLine', \%param) if ($param{in_module} || !$self->{onlyModuleLines});
+
+ last if (/\\end\{document\}/ && $self->{stopAtEnd});
+ $i++;
+ }
+ run_event('onEndFile', \%param);
+ $param{depth}--; return;
+ };
+
+ my %param = (pack=>$self, perm=>$self->{_AUX_DATA}, depth=>0, filecount=>0,
+ in_module=>0, module_nesting=>0);
+ run_event('onBegin', \%param);
+ go($self->makeLocation($file), %param);
+ run_event('onEnd', \%param);
+ return;
+}
+
+
+# add a [.tex] extension to the filename
+sub add_ext{
+ my ($self, $fn, $ext) = @_;
+ $ext = '.tex' unless $ext;
+ $fn.=$ext if $fn !~ /\Q$ext\E$/;
+ $fn; }
+
+# as long as the extension is .tex, drop it
+sub drop_ext{
+ my ($self, $filename) = @_;
+ while ($filename =~ /\.tex$/){
+ while ($filename !~ /\.$/ ) { chop($filename); }
+ chop($filename); }
+ $filename; }
+
+sub new_ext{
+ my ($self, $filename, $ext) = @_;
+ $self->add_ext($self->drop_ext($filename), $ext); }
+
+# location = pointer to array of strings
+# first element is filename; next are possible paths
+sub makeLocation{ my $self = shift; return \@_; }
+
+# read a location into an array of strings
+# aslo return filename and path to it (just in
+# case some changes were made to it, like adding
+# extension and/or relative paths)
+sub readLocation{
+ my ($self, $location) = @_;
+
+ my ($filename, @paths) = @{$location};
+ # try to add proper extension;
+ my $filename_ext = $self->new_ext($filename) unless -e $filename;
+ $filename = $filename_ext if $filename_ext && -e $filename_ext;
+
+ # try search paths
+ if (! -e $filename){
+ my $all_p = '';
+ foreach my $p(@paths){
+ $all_p .= $p;
+ $filename = $all_p.$filename and last if -e $all_p.$filename;
+ $filename = $p.$filename and last if -e $p.$filename;
+ if ($filename_ext){
+ $filename = $all_p.$filename_ext and last if -e $all_p.$filename_ext;
+ $filename = $p.$filename_ext and last if -e $p.$filename_ext; }
+ }}
+ # don't do the same work too many times
+ foreach my $file(@{$self->{loadedFiles}})
+ { return undef if $file eq $filename; }
+
+ push(@{$self->{loadedFiles}}, $filename);
+ open(FIN, $filename) or die "Cannot open '$filename'\n";
+ my @data = <FIN>;
+ close(FIN);
+
+ # find path of current file
+ my $path = dirname($filename);
+ $path.='/' if ($path ne '');
+
+ return ($filename, $path, @data);
+}
+
+1;
diff --git a/macros/latex/contrib/proposal/bin/README b/macros/latex/contrib/proposal/bin/README
new file mode 100644
index 0000000000..e33b26bf25
--- /dev/null
+++ b/macros/latex/contrib/proposal/bin/README
@@ -0,0 +1,32 @@
+This directory contains the binaries for the proposal class.
+
+We have three utilities:
+- filedate and checksum are for managing metadata in the
+ DTX files of the sTeX distribution (written in perl)
+- Modparse.pm is a perl library they depend on
+- generate-issues is a ruby library that generates issues
+ on http://github.com for the project (experimental)
+
+============== Details =================
+
+checksum
+ "enable, update, and disable checksums in DTX files"
+
+Usage:
+ checksum [options]
+
+Options:
+ -- disable disable the checksum by wrapping in \iffalse ... \fi
+ -- enable remove those again
+ -- update update to the correct checksum
+
+
+filedate <input filename> <newdate>
+
+Purpose:
+ Update the dates for a \ProvidePackage invocation in a given .dtx source
+
+Example:
+ filedate omdoc.dtx
+
+
diff --git a/macros/latex/contrib/proposal/bin/checksum b/macros/latex/contrib/proposal/bin/checksum
new file mode 100755
index 0000000000..9f0e533a8d
--- /dev/null
+++ b/macros/latex/contrib/proposal/bin/checksum
@@ -0,0 +1,71 @@
+#!/usr/bin/perl -w
+#######################################################################################
+# A tool for updating .dtx files with a correspodning checksum counter #
+# Copyright (c) 2010, Deyan Ginev, released under the Gnu General Public License (GPL)#
+# see http://www.gnu.org/copyleft/gpl.html #
+# $URL: https://svn.kwarc.info/repos/stex/trunk/bin/checksum$ #
+#######################################################################################
+
+use strict;
+
+use Getopt::Long;
+use Modparse;
+use Pod::Usage;
+use Cwd qw(abs_path);
+
+####### start of program #######
+my $mode = "update"; #Default is update
+my $action = { "update" => \&update, "disable" => \&disable, "enable"=>\&enable };
+GetOptions("disable" => sub { $mode="disable"; },
+ "enable" => sub { $mode="enable"; },
+ "update" => sub { $mode="update"; });
+
+
+my ($path) = @ARGV;
+$path = abs_path($path);
+my ($volume,$dir,$file) = File::Spec->splitpath( $path );
+my @lines = `cd $dir; pdflatex "\\nonstopmode\\input{$file}"` if ($mode eq "update");
+my ($checksum) = map {$_=~/^\* The checksum should be (\d+)!/; $1;} grep ($_ =~ /^\* The checksum should be (\d+)!/,@lines) if @lines;
+if (!$checksum) {
+#One more possible error message:
+ ($checksum) = map {$_=~/^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./; $2;} grep ($_ =~ /^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./,@lines) if @lines;
+}
+open(IN,"<$path") or die "Cannot open DTX source: $path\n";
+@lines = ();
+while (<IN>) {
+ push @lines, &{$$action{$mode}}($_,$checksum);
+}
+close(IN);
+open(OUT,">$path") or die "Cannot write to DTX target: $path\n";
+print OUT join("",@lines);
+close(OUT);
+######### Subroutines ############
+sub update {
+ my $checksum=$_[1];
+ $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/ if $checksum;
+ $_[0];
+}
+
+sub disable {
+ $_[0]=~s/\\CheckSum\{(\d*)\}/\\iffalse\\CheckSum\{$1}\\fi/ unless $_[0]=~/\\iffalse\\CheckSum\{(\d*)\}\\fi/;
+ $_[0];
+}
+
+sub enable {
+ $_[0]=~s/\\iffalse\\CheckSum\{(\d*)\}\\fi/\\CheckSum{$1}/;
+ $_[0];
+}
+
+
+__END__
+
+
+=head1 SYNOPSIS
+
+checksum <input filename> --update|enable|disable
+
+Purpose:
+ Update, enable or disable the \CheckSum macro for a given .dtx source
+
+Example:
+ checksum omd.dtx --update
diff --git a/macros/latex/contrib/proposal/bin/filedate b/macros/latex/contrib/proposal/bin/filedate
new file mode 100755
index 0000000000..af49b6550d
--- /dev/null
+++ b/macros/latex/contrib/proposal/bin/filedate
@@ -0,0 +1,45 @@
+#!/usr/bin/perl -w
+#######################################################################################
+# A tool for updating .dtx files with a given package date. #
+# Copyright (c) 2010, Deyan Ginev, released under the Gnu General Public License (GPL)#
+# see http://www.gnu.org/copyleft/gpl.html #
+# $URL: https://svn.kwarc.info/repos/stex/trunk/bin/filedate$ #
+#######################################################################################
+
+use strict;
+
+use Getopt::Long;
+use Modparse;
+use Pod::Usage;
+use Cwd qw(abs_path);
+
+my ($file) = @ARGV;
+my $date = `git log --format='%ai' $file`;
+$date = substr($date, 0, index($date, ' '));
+$date =~ s/-/\//g;
+$file = abs_path($file);
+open(IN,"<$file");
+my @lines = ();
+while (<IN>) {
+ if ($_ =~ /\\Provides(Package|Class)/) {
+ $_ =~ s/\[(.*?)\s/\[$date /;
+ }
+ push @lines, $_;
+}
+close(IN);
+open(OUT,">$file");
+print OUT join("",@lines);
+close(OUT);
+
+__END__
+
+
+=head1 SYNOPSIS
+
+filedate <input filename> <newdate>
+
+Purpose:
+ Update the dates for a \ProvidePackage invocation in a given .dtx source
+
+Example:
+ filedate omdoc.dtx
diff --git a/macros/latex/contrib/proposal/bin/generate-issues b/macros/latex/contrib/proposal/bin/generate-issues
new file mode 100755
index 0000000000..84ebfd80fd
--- /dev/null
+++ b/macros/latex/contrib/proposal/bin/generate-issues
@@ -0,0 +1,470 @@
+#!/usr/bin/env ruby
+# Generate GitHub Issues for tasks and deliverables
+# - Each work package gets a WPX/README.md file
+# - Each task gets an Issue
+# - Each deliverable gets a Milestone
+# - Each deliverable gets an Issue associated with its Milestone
+# - Each deliverable Issue gets 'deliverable', 'WPX' tags
+# - Each task Issue gets 'task', 'WPX' tags
+
+# Run me from the proposal dir containing proposal.pdata:
+# cd ~/OpenDreamKit/Proposal
+# ~/path/to/LaTeX-Proposal/bin/generate-issues
+
+require 'date'
+require 'Octokit'
+require 'netrc'
+
+# constants for running the script are for OpenDreamKit
+# update these for your own proposal
+
+START_DATE = Date::new(2015, 9, 1) # start date of the project
+HOMEPAGE = "http://opendreamkit.org"
+PROPOSAL_URL = "https://github.com/OpenDreamKit/OpenDreamKit/raw/master/Proposal/proposal-www.pdf"
+PROJECT = "OpenDreamKit"
+REPO = "OpenDreamKit/OpenDreamKit"
+TARGET = "final" # or 'proposal'
+
+# throttle github creation requests to 5 Hz to avoid getting flagged for abuse
+THROTTLE_SECONDS = 5
+
+NATURES = {
+ 'R' => 'Report',
+ 'DEM' => 'Demonstrator',
+ 'DEC' => 'Websites, Media, etc.',
+ 'OTHER' => 'Other',
+}
+
+DISSEMINATIONS = {
+ 'PU' => 'Public',
+ 'CO' => 'Confidential',
+ 'CI' => 'Classified',
+}
+
+SITES = {
+ 'PS' => 'Université Paris-Sud',
+ 'LL' => 'Logilab',
+ 'UV' => 'Université de Versailles Saint-Quentin',
+ 'UJF' => 'Université Joseph Fourier',
+ 'UB' => 'CNRS',
+ 'UO' => 'University of Oxford',
+ 'USH' => 'University of Sheffield',
+ 'USO' => 'University of Southampton',
+ 'SA' => 'University of St Andrews',
+ 'UW' => 'University of Warwick',
+ 'JU' => 'Jacobs University Bremen',
+ 'UK' => 'University of Kaiserslautern',
+ 'US' => 'University of Silesia',
+ 'ZH' => 'Universität Zürich',
+ 'SR' => 'Simula Research Laboratory',
+}
+
+REVERSE_SITES = {}
+SITES.each_pair do |key, name|
+ REVERSE_SITES[name] = key
+end
+
+# Some sites would prefer alternative abbreviations
+REVERSE_SITES['University of St Andrews'] = 'USTAN'
+REVERSE_SITES['Université de Versailles Saint-Quentin'] = 'UVSQ'
+
+#------------------- Parsing proposal.pdata ---------------------
+
+def split_line(line)
+ # super primitive state-machine line split (not going to regex this)
+ parts = []
+ level = 0
+ buffer = []
+ line.each_char do |c|
+ case c
+ when '{'
+ if level > 0
+ buffer.push c
+ end
+ level += 1
+ when '}'
+ level -= 1
+ if level > 0
+ buffer.push c
+ end
+ if level == 0
+ parts.push(scrub_tex(buffer.join('')))
+ buffer = []
+ end
+ else
+ if level > 0
+ buffer.push c
+ end
+ end
+ end
+ return parts
+end
+
+
+def scrub_tex(text)
+ # scrub some latex markup from text
+ text.gsub!(/\\\w+/, '')
+ text.gsub!(/[{}]/, '')
+ text.strip.split.join(' ')
+end
+
+
+def transform_value(key, value)
+ case key
+ when 'lead'
+ return SITES[value]
+ when 'partners'
+ return value.split(',').map { |v| SITES[v] }
+ when 'dissem'
+ return DISSEMINATIONS[value]
+ when 'nature'
+ return NATURES[value]
+ when 'month'
+ return value.to_i
+ when 'delivs'
+ return value.split(',')
+ else
+ return scrub_tex(value)
+ end
+end
+
+
+def load_pdata(proposal_dir)
+ pdata = File.join(proposal_dir, "#{TARGET}.pdata")
+ deliv_data = File.join(proposal_dir, "#{TARGET}.deliverables")
+
+ workpackages = {} # mapping of workpackage id => wp info
+ deliverables = {}
+
+ File.readlines(pdata).each do |line|
+ key, *args = split_line line
+
+ case key
+ when 'wp'
+ name, key, value = args
+ value = transform_value(key, value)
+ if not workpackages.include? name
+ workpackages[name] = {
+ "tasks" => {},
+ "unknown-task" => nil,
+ "deliverables" => [],
+ }
+ end
+ wp = workpackages[name]
+ wp[key] = value
+
+ when 'task'
+ name, key, value = args
+ value = transform_value(key, value)
+ # find my workpackage
+ if name.index('@')
+ wpkey, short_name = name.split('@')
+ if short_name.match(/task\d+/)
+ workpackages[wpkey]['unknown-task'] = short_name
+ name = short_name
+ end
+ else
+ wpkey = workpackages.keys.select { |wpkey| name.start_with? wpkey }.first
+ end
+ # handle workpackage@taskNN weirdness
+ wp = workpackages[wpkey]
+ tasks = wp['tasks']
+ if not wp['unknown-task'].nil? and wp['unknown-task'] != name
+ tasks[name] = tasks.delete(wp['unknown-task'])
+ wp['unknown-task'] = nil
+ end
+ if not tasks.include? name
+ tasks[name] = {}
+ end
+ tasks[name][key] = value
+ when 'deliv'
+ name, key, value = args
+
+ value = transform_value(key, value)
+ if not deliverables.include? name
+ deliverables[name] = {}
+ end
+ deliverables[name][key] = value
+
+ else
+ # DEBUG:
+ # puts " Ignored: #{args}"
+ end
+ end
+
+ # get deliverable data, workpackage id from proposal.deliverables
+ File.readlines(deliv_data).each do |line|
+ args = split_line line
+ name = args[3]
+ if deliverables.include? name
+ deliverable = deliverables[name]
+ else
+ deliverable = {}
+ end
+ month = args[0].to_i
+ deliverable = (deliverables[name] or {}).merge({
+ "month" => month,
+ # due date is last day of the given month, so subtract one day
+ "due_date" => (START_DATE >> month) - 1,
+ "label" => scrub_tex(args[2]),
+ "deliv_id" => args[3],
+ "dissem" => transform_value('dissem', args[4]),
+ "nature" => transform_value('nature', args[5]),
+ "title" => scrub_tex(args[6]),
+ "lead" => SITES[scrub_tex(args[8])],
+ })
+ wpid = scrub_tex(args[7])
+ wp = workpackages.values.find {|wp| wp['label'] == wpid}
+ wp['deliverables'].push(deliverable)
+ end
+
+ workpackages.values.each do |wp|
+ wp['deliverables'].sort_by! {|d| d['label']}
+ end
+
+ return workpackages.values.sort_by {|wp| wp['label']}
+end
+
+
+#--------------- GitHub-related ---------------------
+
+def check_token
+ # get GitHub auth token, creating one if we don't find it.
+ rc = Netrc.read Netrc.default_path
+ if not rc['api.github.com'].nil?
+ return
+ end
+ puts "We need your password to generate an OAuth token. The password will not be stored."
+ username = ask "Username: "
+ password = ask("Password: ") { |q| q.echo = '*' }
+ client = Octokit::Client.new(
+ :login => username,
+ :password => password,
+ )
+ reply = client.create_authorization(
+ :scopes => ["public_repo"],
+ :note => "Issue Migration",
+ )
+ token = reply.token
+ rc['api.github.com'] = username, token
+ rc.save
+end
+
+$cache = {
+ 'issues' => {},
+ 'milestones' => {},
+}
+
+def get_issues(github, repo)
+ # get issues for a repo (cached)
+ cache = $cache['issues']
+ if not cache.include? repo
+ cache[repo] = github.issues(repo)
+ end
+ return cache[repo]
+end
+
+def get_milestones(github, repo)
+ # get issues for a repo (cached)
+ cache = $cache['milestones']
+ if not cache.include? repo
+ cache[repo] = github.list_milestones(repo)
+ end
+ return cache[repo]
+end
+
+# Templates for making readmes, issues
+
+README_TPL = <<-END
+# %{title}
+
+Lead Institution: %{lead}
+
+See page %{page} of the [proposal](#{PROPOSAL_URL}) for the full description.
+END
+
+TASK_TPL = <<-END
+- **%{wplabel}:** [%{wptitle}](https://github.com/#{REPO}/tree/master/%{wplabel})
+- **Lead Institution:** %{lead}
+- **Partners:** %{partners}
+- **Work phases:** %{wphases}
+
+See page %{page} of the [proposal](#{PROPOSAL_URL}) for the full description.
+END
+
+DELIV_TPL = <<-END
+- **%{wplabel}:** [%{wptitle}](https://github.com/#{REPO}/tree/master/%{wplabel})
+- **Lead Institution:** %{lead}
+- **Due:** %{date} (month %{month})
+- **Nature:** %{nature}
+
+See page %{page} of the [proposal](#{PROPOSAL_URL}) for the full description.
+END
+
+DELIV_MILESTONE_TPL = "# %{title}\n\n#{DELIV_TPL}"
+
+
+def make_task_issue(github, repo, task, workpackage, options)
+ title = "#{task['label']}: #{task['title']}"
+ issues = get_issues(github, repo)
+ issue = issues.find { |i| i.title.start_with?(task['label'] + ':') }
+ if issue.nil?
+ body = TASK_TPL % {
+ wplabel: workpackage['label'],
+ wptitle: workpackage['title'],
+ lead: task['lead'],
+ page: task['page'],
+ wphases: task['wphases'],
+ partners: (task['partners'] or ['None']).join(', ')
+ }
+ puts "\n\nMaking Issue on #{repo}: #{title}"
+ puts body
+
+ github.create_issue(repo, title, body, options)
+ # throttle creation calls to avoid flags for abuse
+ sleep THROTTLE_SECONDS
+ else
+ puts "Found Issue #{repo}##{issue.number}: #{issue.title}"
+ existing_labels = issue.labels.map { |label| label['name']}
+ missing_labels = options[:labels].reject { |label| existing_labels.include? label }
+ if not missing_labels.empty?
+ puts "Updating milestone, labels on #{repo}##{issue.number}"
+ github.update_issue(repo, issue.number, options)
+ sleep THROTTLE_SECONDS
+ end
+ end
+end
+
+
+def make_deliverable_issue(github, repo, deliverable, workpackage, options)
+ title = "#{deliverable['label']}: #{deliverable['title']}"
+ issues = get_issues(github, repo)
+ issue = issues.find { |i| i.title.start_with?(deliverable['label'] + ':') }
+ if issue.nil?
+ body = DELIV_TPL % {
+ wplabel: workpackage['label'],
+ wptitle: workpackage['title'],
+ lead: deliverable['lead'],
+ date: deliverable['due_date'],
+ month: deliverable['month'],
+ nature: deliverable['nature'],
+ page: deliverable['page'],
+ }
+ puts "\n\nMaking Issue on #{repo}: #{title}"
+ puts body
+ github.create_issue(repo, title, body, options)
+ # throttle creation calls to avoid flags for abuse
+ sleep THROTTLE_SECONDS
+ else
+ puts "Found Issue #{repo}##{issue.number}: #{issue.title}"
+ existing_labels = issue.labels.map { |label| label['name']}
+ missing_labels = options[:labels].reject { |label| existing_labels.include? label }
+ if issue.milestone.nil? or not missing_labels.empty?
+ puts "Updating milestone, labels on #{repo}##{issue.number}"
+ github.update_issue(repo, issue.number, options)
+ sleep THROTTLE_SECONDS
+ end
+ end
+end
+
+
+def make_deliverable_milestone(github, repo, deliverable, workpackage)
+ title = deliverable['label']
+
+ milestone = get_milestones(github, repo).find { |ms| ms.title == title }
+ if milestone.nil?
+ puts "Making milestone on #{repo}: #{title}"
+ body = DELIV_MILESTONE_TPL % {
+ wplabel: workpackage['label'],
+ wptitle: workpackage['title'],
+ title: deliverable['title'],
+ lead: deliverable['lead'],
+ date: deliverable['due_date'],
+ month: deliverable['month'],
+ nature: deliverable['nature'],
+ page: deliverable['page'],
+ }
+
+ milestone = github.create_milestone(repo, title,
+ :due_on => deliverable['due_date'],
+ :description => body,
+ )
+ # throttle creation calls to avoid flags for abuse
+ sleep THROTTLE_SECONDS
+ else
+ puts "Milestone #{repo}@#{title} exists"
+ end
+ return milestone.number
+end
+
+
+def populate_workpackage(github, repo, workpackage)
+ # populate issues for a given workpackage
+ label = workpackage['label']
+
+ readme_path = "#{label}/README.md"
+ begin
+ github.contents(repo, :path => readme_path)
+ rescue Octokit::NotFound
+ readme = README_TPL % {
+ title: "#{workpackage['label']}: #{workpackage['title']}",
+ lead: workpackage['lead'],
+ page: workpackage['page'],
+ }
+
+ puts "Creating readme at #{repo}/#{readme_path}"
+ puts readme
+ github.create_contents(repo, readme_path, "Creating #{readme_path}", readme)
+ # throttle creation calls to avoid flags for abuse
+ sleep THROTTLE_SECONDS
+ end
+
+ workpackage['tasks'].each_value do |task|
+ org_labels = [REVERSE_SITES[task['lead']]] + \
+ (task['partners'] or []).map {|site| REVERSE_SITES[site]}
+
+ make_task_issue(github, repo, task, workpackage,
+ :labels => [
+ 'task',
+ workpackage['label'],
+ ] + org_labels
+ )
+ end
+ workpackage['deliverables'].each do |deliverable|
+ milestone = make_deliverable_milestone(github, repo, deliverable, workpackage)
+ make_deliverable_issue(github, repo, deliverable, workpackage, {
+ :milestone => milestone,
+ :labels => [
+ 'deliverable',
+ workpackage['label'],
+ REVERSE_SITES[deliverable['lead']]
+ ]
+ })
+ end
+end
+
+
+def main(proposal_dir)
+ # run the whole thing
+
+ # verify that there's a GitHub token in .netrc
+ check_token
+
+ # create client
+ github = Octokit::Client.new(:netrc => true)
+ github.auto_paginate = true
+
+ load_pdata(proposal_dir).each do |wp|
+ populate_workpackage(github, REPO, wp)
+ end
+end
+
+if __FILE__ == $0
+ puts ARGV
+ if ARGV.length > 1
+ proposal_dir = ARGV[1]
+ else
+ proposal_dir = '.'
+ end
+ main(proposal_dir)
+end \ No newline at end of file
diff --git a/macros/latex/contrib/proposal/dfg/README b/macros/latex/contrib/proposal/dfg/README
new file mode 100644
index 0000000000..86dafab655
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/README
@@ -0,0 +1,15 @@
+dfgproposal.cls: A class for preparing DFG proposals for collaborative projects
+dfgreporting.cls: A class for reporting on DFG projects.
+
+The dfgproposal and dfgreporting classes supports many of the specific elements of an
+Einzelantrag to the DFG and the respective reporting documents. It is optimized towards
+collaborative projects. The package comes with extensive examples. To start a new proposal
+or report just copy the respective directory and modify. Note that the structure of EU
+proposals changes from time to time, so that the examples may be out of date.
+
+Copyright(c) 2010 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/dfg
+
diff --git a/macros/latex/contrib/proposal/dfg/dfgproposal.dtx b/macros/latex/contrib/proposal/dfg/dfgproposal.dtx
new file mode 100644
index 0000000000..63e6a46ead
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/dfgproposal.dtx
@@ -0,0 +1,622 @@
+% \iffalse meta-comment
+% A class for preparing DFG proposals
+%
+% Copyright (c) 2011 Michael Kohlhase, all rights reserved
+%
+% This file is distributed under the terms of the LaTeX Project Public
+% License from CTAN archives in directory macros/latex/base/lppl.txt.
+% Either version 1.0 or, at your option, any later version.
+%
+% The development version of this file can be found at
+% https://github.com/KWARC/LaTeX-proposal
+% \fi
+%
+% \iffalse
+%<cls|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<cls>\ProvidesClass{dfgproposal}[2016/04/15 v1.4 DFG Proposal]
+%<pdata>\ProvidesPackage{dfgpdata}[2016/04/15 v1.4 DFG Project Data]
+%<reporting>\ProvidesPackage{dfgreporting}[2016/04/15 v1.4 DFG Project Reporting]
+%<*driver>
+\documentclass[twoside]{ltxdoc}
+\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
+\DoNotIndex{\begin,\AtEndDocument,\newcommand,\newcounter,\stepcounter}
+\DoNotIndex{\immediate,\openout,\closeout,\message,\typeout}
+\DoNotIndex{\section,\scshape,\arabic}
+\EnableCrossrefs
+%\CodelineIndex
+%\OnlyDescription
+\RecordChanges
+\usepackage{textcomp,url,paralist,a4wide,xspace}
+\usepackage[show]{ed}
+\usepackage[maxnames=6,hyperref=auto,style=alphabetic,backend=bibtex]{biblatex}
+\addbibresource{../lib/proposal.bib}
+\usepackage[bookmarks=true,linkcolor=blue,
+ citecolor=blue,urlcolor=blue,colorlinks=true,
+ breaklinks=true, bookmarksopen=true]{hyperref}
+\makeindex
+\newcommand\subversion{\textsc{Subversion}\xspace}
+\begin{document}
+\DocInput{dfgproposal.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\CheckSum{629}
+%
+% \changes{v1.1}{2011/03/18}{separating out from new proposal class}
+% \changes{v1.1}{2011/12/09}{various tweaks and corrections}
+%
+% \GetFileInfo{dfgproposal.cls}
+%
+% \MakeShortVerb{\|}
+%
+% \title{Preparing DFG Proposals and Reports in {\LaTeX} with \texttt{dfgproposal.cls}}
+% \author{Michael Kohlhase\\
+% Computer Science, Jacobs University Bremen\\
+% \url{http://kwarc.info/kohlhase}}
+% \maketitle
+%
+% \begin{abstract}
+% The |dfgproposal| class supports many of the specific elements of a DFG Proposal. It
+% is optimized towards collaborative projects. The package comes with an extensive
+% example (a fake DFG proposal) that shows all elements in action.
+% \end{abstract}
+%
+% \tableofcontents\newpage
+%
+% \section{Introduction}\label{sec:intro}
+%
+% Writing grant proposals is a collaborative effort that requires the integration of
+% contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
+% allows to coordinate the process via a source code control system like
+% \subversion, allowing the proposal writing team to concentrate on the contents
+% rather than the mechanics of wrangling with text fragments and revisions.
+%
+% The |dfgproposal| class extends the |proposal| class~\cite{Kohlhase:pplp:ctan} and
+% supports many of the specific elements of a DFG Proposal. The package documentation
+% is still preliminary, fragmented and incomplete and only dwells on the particulars of
+% DFG proposals, so we treat~\cite{Kohlhase:pplp:ctan} as a prerequisite. Please consult
+% the example proposal |dfg/proposal.tex|, which comes with the package and shows the usage of
+% the class in action. It is intended as a template for your proposal, but please bear in
+% mind that the DFG guidelines may change, if in doubt, please consult the DFG guide for
+% proposers~\cite{DFG:102e}.
+%
+% The |dfgreporting| class supports most of the specific elements of the final project
+% reports to the DFG. The example report |dfg/finalreport.tex| is intended as a template
+% for your final report, the DFG guide~\cite[pp. 9f]{DFG:2012e} gives details (the German
+% Version~\cite[pp. 23ff]{DFG:201} has more).
+%
+% The |dfgproposal| and |dfgreporting| classes and the |dfgpdata| package are distributed
+% under the terms of the LaTeX Project Public License from CTAN archives in directory
+% |macros/latex/base/lppl.txt|. Either version 1.0 or, at your option, any later
+% version. The CTAN archive always contains the latest stable version, the development
+% version can be found at \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports
+% please use the sTeX TRAC at \url{https://github.com/KWARC/LaTeX-proposal/issues}.
+%
+% \section{The User Interface}\label{sec:user-interface}
+%
+% In this section we will describe the functionality offered by the |dfgproposal| class
+% along the lines of the macros and environments the class provides. Much of the
+% functionality can better be understood by studying the functional example |proposal.tex|
+% (and its dependents) that comes with the |dfgproposal| package in conjunction with the
+% proposer's leaflet of the DFG~\cite{DFG:102e} (we have included it as |1_02e.pdf| for
+% convenience into the package distribution).\ednote{talk about reporting as well.}
+%
+% \subsection{Package Options}\label{sec:user:options}
+%
+% As usual in {\LaTeX}, the package is loaded by
+% |\documentclass[|\meta{options}|]{dfgproposal}|, where |[|\meta{options}|]| is optional
+% and gives a comma separated list of options specified in~\cite{Kohlhase:pplp:ctan}. The
+% |dfgproposal| class adds the two options
+% \begin{compactenum}
+% \item \DescribeMacro{general}|general|, which allows generates a first section with
+% general proposal metadata (as the old form proposals required). This is useful to
+% check all the data (and have a place to copy/paste from).
+% \item \DescribeMacro{german}|german|, which makes all the generated parts in German.
+% \end{compactenum}
+%
+% \subsection{Proposal Metadata and Title page}\label{sec:user:metadata}
+%
+% The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal|
+% environment, which also generates the title page and the first section of the proposal
+% as well as the last pages of the proposal with the signatures, enclosures, and
+% references. The |proposal| environment should contain all the mandatory parts of the
+% proposal text. The |proposal| environment uses the following DFG-specific keys to
+% specify metadata.
+% \begin{compactitem}
+% \item \DescribeMacro{thema}|thema| for a concise (up to 140 characters) description of
+% the topic of the proposal. This has to be in German and will be used by the DFG in
+% internal communications and publications.
+% \end{compactitem}
+%
+% \subsection{Project-Related Papers}\label{sec:user:papers}
+%
+% Since August 2010, DFG requests list of ``project-related papers'' as section 2.2. We
+% use the |biblatex| package to automate this. We only need to use
+% \DescribeMacro{\dfgprojpapers}|\dfgprojpapers{|\meta{keys}|}|, where \meta{keys} is a
+% comma-separated list of keys from the bibTeX database used in the proposal. Note that
+% you will have to run |bibtex -min-crossrefs=999 proposal1-blx.aux| to generate file
+% |proposal1.bbl| that generates the bibliography list. To automate this (at least on Unix
+% systems), we have added the field |Makefile.template|, which allows you do do any
+% necessary steps by just typing |make|.
+%
+% The papers listed in |\dfgprojpapers| are put into a special bib\LaTeX category
+% \DescribeMacro{featured}|featured|, and can thus be excluded from the general
+% bibliography by adding |notcategory=featured| to the final |\printbibliography|.
+%
+% \subsection{Final Report Infrastructure}\label{sec:user:report}
+%
+% The |dfgreporting| class gives an infrastructure for writing final reports of completed
+% projects (see the file |finalreport.tex| in the package distribution). The
+% \DescribeEnv{finalreport}|finalreport| environment has functionality analogous to the
+% |proposal| environment. It takes the same metadata keys --- making it easy to generate
+% by copy/paste from the proposal --- but adds the keys
+% \DescribeMacro{reportperiod}|reportperiod| for specifying the funded period,
+% \DescribeMacro{applareas}|applareas| for the application areas, and
+% \DescribeMacro{*employed}\meta{site}|employed| for all sites \meta{site}. The latter
+% allow to specify the employee and their employment times. Furthermore, the key
+% \DescribeMacro{key}|key| can be used to specify the reference key (something like
+% \texttt{KO 2428 47-11}) given to the project by DFG. Note that in the case of multiple
+% proposers, you can use multiple instances of |key| to specify more than one reference
+% key.
+%
+% \section{Limitations and Enhancements}\label{sec:limitations}
+%
+% The |dfgproposal| is relatively early in its development, and many enhancements are
+% conceivable. We will list them here.
+% \begin{enumerate}
+% \item Some people still want to write their proposal and reports in German, for that it
+% would be nice to have a localized version.
+% \item it would be nice if we could count the characters in the places where lengths are
+% restricted (|Abriss|, and |thema|). Then we could warn the authors.
+% \end{enumerate}
+% If you have other enhancements to propose or feel you can alleviate some limitation,
+% please feel free to contact the author.
+%
+%\section*{Acknowledgements}
+%
+% The following persons have contributed suggestions and fixes to the |dfgproposal| class:
+% Florian Rabe, Christoph Lange, Andrea Kohlhase, Jens Lehmann.
+%
+% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage
+%
+% \section{The Implementation}\label{sec:implementation}
+%
+% In this section we describe the implementation of the functionality of the |dfgproposal|
+% and |dfgreporting| classes and the |dfgpdata| package.
+%
+% \subsection{Package Options and Format Initialization}\label{sec:impl:options}
+%
+% We first set up the options for the package.
+%
+% \begin{macrocode}
+%<cls>\newif\ifgeneral\generalfalse
+%<cls>\DeclareOption{general}{\generaltrue}
+%<cls|reporting>\DeclareOption{german}{\PassOptionsToPackage{\CurrentOption}{dfgpdata}}
+%<cls>\DeclareOption*{\PassOptionsToClass{\CurrentOption}{proposal}}
+%<reporting>\DeclareOption*{\PassOptionsToClass{\CurrentOption}{reporting}}
+%<pdata>\newif\ifdeutsch\deutschfalse
+%<pdata>\DeclareOption{german}{\deutschtrue\message{Deutscher Antrag}}
+%<cls|reporting|pdata>\ProcessOptions
+% \end{macrocode}
+%
+% Then we load the packages we make use of
+%
+% \begin{macrocode}
+%<cls>\LoadClass{proposal}
+%<reporting>\LoadClass{reporting}
+%<*cls|reporting>
+\RequirePackage{eurosym}
+\RequirePackage{dfgpdata}
+\ifdeutsch\RequirePackage[ngerman]{babel}
+\else\RequirePackage[ngerman,USenglish]{babel}\fi
+%</cls|reporting>
+% \end{macrocode}
+%
+% \subsection{Proposal Metadata}\label{sec:impl:metadata}
+%
+% We extend the metadata keys from the |proposal| class.
+% \begin{macrocode}
+%<*pdata>
+\define@key{prop@gen}{thema}{\def\prop@gen@thema{#1}\pdata@def{prop}{gen}{thema}{#1}}
+%</pdata>
+% \end{macrocode}
+% and now the ones for the final report
+% \begin{macrocode}
+%<*reporting>
+\define@key{prop@gen}{reportperiod}{\def\prop@gen@reportperiod{#1}}
+\define@key{prop@gen}{applareas}{\def\prop@gen@applareas{#1}}
+\define@key{prop@gen}{key}{\@dmp{key=#1}%
+\@ifundefined{prop@gen@keys}{\xdef\prop@gen@keys{#1}}{\xdef\prop@gen@keys{\prop@gen@keys,#1}}}
+\define@key{prop@gen}{coop}{\@dmp{coop=#1}%
+\@ifundefined{prop@gen@coops}{\xdef\prop@gen@coops{{#1}}}{\xdef\prop@gen@coops{\prop@gen@coops,{#1}}}}
+\define@key{prop@gen}{projpapers}{\def\prop@gen@projpapers{#1}}
+%</reporting>
+% \end{macrocode}
+%
+% and the default values, these will be used, if the author does not specify something
+% better.
+%
+% \begin{macrocode}
+%<*pdata>
+\renewcommand\prop@gen@instrument{Neuantrag auf Sachbeihilfe}
+\newcommand\prop@gen@thema{??? Thema ???}
+\newcommand\deu[1]{#1}
+% \end{macrocode}
+%
+% Now, we can build the title page and general information, we first start with the
+% applicants table. The following macros build up the lines to be used in the table
+% eventually.
+% \begin{macro}{\dfg@applicants@*}
+% the macros use the |\prop@tl| macro from the base |proposal| package which iterates
+% over the first argument (the PIs here) building up lines with the material from the
+% second argument (where |\tl@ext| is the current PI).
+% \begin{macrocode}
+\newcommand\dfg@applicants@lines{%
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{personaltitle} \wa@ref{person}\tl@ext{name}}\\
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{academictitle}}\\
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{birthdate}}\\}
+\newcommand\dfg@applicants@institute@lines{%
+\prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{shortname}}\\
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{workaddress}}\\
+\prop@tl\prop@gen@PIs{Tel: \wa@ref{person}\tl@ext{worktel}}\\
+\prop@tl\prop@gen@PIs{Fax: \wa@ref{person}\tl@ext{workfax}}\\
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{email}}\\}
+\newcommand\dfg@applicants@private@lines{%
+\prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{privaddress}}\\
+\prop@tl\prop@gen@PIs{Tel: \wa@ref{person}\tl@ext{privtel}}\\}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dfg@applicants}
+% We automatically make it plurals if there is more than one PI and we indicate a joint
+% proposal if there is more than one site.
+% \begin{macrocode}
+\newcommand\dfg@applicants{%
+\subsection{\if@sites\ifnum\the@sites>1 Joint Proposal; \fi\fi%
+Applicant\if@sites\ifnum\the@PIs>1{s}\fi\fi\ \deu{(Antragsteller)}}%
+\dfg@applicants@table}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\newcommand\dfg@topic{\subsection{\ifdeutsch Thema\else Topic \deu{(Thema)}\fi}\prop@gen@thema}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\dfg@area@field{%
+\ifdeutsch\subsection{Fachgebiet und Arbeitsrichtung}\else
+\subsection{Research area and field of work \deu{(Fachgebiet und Arbeitsrichtung)}}\fi
+\ifdeutsch Disziplin\else Scientific discipline\fi: \prop@gen@discipline\\
+\ifdeutsch Arbeitsgebiet\else Fields of work\fi: \prop@gen@areas}
+%</pdata>
+% \end{macrocode}
+%
+% \begin{environment}{sitedescription}
+% \ednote{this code should probably be refactored into proposal.dtx}
+% \begin{macrocode}
+%<*cls>
+\newenvironment{sitedescription}[2][]%
+{\def\@test{#1}\def\@@title{\ifx\@test\@empty\wa@ref{institution}{#2}{acronym}\else #1\fi:
+\textsc{\wa@ref{institution}{#2}{name}}}
+\@for\@I:=#2\do{\pdata@target{site}\@I{}}\subsubsection\@@title}
+{}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Proposal Title Page}\label{sec:impl:proptitlepage}
+%
+% \begin{macro}{\dfg@applicants@table}
+% Now, we can build the title page and general information, we first start with the
+% applicants table: We first compute the width of the columns for the case where we have
+% more than two PIs. Then we add the lines we compute with the auxiliary macros
+% |\dfg@applicants@lines|, |\dfg@applicants@institute@lines| and
+% |\dfg@applicants@private@lines|
+% \begin{macrocode}
+\newlength\applicants@table@columnwidth
+\newcommand\dfg@applicants@table%
+{\setlength\applicants@table@columnwidth\textwidth
+\advance\applicants@table@columnwidth by -6em
+\divide\applicants@table@columnwidth by \the@PIs
+\ifnum\the@PIs>2\begin{tabular}{|l|*{\the@PIs}{p{\applicants@table@columnwidth}|}}
+\else\begin{tabular}{|l|*{\the@PIs}{l|}}\fi
+\hline
+\dfg@applicants@lines\hline
+&\multicolumn{\the@PIs}{|l|}{\textbf{Work Address\deu{ (Dienstanschrift)}:}}\\\hline
+\dfg@applicants@institute@lines\hline
+&\multicolumn{\the@PIs}{|l|}{\textbf{Private Address\deu{ (Privatanschrift)}:}}\\\hline
+\dfg@applicants@private@lines\hline
+\end{tabular}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{prop@proposal}
+% This internal environment is called in the |proposal| environment from the |proposal|
+% class.
+% \begin{macrocode}
+\renewenvironment{prop@proposal}
+{\thispagestyle{empty}%
+\begin{center}
+{\LARGE \prop@gen@instrument}\\[.2cm]
+{\LARGE\textbf{\prop@gen@title}}\\[.3cm]
+{\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
+{\large\today}\\[1em]
+\WAauthorblock[aff]\prop@gen@PIs\\[2cm]
+\end{center}
+\edef\keep@tocdepth{\value{tocdepth}}
+\setcounter{tocdepth}{2}\tableofcontents
+\setcounter{tocdepth}{\keep@tocdepth}
+\ifgeneral\setcounter{section}{-1}
+\newpage\thispagestyle{empty}
+\ifdeutsch\section{Allgemeine Angaben (nur f\"ur ELAN)}\else
+\section{General Information (for the ELAN system only)}\fi
+\dfg@applicants
+\dfg@topic
+\dfg@area@field
+\ifdeutsch\subsection{Voraussichtliche Gesamtdauer}\else
+\subsection{Anticipated total duration \deu{(Voraussichtliche Gesamtdauer)}}
+\fi
+\@ifundefined{prop@gen@totalduration}{????}{\prop@gen@totalduration};
+\ifdeutsch
+\@ifundefined{prop@gen@since}{Erstantrag}{Fortsetungsantrag, das Project l\"auft seit
+ \prop@gen@since.}
+\else
+\@ifundefined{prop@gen@since}{initial proposal}{continuation proposal, the project started
+ \prop@gen@since.}
+\fi
+\ifdeutsch\subsection{Antragszeitraum}\else
+\subsection{Application period \deu{(Antragszeitraum)}}\fi
+\prop@gen@months\quad Months starting \prop@gen@start
+\@ifundefined{prop@gen@fundsuntil}{}
+{ (\ifdeutsch Mittel reichen bis\else funds last until\fi\ \prop@gen@fundsuntil)}
+\ifdeutsch\else\selectlanguage{USenglish}\fi
+\newpage\fi%ifgeneral
+\setcounter{page}{0}}
+{}
+% \end{macrocode}
+% \end{environment}
+% We also need to translate some of the generated parts
+% \begin{macrocode}
+\ifdeutsch
+\def\prop@warnpubs@message{Viele der Publikationen der Antragsteller sind verf\"ugbar unter folgenden URLs:}
+\def\prop@warnpubs@title{Literatur}
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\attachments}
+% \ednote{MK: this is deprecated (no longer useful with the ELAN system), delete at some time}
+% \begin{macrocode}
+\newcommand\attachments{\ifdeutsch\section{Verzeichnis der Anlagen}\else
+\section{List of Attachments \deu{(Verzeichnis der Anlagen)}}\fi
+\begin{itemize}
+\@for\@I:=\prop@gen@PIs\do{%
+ \item\ifdeutsch Lebenslauf und Publikatinsverzeichnis\else
+ Curriculum Vitae and list of publications for \fi
+ \@nameuse{wa@person@\@I @personaltitle}
+ \@nameuse{wa@person@\@I @name}
+ (CD + \ifdeutsch Ausdruck\else printed version\fi)}
+\ifdeutsch
+\item Publications either cited in section~\ref{sec:ourpubs} or occurring in one of the
+ curricula vitae (CD only)\else
+\item Zitierte Publikationen aus Abschnitt~\ref{sec:ourpubs} oder einem der Lebensl\"aufe
+ (nur CD)\fi
+\end{itemize}}
+%</cls>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Reporting Title Page}
+%
+% The |prop@report| environment is similar, but somewhat simpler.
+%
+% \begin{macro}{\dfg@applicants@table}
+% Now, we can build the title page and general information, we first start with the
+% applicants table:
+% \begin{macrocode}
+%<*reporting>
+\newcommand\dfg@applicants@table%
+{\begin{tabular}{|l|*{\the@PIs}{l|}}\hline
+\dfg@applicants@lines\hline
+&\multicolumn{\the@PIs}{|l|}{\textbf{Private Address\deu{ (Privatanschrift)}:}}\\\hline
+\dfg@applicants@private@lines\hline
+\end{tabular}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dfg@institute@table}
+% Now, we can build the title page and general information, we first start with the
+% applicants table:
+% \begin{macrocode}
+\newcommand\dfg@institute@table%
+{\begin{tabular}{|l|*{\the@PIs}{l|}}\hline
+\dfg@applicants@institute@lines\hline
+\end{tabular}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{prop@report}
+% \begin{macrocode}
+\newcommand\prop@assoc[2]{\let\@tmpop=\relax\@for\@I:=#2\do{\@tmpop\@I\let\@tmpop=#1}}
+\newcommand\show@prop@gen@keys{\def\@cb{, }\@ifundefined{prop@gen@keys}{??:???? ?/?}{\prop@assoc\@cb\prop@gen@keys}}
+\renewenvironment{prop@report}
+{\selectlanguage{USenglish}
+\thispagestyle{empty}%
+\begin{center}
+ {\LARGE Final Project Report}\\[.2cm]
+ {\LARGE\textbf{\prop@gen@title}}\\[.3cm]
+ {\LARGE Acronym: {\prop@gen@acronym}}\\[.2cm]
+ {\large Reference number(s): \show@prop@gen@keys}\\[.2cm]
+ {\large\today}\\[1em]
+ \begin{tabular}{c*{\the@PIs}{c}}
+ \prop@tl\prop@gen@PIs{\wa@ref{person}\tl@ext{name}}\\
+ \prop@tl\prop@gen@PIs{\wa@ref{institution}{\wa@ref{person}\tl@ext{affiliation}}{name}}
+ \end{tabular}\\[2cm]
+\end{center}
+\setcounter{tocdepth}{1}\tableofcontents\newpage\setcounter{page}{1}
+\section{General Information \deu{(Allgemeine Angaben)}}
+\subsection{Reference Numbers \deu{(DFG Gesch\"aftszeichen)}}
+\show@prop@gen@keys
+\dfg@applicants
+\subsection{Institute/Chair \deu{(Institut/Lehrstuhl)}}\dfg@institute@table
+\dfg@topic
+% no longer necessary
+% \subsection{DFG-Funded Researchers \deu{(Aus DFG-Mitteln bezahlte Wissenschaftler)}}
+% \begin{tabular}{|l|l|}\hline
+% Partner & Employee/Period\\\hline\hline
+% \prop@gen@employed@lines
+% \end{tabular}
+\subsection{Report and Funding Period \deu{(Berichts- und F\"orderzeitraum)}}
+\prop@gen@reportperiod
+\dfg@area@field
+\subsection{Application Areas \deu{(Verwertungsfelder)}}\prop@gen@applareas
+% no longer necessary
+% \subsection{Cooperation Partners \deu{(Kooperationspartner)}}
+% \begin{compactitem}
+% \@for\@I:=\prop@gen@coops\do{\item \@I}
+% \end{compactitem}
+\dfgprojpapers\prop@gen@projpapers}
+{\signatures{Signatures \deu{(Unterschriften)}}}
+%</reporting>
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macrocode}
+%<*cls>
+\ifgeneral
+\newenvironment{Zusammenfassung}{\thispagestyle{empty}\subsection{Zusammenfassung}\begin{otherlanguage}{ngerman}}
+{\end{otherlanguage}\newpage\setcounter{page}1}
+\newenvironment{Summary}{\thispagestyle{empty}\subsection{Summary}}
+{\newpage\setcounter{page}1}
+\else
+\excludecomment{Summary}
+\excludecomment{Zusammenfassung}
+\fi
+%</cls>
+% \end{macrocode}
+%
+% \subsection{Project-Related Papers}\label{sec:impl:papers}
+%
+% \begin{macro}{\dfgprojpapers}
+% \begin{macrocode}
+%<*pdata>
+\newcommand\dfgprojpapers[2][]{\prop@paperlist[#1]{#2}}
+%</pdata>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{German Reports}\label{sec:impl:german}
+%
+% We have to redefine some macros for German reports.
+%
+% \begin{macrocode}
+%<*pdata>
+\ifdeutsch
+\renewcommand\prop@count[1]{\ifcase #1 null\or ein\or zwei\or drei\or vier\or f"unf\or sechs\or sieben\or
+ acht\or neun\or zehn\or elf\or zw"olf\else#1\fi}
+\renewcommand\prop@of@pages[2]{Seite~#1\ifofpage~von~#2\fi}
+\renewcommand\wp@mk@title[1]{Arbeitspaket {#1}}
+\renewcommand\wp@label[1]{AP{#1}}
+\ifwork@areas
+\renewcommand\wa@label[1]{AB{#1}}
+\renewcommand\wa@mk@title[1]{Arbeitsbereich {#1}}
+\fi
+\renewcommand\prop@legend@totals{\textbf{Summen}}
+\renewcommand\prop@legend@intendedtotals{\textbf{intendierte Summen}}
+\renewcommand\wpfig@legend@wap{\textbf{\ifwork@areas{Arbeitsbereiche}\else{AP}\fi}}
+\renewcommand\wpfig@legend@title{\textbf{Titel}}
+\renewcommand\wpfig@legend@type{\textbf{Typ}}
+\renewcommand\wpfig@legend@page{\textbf{Seite}}
+\renewcommand\wpfig@legend@start{\textbf{Start}}
+\renewcommand\wpfig@legend@length{\textbf{Dauer}}
+\renewcommand\wpfig@legend@end{\textbf{Ende}}
+\renewcommand\wpfig@legend@siteRM[1]{\site{#1}\if@RAM\ PM\fi}
+\renewcommand\wpfig@legend@siteRAM[1]{\site{#1}\ HM}
+\renewcommand\wpfig@legend@totalRM{Summe\if@RAM\ PM\fi}
+\renewcommand\wpfig@legend@totalRAM{Summe HM}
+\renewcommand\wpfig@legend@RM{PM}
+\renewcommand\wpfig@legend@RAM{HM}
+\renewcommand\wpfig@legend@RAM@expl{\if@RAM P/HM $\widehat=$ Personen/Hilfskraft Monate\else\ Aufw\"ande in Personenmonaten\fi}
+\renewcommand\wpfig@legend@lead@expl{Arbeitspaketleiter sind \wp@lead@style@explained}
+\renewcommand\wp@lead@style@explained{grau und kursiv markiert}
+\renewcommand\wpfig@legend@caption{{\ifwork@areas Arbeitsbereiche und \fi}Arbeitspakete}
+\renewcommand\wp@legend@site{Partner}
+\renewcommand\wp@legend@effort{Aufwand\if@RAM{ (PM+HM)}\fi}
+\renewcommand\wp@legend@all{\textbf{Summe}}
+\renewcommand\gantt@caption@main{Zeitliche Verteilung der Arbeitspakete}
+\renewcommand\gantt@caption@lower{draft: unten die Lastverteilung}
+\renewcommand\coherence@caption{Bisherige Kollaboration der {\pn} Partner}
+\renewcommand\objective@label[1]{Z#1}
+\renewcommand\task@label[2]{S#1.#2}
+% \renewcommand\month@label[1]{M#1}
+\renewcommand\legend@partners{Partner}
+\renewcommand\legend@lead{Leiter}
+\renewcommand\task@label@long{Schritt}
+\renewcommand\task@legend@partners{MA: }
+\renewcommand\task@legend@PM{PM}
+\fi%ifdeutsch
+%</pdata>
+% \end{macrocode}
+% \Finale
+\endinput
+% LocalWords: dfgproposal dtx kohlhase areastrue svninfo noworkareas twoside notcategory
+% LocalWords: areasfalse wa textcomp amssymb url graphicx colortbl xcolor RO Abriss Rabe
+% LocalWords: fancyhdr keyval eurosym tikz calc USenglish ngerman linkcolor ne ifgeneral
+% LocalWords: citecolor urlcolor colorlinks pagecolor breaklinks bookmarksopen ifdeutsch
+% LocalWords: hyperref LaTeX workpackage PIs thema acrolong anzungsantrag im generaltrue
+% LocalWords: Einzelverfahren tabline Allgemeine Angaben Antragsteller worktel Deutscher
+% LocalWords: bitabline personaltitle academictitle birthdate Dienstanschrift Antrag gen
+% LocalWords: workaddress atabline workfax Privatanschrift privaddress privtel prop@gen
+% LocalWords: dt Kennwort Fachgebiet und Arbeitsrichtung Voraussichtliche wa deutschtrue
+% LocalWords: Gesamtdauer Antragszeitraum Zusammenfassung workarea wp wps num Neuantrag
+% LocalWords: refundefinedtrue lightgray gantt xstep Unterschriften Id areas auf deu nur
+% LocalWords: submit hide ed public article paper today array comment wide RE Disziplin
+% LocalWords: babel true bookmarks blue LO LE page of prop sites key site RM ur das auft
+% LocalWords: def id title acronym discipline start months Proposal Erg by cls seit der
+% LocalWords: DFG empty em name affiliation Applicants Work Address email The Erstantrag
+% LocalWords: curriculum vita the applicants are enclosed appendix reference mittel der
+% LocalWords: Research area and field work Scientific Fields Anticipated write reichen
+% LocalWords: duration Application period Summary short lead Package label task Viele pn
+% LocalWords: tasks deps number line Effort target ids aux dfg count warning at sind aus
+% LocalWords: for undefined safe zero one two three four five six seven eight verf ugbar
+% LocalWords: nine ten eleven twelve style lines totals Packages xscale yscale unter von
+% LocalWords: step set gray very thin grid workphase len force phase length to folgenden
+% LocalWords: taskdep from rectangle left right width pt color red above dep Literatur
+% LocalWords: Overview Activities Signatures Date paralist ymonths ymid yinc Verzeichnis
+% LocalWords: xend effort month iffalse eustrep.dtx fileversion maketitle Antr Ausdruck
+% LocalWords: tableofcontents DescribeEnv ifpublic ifpublic compactitem wpfig Lebenslauf
+% LocalWords: wpfig workplan workplan bookeeping wissenchaftliche tasklist dmp Zitierte
+% LocalWords: tasklist taskin taskref taskref tasktref tasktref localtaskref Abschnitt
+% LocalWords: localtaskref ganttchart biblatex dfgprojpapers dfgprojpapers ifx einem Typ
+% LocalWords: bibtex proposal1-blx.aux pdataref WPtref WPtref WAref WAref WAtref Lebensl
+% LocalWords: WAtref protectmacro thebibliography bibitem newblock newif inst aufe Seite
+% LocalWords: ifsubmit submitfalse publicfalse ifkeys keysfalse ifwork RAMtrue Institut
+% LocalWords: submittrue publictrue excludecomment RAMfalse keystrue sfdefault Lehrstuhl
+% LocalWords: renewcommand familydefault helvet includecomment subsubsections bezahlte
+% LocalWords: setcounter secnumdepth ifofpage ofpagefalse fancyhead thepage sw Berichts
+% LocalWords: pagestyle fancyplain sitesfalse sitestrue ifundefined gdef allwp Summen
+% LocalWords: fundedperiod reportperiod textbf newenvironment titlepage auxout Titel
+% LocalWords: thispagestyle newcounter stepcounter tocdepth ofpagetrue setkeys Dauer
+% LocalWords: finalreport orderzeitraum thewa thewp addtocounter bigskip pws DFG-Mitteln
+% LocalWords: textsf smallskip ignorespaces subsubsection thedfg theallwp req Ende Summe
+% LocalWords: compactenum compactenum thetask newcount thegantt refsection tl Personen
+% LocalWords: nocite defbibheading ourpubs printbibliography expandafter ifnum Monate
+% LocalWords: csname endcsname dfgcount ifcase cellcolor wptable widehat qquad Aufw ande
+% LocalWords: tabularnewline wplist ifgantt drafttrue RMdisclaimer draftfalse Hilfskraft
+% LocalWords: RMdisclaimerfalse RMdisclaimertrue newdimen taskwps thetaskwps intendierte
+% LocalWords: whilenum hfill marginpar texteuro officialeuro texttt newpage cb grau
+% LocalWords: min-crossrefs pdata xdef newcommand hline aff NeedsTeXFormat dfgreporting
+% LocalWords: renewenvironment nameuse paperlist applareas applareas dfgpdata kursiv
+% LocalWords: Gesch aftszeichen projpapers shortname sitedescription ednote generalfalse
+% LocalWords: textsc newlength setlength textwidth WAauthorblock assoc tmpop markiert
+% LocalWords: tmpop tmpop deutschfalse Sachbeihilfe Arbeitsgebiet Fortsetungsantrag
+% LocalWords: Publikationen Publikatinsverzeichnis Wissenschaftler Verwertungsfelder
+% LocalWords: Kooperationspartner otherlanguage Arbeitspaket Arbeitsbereich Aufwand
+% LocalWords: Arbeitsbereiche Personenmonaten Arbeitspaketleiter Arbeitspakete unten
+% LocalWords: Zeitliche Verteilung Lastverteilung Bisherige Kollaboration Leiter
+% LocalWords: Schritt endinput
+
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:
diff --git a/macros/latex/contrib/proposal/dfg/dfgproposal.ins b/macros/latex/contrib/proposal/dfg/dfgproposal.ins
new file mode 100644
index 0000000000..941d63d28a
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/dfgproposal.ins
@@ -0,0 +1,37 @@
+%%
+%% This file generates files required to use the dfgproposal package.
+%% At your command prompt write
+%%
+%% latex dfgproposal.ins
+%%
+%% Copyright(c) 2010 Michael Kohlhase
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%% $Id: dfgproposal.ins 23009 2012-01-18 10:12:28Z kohlhase $
+%% $HeadURL: https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/dfg/dfgproposal.ins $
+
+\input docstrip
+\preamble
+\endpreamble
+
+%\Usedir{tex/latex/listings}
+\keepsilent
+\askforoverwritefalse
+
+% generate base package
+\generate{\file{dfgpdata.sty}{\from{dfgproposal.dtx}{pdata}}}
+\generate{\file{dfgproposal.cls}{\from{dfgproposal.dtx}{cls}}}
+\generate{\file{dfgreporting.cls}{\from{dfgproposal.dtx}{reporting}}}
+
+\Msg{*}
+\Msg{* You probably need to move the file dfgproposal.cls, dfgreporting.cls, and dfgpdata.sty}
+\Msg{* into a directory searched by TeX.}
+\Msg{*}
+\Msg{* And don't forget to refresh your filename database}
+\Msg{* if your TeX distribution uses such a database.}
+\Msg{*}
+
+\endbatchfile
diff --git a/macros/latex/contrib/proposal/dfg/dfgproposal.pdf b/macros/latex/contrib/proposal/dfg/dfgproposal.pdf
new file mode 100644
index 0000000000..2b718ba853
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/dfgproposal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/proposal/Makefile b/macros/latex/contrib/proposal/dfg/proposal/Makefile
new file mode 100644
index 0000000000..44336c1ef7
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/Makefile
@@ -0,0 +1,74 @@
+###########################################################################
+# Automating proposal management by make.
+# The participants work on proposal.tex in "draft" mode, which gives a lot
+# of information to the developers. Variants submit.tex and public.tex are
+# used to prepare official versions (hiding development/private info).
+###########################################################################
+# possibly customize the following variables to your setting
+PROPOSAL = proposal.tex # the proposal
+BIB = ../lib/dummy.bib # bibTeX databases
+PROP.dir = ../../..
+###########################################################################
+# the following are computed
+TARGET = $(PROPOSAL) # all pdflatex targets
+TARGET.pdf = $(TARGET:%.tex=%.pdf) # PDFs to be produced
+TARGET.aux = $(TARGET:%.tex=%.aux) # their aux files.
+PDATA = $(PROPOSAL:%.tex=%.pdata) # the proposal project data
+SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
+PDFLATEX = pdflatex -interaction batchmode -file-line-error
+BBL.base = 1
+BBL = $(PROPOSAL:%.tex=%.bbl) $(BBL.base:%=$(PROPOSAL:%.tex=%)%-blx.bbl)
+PROPCLS.dir = $(PROP.dir)/base
+PROPETC.dir = $(PROP.dir)/etc
+DFGPROPCLS.dir = $(PROP.dir)/dfg
+TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
+BIBINPUTS := ../lib:$(BIBINPUTS)
+PROPCLS.clssty = proposal.cls pdata.sty
+PROPETC.sty = workaddress.sty metakeys.sty sref.sty
+DFGPROPCLS.clssty = dfgproposal.cls dfgpdata.sty
+PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
+
+all: $(TARGET.pdf)
+
+submit:
+ $(MAKE) -w PROPOSAL=submit.tex all
+
+public:
+ $(MAKE) -w PROPOSAL=public.tex all
+
+cd: # make cd will prepare CD for burning
+ mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
+
+bbl: $(BBL)
+$(BBL): %.bbl: %.aux
+ bibtex -min-crossrefs=100 -terse $<
+
+$(PDATA): %.pdata: %.tex
+ $(PDFLATEX) $<
+
+$(TARGET.aux): %.aux: %.tex
+ $(PDFLATEX) $<
+
+$(TARGET.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
+ $(PDFLATEX) $< || $(RM) $@
+# sort $(PROPOSAL:%.tex=%.delivs) > $(PROPOSAL:%.tex=%.deliverables)
+ @if (test -e $(patsubst %.tex, %.idx, $<));\
+ then makeindex $(patsubst %.tex, %.idx, $<); fi
+ $(MAKE) -$(MAKEFLAGS) $(BBL)
+ @if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
+ then $(MAKE) -B $(BBL); fi
+ $(PDFLATEX) $< || $(RM) $@
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+
+clean:
+ rm -f *.log *.blg *~ *.synctex.gz *.cut
+
+distclean: clean
+ rm -f *.aux *.out *.run.xml *.bbl *.toc *.deliv* *.pdata
+ rm -Rf auto
+
+echo:
+ echo $(BIBINPUTS)
diff --git a/macros/latex/contrib/proposal/dfg/proposal/funds.tex b/macros/latex/contrib/proposal/dfg/proposal/funds.tex
new file mode 100644
index 0000000000..fa6ba1619c
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/funds.tex
@@ -0,0 +1,81 @@
+\section{Requested Modules/Funds}\label{sec:funds}
+
+For each applicant, we apply for funding within the Basic Module.
+
+\subsection{Funding for Staff}\label{sec:positions}
+
+\subsubsection{Research Staff}\label{sec:positions:research}
+
+We apply for the following positions. All run over the entire duration of the proposed project.
+
+\paragraph*{Non-doctoral staff}\ednote{compute amount in elan and copy here}
+
+One doctoral researcher for 2 years at $100 \%$ for Michael Kohlhase.
+
+One doctoral researcher for 2 years at $100 \%$ for Florian Rabe.
+
+%\paragraph*{Postdoctoral staff}
+%\ednote{postdoctoral researcher and comparable}
+
+\paragraph*{Other research assistants}\ednote{students with BSc.}
+
+One student with BSc. for 2 years at $100 \%$ for Michael Kohlhase.
+
+One student with BSc. for 2 years at $100 \%$ for Florian Rabe.
+
+\subsubsection{Non-Academic Staff \qquad None.}
+
+\subsubsection{Student Assistants \qquad None.}
+
+\subsection{Funding for Direct Project Costs}\label{sec;funds:direct}
+
+\subsubsection{Equipment up to 10,000 \texteuro, Software and Consumables}
+
+None. PC will cover the workspace, computing needs, and consumables for its staff as part
+of the basic support.
+
+\subsubsection{Travel Expenses}\label{sec:travel}
+
+\begin{oldpart}{rework}
+ The travel budget shall cover:
+ \begin{itemize}
+ \item visits to external collaborators. We expect two international visits. We estimate
+ that each visit will be most effective, if the junior researchers can spend about 3
+ weeks with the partners. Thus we estimate 2500 {\texteuro} per visit.
+ \item visits to national conferences to disseminate the results of {\pn}. We expect
+ one visit for each year for each of the three researchers. (3 x 3 x 1000 {\texteuro})
+ \item visits to international conferences to disseminate the results of {\pn}. These
+ are in particular the International Joint Conference on Document Engineering (DocEng)
+ and the Tech User Group Meeting (TUG). We expect one visit for each proposed
+ researcher and for each year. (3 x 3 x 1500 {\texteuro})
+ \end{itemize}
+
+ This sums up to a total amount of 32.500 {\texteuro} for travel expenses for the whole
+ funding period of three years which is split into 16.250 {\texteuro} for each institute
+ (PC and Jacobs University).
+\end{oldpart}
+
+\subsubsection{Visiting Researchers}\label{sec:funds:visiting}
+
+Total expenses \textbf{10.200 \texteuro}
+\medskip
+
+As explained in Section~\ref{sec:travel}, we expect 5 incoming research visits. Assuming
+an average duration of 3 weeks, we estimate the cost of one visit at 600 {\texteuro} for
+traveling and 70 {\texteuro} per night for accommodation, amounting to 2040 \texteuro per
+visit.
+
+\subsubsection*{-- 4.1.2.6, 4.1.3 (Expenses for Laboratory Animals / Other Costs
+/ Project Related Publication Expenses / Instrumentation) \sf\qquad n/a}
+
+% \subsubsection{Expenses for Laboratory Animals} None.
+% \subsubsection{Other Costs} None.
+% \subsubsection{Project-Related Publication Expenses} None.
+% \subsection{Funding for Instrumentation} None.
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "proposal"
+%%% End:
+
+% LocalWords: ipower texteuro
diff --git a/macros/latex/contrib/proposal/dfg/proposal/preconditions.tex b/macros/latex/contrib/proposal/dfg/proposal/preconditions.tex
new file mode 100644
index 0000000000..7f4e82c5c3
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/preconditions.tex
@@ -0,0 +1,104 @@
+\section{Project Requirements}\label{sec:requirements}
+
+\subsection{Employment Status Information}\label{sec:req:employment-status}
+
+\begin{todo}{from the proposal template}
+ For each applicant, state the last name, first name, and employment status (including
+ duration of contract and funding body, if on a fixed-term contract).
+\end{todo}
+
+\subsection{First-time Proposal Data}\label{sec:req:first}
+
+\begin{todo}{from the proposal template}
+ Only if applicable: Last name, first name of first-time applicant.
+
+ If this is your first proposal, reviewers will consider this fact when assessing your
+ pro- posal. Previous proposals for research fellowships, publication funding, travel
+ allow- ances, or funding for scientific networks are not considered first proposals. If
+ you are submitting a “first-time proposal” and it is part of a joint proposal, please
+ note that your independent project must be distinct from the other projects.
+
+ If you have already submitted a proposal as an applicant for a research grant and have
+ received a letter informing you of the funding decision, or if you have led an independ-
+ ent junior research group or project in a Collaborative Research Centre or Research
+ Unit, you are no longer eligible to submit a “first proposal”. If you have submitted a
+ “first-time proposal” and it was rejected, you may resubmit the application, in revised
+ form, as a first-time proposal for the same project.
+\end{todo}
+
+\subsection{Composition of the Project Group}\label{sec:req:group}
+
+\begin{todo}{from the proposal template}
+ List only those individuals who will work on the project but will not be paid out of the
+ project funds. State each person’s name, academic title, employment status, and type of
+ funding.
+
+ Please list separately the individuals paid by your institution and those paid using
+ other third-party funding (including fellowships).
+\end{todo}
+
+\begin{sitedescription}{jacu}
+ The KWARC (Knowledge Adaptation and Reasoning for Content) research group headed by
+ Michael Kohlhase for has the following members
+ \begin{compactdesc}
+ \item[Dr. N.N.] is the \ldots She has a background in\ldots.
+ \end{compactdesc}
+ Additionally, the group has attracted about 10 undergraduate and master's students that
+ actively take part in the project work and various aspects of research.
+\end{sitedescription}
+
+\begin{sitedescription}{pcg}
+ Power Consulting GmbH is the leading provider of semantic document solutions. Dr. Senior
+ Researcher leads an applied research group consisting of
+ \begin{compactdesc}
+ \item[Dr. N.N.] is the \ldots She has a background in\ldots.
+ \end{compactdesc}
+ The group has access to seven programming slaves specializing in web development and
+ document transformation techniques
+\end{sitedescription}
+
+
+\subsection{Cooperation with other Researchers}\label{sec:coop}
+
+\subsubsection{Planned Cooperations}\label{sec:coop:planned}
+\begin{todo}{from the proposal template}
+ Researchers with whom you have agreed to cooperate on this project
+\end{todo}
+\begin{compactdesc}
+\item[Prof. Dr. Super Akquisiteur (Uni Paderborn)] knows exactly what to do to get funding
+ with DFG, we will interview him closely and integrate all his intuitions into the {\pn}
+ templates.
+\item[Prof. Dr. Habe Nichts (Uni Hinterpfuiteufel)] has never gotten a grant proposal
+ through with DFG, we will try to avoid his mistakes.
+\item[Dr. Sach Bearbeiter (DFG)] will consult with the DFG requirements to be met in the
+ proposals.
+\item[Dr. Donald Knuth (Stanford University)] is so surprised that we want to do grant
+ proposals in {\TeX/\LaTeX} that he will help us with any problems we have in coding in
+ this wonderful programming language.
+\end{compactdesc}
+
+\subsubsection{Scientific Collaborations in the past Three Years}\label{sec:past-coop}
+
+\begin{todo}{from the proposal template}
+ Researchers with whom you have collaborated scientifically within the past three years
+
+ This information will assist the DFG’s Head Office in avoiding potential conflicts of
+ in- terest during the review process.
+\end{todo}
+
+\subsection{Scientific Equipment}\label{sec:req:equipment}
+
+Jacobs University provides laptops or desktop workstations for all academic
+employees. Great Consulting GmbH. is rolling in money anyways and has all of the latest
+gadgets.
+
+
+\subsection{Project-Relevant Interests in Commercial Enterprises\qquad n/a}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "proposal"
+%%% End:
+
+% LocalWords: Durchf uhrung subsubsection ipower Hinterpfuiteufel Sach Aktivit
+% LocalWords: Erkl arungen
diff --git a/macros/latex/contrib/proposal/dfg/proposal/proposal.pdf b/macros/latex/contrib/proposal/dfg/proposal/proposal.pdf
new file mode 100644
index 0000000000..7144892c40
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/proposal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/proposal/proposal.tex b/macros/latex/contrib/proposal/dfg/proposal/proposal.tex
new file mode 100644
index 0000000000..6feedb5513
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/proposal.tex
@@ -0,0 +1,97 @@
+% The main file for developing the proposal.
+% Variants with different class options are
+% - submit.tex (no draft stuff, no ednotes, no revision information)
+% - public.tex (like submit.tex, but no financials either)
+\providecommand{\classoptions}{,keys} % to be overwritten in variants
+\documentclass[RAM,gitinfo\classoptions]{dfgproposal}
+\addbibresource{../lib/dummy}
+\usepackage[utf8]{inputenc}
+\input{../lib/WApersons}
+
+
+\begin{document}
+
+\begin{center}\color{red}\huge
+ This mock proposal is just an example for \texttt{dfgproposal.cls} it reflects the
+ current DFG template valid from October 2011.
+\end{center}
+
+\urldef{\gcpubs}\url{http://www.pcg.phony/~gc/pubs.html}
+\urldef{\mikopubs}\url{http://kwarc.info/kohlhase/publications.html}
+\begin{proposal}[PI=miko,PI=gc,site=jacu,site=pcg,
+ thema=Intelligentes Schreiben von Antr\"agen,
+ acronym={iPoWr},
+ acrolong={\underline{I}ntelligent} {\underline{P}r\underline{o}posal} {\underline{Wr}iting},
+ title=\pn: \protect\pnlong,
+ totalduration=3 years,
+ since=1. Feb 2009,
+ start=1. Feb. 2010,
+ months=24,
+ pcgRM=36, pcgRAM=36, jacuRM=36, jacuRAM=36,
+ discipline=Computer Science,
+ areas=Knowledge Management]
+
+\begin{Zusammenfassung}
+ \begin{todo}{in das Elan System kopieren}
+ Fassen Sie die relevanten Projektziele allgemeinverst''andlich in maximal 3000 Zeichen
+ (keine Sonderzeichen) zusammen
+ \end{todo}
+ Das Schreiben von Antr"agen ist ein kollaborativer Prozess in dem Betr"age von mehreren
+ Personen integriert werden mu"ussen. Ein ASCII-basiertes Format wie {\LaTeX} erlaubt die
+ Koordination dieses Prozesses mittels Versionsverwaltungssystemen wie
+ Subversion. Dadurch k''onnen sich die Antragsteller auf Inhalte konzentrieren anstatt
+ auf die Mechanik der Dokumentenverwaltung.
+\end{Zusammenfassung}
+
+\begin{Summary}
+ \begin{todo}{copy into the Elan system}
+ Summarize the relevant goals of the proposed project in generally intelligible
+ terms. Do not use more than 3000 characters, no special characters allowed.
+ \end{todo}
+ Writing grant proposals is a collaborative effort that requires the integration of
+ contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
+ allows to coordinate the process via a source code control system like Subversion,
+ allowing the proposal writing team to concentrate on the contents rather than the
+ mechanics of wrangling with text fragments and revisions.
+\end{Summary}
+
+% It is often good to separate the top-level sections into separate files.
+% Especially in collaborative proposals. We do this here.
+\input{state}
+\input{workplan}
+
+\section{Bibliography Concerning the State of the Art, the Research objectives, and the
+ Work Programme}\label{sec:bib}
+
+\begin{todo}{from the proposal template}
+In this bibliography, list only the works you cite in your presentation of the state of the
+art, the research objectives, and the work programme. This bibliography is not the list
+of publications. Non-published works must be included with the proposal.
+\end{todo}
+\printbibliography[heading=empty,notcategory=featured]
+% the following will not become part of the public proposal after all most of this is
+% technical or confidential.
+%\begin{private}
+\input{funds}
+\input{preconditions}
+
+\section{Additional Information}\label{sec:additional}
+
+Funding proposal XYZ-83282 has been submitted prior to this proposal on related topic XYZ.
+\end{proposal}
+\end{document}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-PDF-mode:t
+%%% TeX-master: t
+%%% End:
+
+% LocalWords: empty bibflorian systems rabe institutions modal historical pub
+% LocalWords: kwarc till formalsafe miko gc ipower ipowerlong Antr agen Beitr
+
+% LocalWords: acrolong intellegible kollaboratives koh arenten ussen Proze pcg
+% LocalWords: Versionsmanagementsystem textsc unterst utzt konzentieren stex
+% LocalWords: mechanik workplan thispagestyle newpage Principcal cvpubsmiko pn
+% LocalWords: ourpubs zusammenfassung printbibliography pubspage ntelligent
+% LocalWords: iting pnlong
diff --git a/macros/latex/contrib/proposal/dfg/proposal/public.pdf b/macros/latex/contrib/proposal/dfg/proposal/public.pdf
new file mode 100644
index 0000000000..3d49aea687
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/public.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/proposal/public.tex b/macros/latex/contrib/proposal/dfg/proposal/public.tex
new file mode 100644
index 0000000000..00c95f15a3
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/public.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{,submit,public}
+\input{proposal}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/dfg/proposal/state.tex b/macros/latex/contrib/proposal/dfg/proposal/state.tex
new file mode 100644
index 0000000000..245c513b45
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/state.tex
@@ -0,0 +1,59 @@
+\section{State of the Art and Preliminary Work}\label{sec:state}
+\begin{todo}{from the proposal guidelines}
+ For new proposals please explain briefly and precisely the state of the art in your
+ field in its direct relationship to your project. This description should make clear in
+ which context you situate your own research and in what areas you intend to make a
+ unique, innovative, promising contribution. This description must be concise and
+ understand- able without referring to additional literature.
+
+ For renewal proposals, please report on your previous work. This report should also be
+ understandable without referring to additional literature.
+
+ To illustrate and enhance your presentation you may refer to your own and others’ pub-
+ lications. Indicate whenever you are referring to other researchers’ work. Please list
+ all cited publications in your bibliography under section 3. This reference list is not
+ consid- ered your list of publications. Note that reviewers are not required to read any
+ of the works you cite. This also applies to review sessions that are held on site. In
+ this case, manuscripts and publications that provide more information on the progress
+ reports and are published up to the review panel’s meeting may be made available at the
+ meeting to enable reviewers to read through the information. Reviews will be based only
+ on the text of the actual proposal.
+\end{todo}
+\subsection{List of Project-Related Publications}\label{sec:projpapers}
+
+\begin{todo}{from the proposal template}
+ Please include a list of own publications that are related to the proposed project. It
+ serves as an important basis for assessing your proposal. The number of publications to
+ cite here is determined as follows:
+ \begin{compactdesc}
+ \item[Single applicant] two publications per year of the funding duration
+ \item[Multiple applicants] three publications per year of the funding duration
+ \end{compactdesc}
+ These rules refer to the proposed funding duration for new proposals and the completed
+ duration for renewal proposals.
+
+ If you are submitting a proposal to the DFG for the first time and have therefore not
+ published in the proposed research area, please list the up to five most important
+ publications so far.
+\end{todo}
+
+\subsubsection{Peer-Reviewed Articles}
+
+\dfgprojpapers{Kohlhase:pdpl10,providemore}
+
+\ednote{Anmerkung Jens: Ein nützliches Feature wäre hier, wenn das Paket eine (eventuell
+ über Optionen der Dokumentklasse unterdrückbare) Warnung ausgeben würde, wenn zu viele
+ Publikationen entsprechend DFG-Richtlinien angegeben werden. Die Anzahl ist sehr eng
+ begrenzt.}
+
+\subsubsection{Other Articles\qquad None.}
+\subsubsection{Patents\qquad None.}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "proposal"
+%%% End:
+
+% LocalWords: subsubsections dfgprojpapers pdpl10 providemore compactdesc
+% LocalWords: ourpubs nociteprolist KohKoh ccbssmt09 KohRabZho tmlmrsca10
+% LocalWords: Hutter09 sifemp09
diff --git a/macros/latex/contrib/proposal/dfg/proposal/submit.pdf b/macros/latex/contrib/proposal/dfg/proposal/submit.pdf
new file mode 100644
index 0000000000..df7b10b70d
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/submit.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/proposal/submit.tex b/macros/latex/contrib/proposal/dfg/proposal/submit.tex
new file mode 100644
index 0000000000..3f1c60607c
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/submit.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{,submit}
+\input{proposal}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/dfg/proposal/workplan.tex b/macros/latex/contrib/proposal/dfg/proposal/workplan.tex
new file mode 100644
index 0000000000..a68a3b553d
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/workplan.tex
@@ -0,0 +1,215 @@
+\section{Objectives and Work Programme}\label{sec:workplan}
+
+\subsection{Anticipated Total Duration of the Project}\label{sec:duration}
+
+\begin{todo}{from the proposal template}
+Please state
+\begin{itemize}
+ \item the project's intended duration 1 and how long DFG funds will be necessary,
+ \item for ongoing projects: since when the project has been active.
+\end{itemize}
+\end{todo}
+
+\subsection{Objectives}\label{sec:objectives}
+
+\begin{objective}[id=firstobj,title=Supporting Authors]
+ This is the first objective, after all we have to write proposals all the time, and we
+ would rather spend time on research.
+\end{objective}
+
+\begin{objective}[id=secondobj,title=Supporting Reviewers]
+ They are only human too, so let's have a heart for them as well.
+\end{objective}
+
+
+\subsection{Work Programme Including Proposed Research Methods}\label{sec:wawp}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\LaTeX is the best document markup language, it can even be used for literate
+programming~\cite{DK:LP,Lamport:ladps94,Knuth:ttb84}
+
+\begin{todo}{from the proposal template}
+ review the state of the art in the and your own contribution to it; probably you want to
+ divide this into subsubsections.
+\end{todo}
+
+\begin{todo}{from the proposal template}
+For each applicant
+
+Please give a detailed account of the steps planned during the proposed funding pe-
+riod. (For experimental projects, a schedule detailing all planned experiments should
+be provided.)
+
+The quality of the work programme is critical to the success of a funding proposal. The
+work programme should clearly state how much funding will be requested, why the
+funds are needed, and how they will be used, providing details on individual items
+where applicable.
+
+Please provide a detailed description of the methods that you plan to use in the project:
+What methods are already available? What methods need to be developed? What as-
+sistance is needed from outside your own group/institute?
+Please list all cited publications pertaining to the description of your work programme
+in your bibliography under section 3.
+\end{todo}
+
+The project is organized around \pdatacount{all}{wa} large-scale work areas which correspond
+to the objectives formulated above. These are subdivided into \pdatacount{all}{wp} work
+packages, which we summarize in Figure~\ref{fig:wplist}. Work area
+\WAref{mansubsus} will run over the whole project\ednote{come up with a better
+ example, this is still oriented towards an EU project} duration of {\pn}. All
+{\pdatacount{systems}{wp}} work packages in {\WAref{systems}} will and have to be
+covered simultaneously in order to benefit from design-implementation-application feedback
+loops.
+
+\wpfig
+
+\begin{workplan}
+\begin{workarea}[id=mansubsus,title={Management, Support \& Sustainability}, short=Management]
+ This work-group corresponds to Objective \OBJref{firstobj} and has two work packages:
+ one for management proper ({\WPref{management}}), and one each for
+ dissemination ({\WPref{dissem}})
+
+ This work group ensures the dissemination and creation of the periodic integrative
+ reports containing the periodic Project Management Report, the Project Management
+ Handbook, an Knowledge Dissemination Plan ({\WPref{management}}), the Proceedings of the
+ Annual {\pn} Summer School as well as non-public Dissemination and Exploitation plans
+ ({\WPref{dissem}}), as well as a report of the {\pn} project milestones.
+
+\begin{workpackage}[id=management,lead=jacu,
+ title=Project Management,
+ jacuRM=2,jacuRAM=8,pcgRM=2]
+ Based on the ``Bewilligungsbescheid'' of the DFG, and based on the financial and
+ administrative data agreed, the project manager will carry out the overall project
+ management, including administrative management. A project quality handbook will be
+ defined, and a {\pn} help-desk for answering questions about the format (first
+ project-internal, and after month 12 public) will be established. The project management
+ will consist of the following tasks
+\begin{tasklist}
+\begin{task}[id=foo,wphases=0-3,requires=\taskin{t1}{dissem}]
+ To perform the administrative, scientific/technical, and financial management of the
+ project
+\end{task}
+\begin{task}[wphases=13-17!.5]
+ To co-ordinate the contacts with the DFG and other funding bodies, building on the
+ results in \taskref{management}{foo}
+\end{task}
+\begin{task}
+ To control quality and timing of project results and to resolve conflicts
+\end{task}
+\begin{task}
+ To set up inter-project communication rules and mechanisms
+\end{task}
+\end{tasklist}
+
+\end{workpackage}
+
+\begin{workpackage}[id=dissem,lead=pcg,
+ title=Dissemination and Exploitation,
+pcgRM=8,jacuRAM=2]
+Much of the activity of a project involves small groups of nodes in joint work. This work
+ package is set up to ensure their best wide-scale integration, communication, and
+ synergetic presentation of the results. Clearly identified means of dissemination of
+ work-in-progress as well as final results will serve the effectiveness of work within the
+ project and steadily improve the visibility and usage of the emerging semantic services.
+
+
+ The work package members set up events for dissemination of the research and
+ work-in-progress results for researchers (workshops and summer schools), and for industry
+ (trade fairs). An in-depth evaluation will be undertaken of the response of test-users.
+
+ \begin{tasklist}
+ \begin{task}[id=t1,wphases=6-7]
+ sdfkj
+ \end{task}
+ \begin{task}[wphases=12-13]
+ sdflkjsdf
+ \end{task}
+ \begin{task}[wphases=18-19]
+ sdflkjsdf
+ \end{task}
+ \begin{task}[wphases=22-24]
+ \end{task}
+\end{tasklist}
+
+Within two months of the start of the project, a project website will go live. This
+website will have two areas: a members' area and a public area.\ldots
+\end{workpackage}
+\end{workarea}
+
+
+\begin{workarea}[id=systems,title={System Development}]
+ This workarea does not correspond to \OBJtref{secondobj}, but it has two work packages:
+ one for the development of the {\LaTeX} class ({\WPref{class}}), and for the
+ proposal template ({\WPref{temple}})
+
+ This work group coordinates the system development.
+
+\begin{workpackage}[id=class,lead=jacu,
+ title=A LaTeX class for EU Proposals,short=Class,
+ jacuRM=12,jacuRAM=8,pcgRM=12,pcgRAM=2]
+We plan to develop a {\LaTeX} class for marking up EU Proposals
+
+We will follow strict software design principles, first comes a
+requirements analys, then \ldots
+\begin{tasklist}
+ \begin{task}[wphases=0-2]
+ sdfsdf
+ \end{task}
+ \begin{task}[wphases=4-8]
+ sdfsdf
+ \end{task}
+ \begin{task}[id=t3,wphases=10-14]
+ sdfsdf
+ \end{task}
+ \begin{task}[wphases=20-24]
+ sdfsdfd
+ \end{task}
+\end{tasklist}
+\end{workpackage}
+
+\begin{workpackage}[id=temple,lead=pcg,
+ title= Proposal Template,short=Template,jacuRM=12]
+
+We plan to develop a template file for {\pn} proposals
+
+We abstract an example from existing proposals
+\begin{tasklist}
+ \begin{task}[wphases=6-12]
+ sdfdsf
+ \end{task}
+ \begin{task}[id=temple2,wphases=18-24,requires=\taskin{t3}{class}]
+ sdfsdf
+ \end{task}
+\end{tasklist}
+\end{workpackage}
+
+\begin{workpackage}[id=workphase,title=A work package without tasks,
+ wphases=0-4!.5]
+
+ And finally, a work package without tasks, so we can see the effect on the gantt chart
+ in fig~\ref{fig:gantt}.
+\end{workpackage}
+\end{workarea}
+\end{workplan}
+
+\ganttchart[draft,xscale=.45]
+
+\subsection{Data Handling}\label{sec:data}
+
+The \pn project will not systematically produce researchdata. All project results will be
+published for at least $x$ years at our archive at \url{http://example.org}.
+
+\subsection{-- 2.7 (Other Information / Explanations on the Proposed Investigations / Information on Scientific and Financial Involvement of International
+ Cooperation Partners) \qquad \sf n/a}
+
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "proposal"
+%%% End:
+
+% LocalWords: workplan.tex wplist dfgcount wa mansubsus duratio ipower wpfig
+% LocalWords: ganttchart xscale workplan workarea pdataref dissem workpackage foo
+% LocalWords: tasklist taskin taskref sdfkj sdflkjsdf sdfsdf sdfsdfd sdfdsf pn
+% LocalWords: firstobj secondobj pdatacount WAref ednote OBJref pcgRM pcg
+% LocalWords: ldots OBJtref workphase
diff --git a/macros/latex/contrib/proposal/dfg/proposal/zusammenfassung.tex b/macros/latex/contrib/proposal/dfg/proposal/zusammenfassung.tex
new file mode 100644
index 0000000000..ca39d95519
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/proposal/zusammenfassung.tex
@@ -0,0 +1,20 @@
+\begin{Abriss}
+\begin{todo}{from the proposal template}
+ Fassen Sie hier bitte die wesentlichen Ziele Ihres Vorhabens allgemeinverständlich und
+ in nicht mehr als 15 Zeilen (max. 1600 Zeichen) zusammen.
+\end{todo}
+Das Schreiben von Antr"agen ist oft ein kollaboratives Unterfangen in dem Beitr"age von
+mehren Partnern in einen koh"arenten Text integriert werde m"ussen. Durch die Verwendung
+eines ASCII-basierten Formates wie {\LaTeX} kann dieser Proze"s in einem
+Versionsmanagementsystem wie {\textsc{Subversion}} unterst"utzt werden, wodurch sie das
+Projektteam auf das Schreiben konzentrieren kann statt auf die Mechanik der Integration.
+\end{Abriss}
+%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "proposal"
+%%% End:
+
+% LocalWords: ngerman zusammenfassung popul Komplexit eingef uhrt aquate utzen
+% LocalWords: unterst pn inparaenum Anderungsmanagement zug onnen zugh erm koh
+% LocalWords: oglichen Antr agen kollaboratives Beitr arenten ussen Proze utzt
+% LocalWords: Versionsmanagementsystem
diff --git a/macros/latex/contrib/proposal/dfg/report/Makefile b/macros/latex/contrib/proposal/dfg/report/Makefile
new file mode 100644
index 0000000000..3408045db0
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/Makefile
@@ -0,0 +1,67 @@
+# possibly customize the following variables to your setting
+REPORT = finalreport.tex # the report
+BIB = ../lib/dummy.bib # bibTeX databases
+PROP.dir = ../../..
+###########################################################################
+# the following are computed
+#CVP = $(shell ls CV_PubList*.tex) # CVs of the proposers
+#TSIMP = letter_submission.tex # pdflatex Targets without bibTeX
+#TSIMP.pdf = $(TSIMP:%.tex=%.pdf) # PDFs to be produced
+TBIB = $(REPORT) #$(CVP) # pdflatex Targets with bibTeX
+TARGET = $(TSIMP) $(TBIB) # all pdflatex targets
+TBIB.pdf = $(TBIB:%.tex=%.pdf) # PDFs to be produced
+TBIB.aux = $(TBIB:%.tex=%.aux) # their aux files.
+PDATA = $(REPORT:%.tex=%.pdata) # the proposal project data
+SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
+PDFLATEX = pdflatex -interaction batchmode -file-line-error
+BBL = $(REPORT:%.tex=%.bbl) $(REPORT:%.tex=%1-blx.bbl) $(REPORT:%.tex=%2-blx.bbl) #$(CVP:%.tex=%.bbl)
+PROPCLS.dir = $(PROP.dir)/base
+PROPETC.dir = $(PROP.dir)/etc
+DFGPROPCLS.dir = $(PROP.dir)/dfg
+TEXINPUTS := .//:$(PROPCLS.dir)//:$(DFGPROPCLS.dir)//:$(PROPETC.dir)//:
+BIBINPUTS := ../lib:$(BIBINPUTS)
+PROPCLS.clssty = reporting.cls pdata.sty
+PROPETC.sty = workaddress.sty metakeys.sty sref.sty
+DFGPROPCLS.clssty = dfgreporting.cls dfgpdata.sty
+PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(DFGPROPCLS.clssty:%=$(DFGPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
+
+all: $(TBIB.pdf) $(TSIMP.pdf)
+
+cd: # make cd will prepare CD for burning
+ mkdir CD;make $(TARGET.pdf); cp $(TARGET.pdf) CD
+
+$(BBL): %.bbl: %.aux
+ bibtex -min-crossrefs=100 -terse $<
+
+$(TSIMP.pdf): %.pdf: %.tex $(PROPCLS) $(PDATA)
+ $(PDFLATEX) $< || $(RM) $@
+
+$(PDATA): %.pdata: %.tex
+ $(PDFLATEX) $<
+
+$(TBIB.aux): %.aux: %.tex
+ $(PDFLATEX) $<
+
+$(TBIB.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
+ $(PDFLATEX) $< || $(RM) $@
+# sort $(REPORT:%.tex=%.delivs) > $(REPORT:%.tex=%.deliverables)
+ @if (test -e $(patsubst %.tex, %.idx, $<));\
+ then makeindex $(patsubst %.tex, %.idx, $<); fi
+ $(MAKE) -$(MAKEFLAGS) $(BBL)
+ @if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
+ then $(MAKE) -B $(BBL); fi
+ $(PDFLATEX) $< || $(RM) $@
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+
+clean:
+ rm -f *.log *.blg *~ *.synctex.gz *.cut
+
+distclean: clean
+ rm -f *.aux *.out *.run.xml *.bbl *.toc *.deliv* *.pdata
+ rm -Rf auto
+
+echo:
+ echo $(BIBINPUTS)
diff --git a/macros/latex/contrib/proposal/dfg/report/README b/macros/latex/contrib/proposal/dfg/report/README
new file mode 100644
index 0000000000..dabc084504
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/README
@@ -0,0 +1,22 @@
+An Exapmle for dfgproposal.cls
+
+proposal.tex is a fake DFG proposal that shows all elements of
+ dfgproposal.cls in action.
+finalreport.tex does the same for dfgreporting.cls
+CV_PubList_Kohlhase.tex is an example of the CV and publication lists required
+ by the DFG
+letter_submission.tex is an example submission letter.
+*.tex the rest are intemediate files
+doc contains the DFG documentation how to write proposals and
+ final reports: These documents are not subject to the
+ package's license but (c) DFG. They are bundled for your
+ convenience; up-to-date versions may be found at http://www.dfg.de.
+Makefile allows the automation via a unix Makefile on the author's
+ machine, adapt it to your needs
+
+Copyright(c) 2010 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/dfgproposal/ex
+
diff --git a/macros/latex/contrib/proposal/dfg/report/finalreport.pdf b/macros/latex/contrib/proposal/dfg/report/finalreport.pdf
new file mode 100644
index 0000000000..4ae10d47a1
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/finalreport.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/report/finalreport.tex b/macros/latex/contrib/proposal/dfg/report/finalreport.tex
new file mode 100644
index 0000000000..e09637ef35
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/finalreport.tex
@@ -0,0 +1,52 @@
+% the document class specification for the proposal writing process, add the 'submit' option
+% for submitting (switches off various draft features); add the 'public' option to exclude
+% any private parts.
+\documentclass[gitinfo]{dfgreporting}
+%\documentclass[submit]{dfgproposal}
+%\documentclass[submit,public]{dfgproposal}
+\addbibresource{../lib/dummy.bib}
+% define the proposal acronym;
+% use \texorpdfstring so that it can be used in section headings as well
+% tell the class that this is the proposal acronym
+\input{WApersons}
+\begin{document}
+\providecommand\ifprefchar[2]{}% fix biblatex
+
+\begin{center}\color{red}\huge
+ This mock proposal is just an example for \texttt{dfgreporting.cls} it reflects the
+ template valid until January 2012 (have to update soon)
+\end{center}
+
+\begin{report}[importfrom=../proposal/proposal,
+ PI=miko,PI=gc,site=jacu,site=pcg,
+ key = KO 2428 99-9,
+ key = GS 4711 99-9,
+ thema=Intelligentes Schreiben von Antr\"agen,
+ reportperiod=1. Feb. 2010 - 31. Jan. 2012,
+ % jacuemployed=Junior Researcher: 1. Feb 2010 - 31. Jan 2012,
+ % pcgemployed=Slave Worker: 1. Feb 2010 - 31. Dec 2010,
+ % pcgemployed=Lazy Bones: 1.Jan 2011 - 31. Jan 2012,
+ applareas={Knowledge Management, Document Management, Workflow Systems},
+ % coop={Acquisition Guru, Berlin, Germany},
+ % coop={Deutsche Forschnungsgemeinschaft, Bonn, Germany},
+ projpapers={Kohlhase:pdpl10,providemore}]
+
+\include{progressreport}
+\include{progresssummary}
+\dfgprojpapers[articles,confpapers,wspapers]{Kohlhase:pdpl10,providemore,KohDavGin:psewads11,Lange:OpenMathCDLinkedData10}
+\end{report}
+\end{document}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: t
+%%% End:
+
+% LocalWords: empty bibflorian systems rabe institutions modal historical pub
+% LocalWords: kwarc till formalsafe miko gc ipower ipowerlong Antr agen Beitr
+
+% LocalWords: acrolong intellegible kollaboratives koh arenten ussen Proze
+% LocalWords: Versionsmanagementsystem textsc unterst utzt konzentieren stex
+% LocalWords: mechanik workplan thispagestyle newpage Principcal cvpubsmiko
+% LocalWords: finalreport fundedperiod reportperiod progressreport
+% LocalWords: progresssummary
diff --git a/macros/latex/contrib/proposal/dfg/report/letter_submission.pdf b/macros/latex/contrib/proposal/dfg/report/letter_submission.pdf
new file mode 100644
index 0000000000..d56697a35b
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/letter_submission.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/dfg/report/letter_submission.tex b/macros/latex/contrib/proposal/dfg/report/letter_submission.tex
new file mode 100644
index 0000000000..3660eb0954
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/letter_submission.tex
@@ -0,0 +1,33 @@
+\documentclass{dinbrief}
+\usepackage{ngerman}
+\signature{Dr. Michael Kohlhase\hspace*{5cm} Dr. Great Communicator}
+\usepackage{pdata}\readpdata{proposal}
+\begin{document}
+
+\begin{letter}{Frau ?????\\
+Deutsche Forschungsgemeinschaft\\
+52170 Bonn}
+
+\subject{Antrag auf Sachbeihilfe}
+\opening{Sehr geehrte Frau ?????}
+
+anbei senden wir Ihnen unseren Antrag auf Sachbeihilfe f"ur das Projekt "`\pn"'
+(\pnlong) zu. Die elektronische Version des Antrags inklusive der Anlagen sowie Kopien
+der eigenen Publikationen haben wir diesem Schreiben als CD beigef"ugt. Diese beinhaltet
+die folgenden Dateien:
+\begin{center}
+ \begin{tabular}{lp{8cm}}
+ \texttt{Antrag.pdf} & der Antrag\\
+ \texttt{CV\_Publist\_Kohlhase.pdf} & Lebenslauf Michael Kohlhase\\
+ \texttt{CV\_Publist\_Communicator.pdf} & Lebenslauf Great Communicator\\
+ Publikationen & Ordner mit den im Antrag bzw. in den Lebensl"aufen angegebenen
+eigenen Veröffentlichungen Das projektbezogene Publikationsverzeichnis befindet sich im
+Antrag unter Abschnitt 2.2.
+\end{tabular}
+\end{center}
+
+\closing{Mit freundlichen Gr"u"sen,}
+\end{letter}
+\end{document}
+
+% LocalWords: texttt Publist Schr
diff --git a/macros/latex/contrib/proposal/dfg/report/progressreport.tex b/macros/latex/contrib/proposal/dfg/report/progressreport.tex
new file mode 100644
index 0000000000..a14f013609
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/progressreport.tex
@@ -0,0 +1,28 @@
+\section{Final Progress Report\deu{Arbeits- \& Ergebnisbericht}}
+\begin{todo}{from the report template}
+This is what the reviewers read (maximum 10 pages of A4)
+ \begin{itemize}
+ \item Project’s initial questions and objectives.
+ \item Project developments --- including deviations from the original plan, failures,
+ and problems encountered with project organisation or technical execution.
+ \item Presentation of results and discussion of the relevant research situation in this
+ context, potential perspectives for application, and conceivable follow-up research.
+ \item Statement on whether the results of the project are economically valuable and whether exploitation is already taking place or may be anticipated; if applicable, details regarding patents, industrial joint ventures, etc.
+ \item Who has contributed to the results achieved by the project (national/international partners, project staff, etc.)?
+ \item Qualification of young researchers in the context of your project (for example, first degree, doctorate, post-doctorate, etc.).
+ \end{itemize}
+ The report must be understandable without the need to consult additional literature. To
+ illustrate and enhance your presentation you may refer to your own and others’
+ publications. Make it clear whenever you are referring to other researchers’ work and
+ explain your own papers. Please list all cited publications at the end of the
+ section. This reference list is not considered your list of publications. Any
+ unpublished work must be included with the final report. However, note that reviewers
+ are not required to read any of the works you cite. Reviews will be based only on the
+ text of the actual report.
+\end{todo}
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "finalreport"
+%%% End:
+
+% LocalWords: finalreport progressreport.tex
diff --git a/macros/latex/contrib/proposal/dfg/report/progresssummary.tex b/macros/latex/contrib/proposal/dfg/report/progresssummary.tex
new file mode 100644
index 0000000000..c2722923d8
--- /dev/null
+++ b/macros/latex/contrib/proposal/dfg/report/progresssummary.tex
@@ -0,0 +1,18 @@
+\section{Final Progress Report\deu{Arbeits- \& Ergebnisbericht}}
+\begin{todo}{from the report template}
+ This is for the DFG web site and report, made available to the general public (maximum 1 page of A4)
+ \begin{itemize}
+ \item Presentation, in clearly understandable, everyday language of the key scientific
+ findings and any potential applications.
+ \item Any surprises encountered in the course of the project and in the results
+ obtained.
+ \item Reference to any articles published in the media reporting the success of the
+ project.Project’s initial questions and objectives.
+ \end{itemize}
+\end{todo}
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "finalreport"
+%%% End:
+
+% LocalWords: finalreport
diff --git a/macros/latex/contrib/proposal/eu/README b/macros/latex/contrib/proposal/eu/README
new file mode 100644
index 0000000000..5f055101d0
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/README
@@ -0,0 +1,14 @@
+euproposal.cls: A class for preparing FP7 proposals for collaborative projects
+
+The euproposal class supports many of the specific elements of a Framework 7 Proposal. It
+is optimized towards collaborative projects. The package comes with extensive examples. To
+start a new proposal just copy a suitable one and modify it to your needs. Note that the
+structure of EU proposals changes from time to time, so that the examples may be out of
+date.
+
+Copyright(c) 2007 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/eu
+
diff --git a/macros/latex/contrib/proposal/eu/euproposal.dtx b/macros/latex/contrib/proposal/eu/euproposal.dtx
new file mode 100644
index 0000000000..d9b2e3884a
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/euproposal.dtx
@@ -0,0 +1,601 @@
+% \iffalse meta-comment
+% A class for preparing FP7 proposals for collaborative projects
+%
+% Copyright (c) 2011 Michael Kohlhase, all rights reserved
+%
+% This file is distributed under the terms of the LaTeX Project Public
+% License from CTAN archives in directory macros/latex/base/lppl.txt.
+% Either version 1.0 or, at your option, any later version.
+%
+% The development version of this file can be found at
+% https://github.com/KWARC/LaTeX-proposal
+% \fi
+%
+% \iffalse
+%<cls|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<cls>\ProvidesClass{euproposal}[2016/04/15 v1.5 EU Proposal]
+%<pdata>\ProvidesPackage{eupdata}[2016/04/15 v1.5 EU Project Data]
+%<reporting>\ProvidesPackage{eureporting}[2016/04/15 v1.5 EU Project Reporting]
+%<*driver>
+\documentclass[twoside]{ltxdoc}
+\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
+\DoNotIndex{\begin,\AtEndDocument,\newcommand,\newcounter,\stepcounter}
+\DoNotIndex{\immediate,\openout,\closeout,\message,\typeout}
+\DoNotIndex{\section,\scshape,\arabic}
+\EnableCrossrefs
+%\CodelineIndex
+%\OnlyDescription
+\RecordChanges
+\usepackage{textcomp,url,paralist,a4wide,xspace}
+\usepackage[show]{ed}
+\usepackage[maxnames=6,hyperref=auto,style=alphabetic,backend=bibtex]{biblatex}
+\addbibresource{../lib/proposal.bib}
+\usepackage[bookmarks=true,linkcolor=blue,
+ citecolor=blue,urlcolor=blue,colorlinks=true,
+ breaklinks=true, bookmarksopen=true]{hyperref}
+\makeindex
+\newcommand\subversion{\textsc{Subversion}\xspace}
+\begin{document}
+\DocInput{euproposal.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\CheckSum{639}
+%
+% \changes{v0.1}{2007/05/07}{used in the SciML proposal}
+% \changes{v0.2}{2007/05/09}{First Version with Documentation}
+% \changes{v0.3}{2007/06/04}{staff effort table finally works, released}
+% \changes{v0.3a}{2008/01/18}{error corrections and more documentation}
+% \changes{v1.3}{2011/05/18}{basing this on proposal.cls}
+% \changes{v1.4}{2012/01/18}{various tweaks for the Jan 2012 proposal deadline}
+% \changes{v1.4}{2015/01/14}{lots of tweaks}
+%
+% \GetFileInfo{euproposal.cls}
+%
+% \MakeShortVerb{\|}
+% \title{Preparing FP7 EU Proposals and Reports in {\LaTeX} with \texttt{euproposal.cls}}
+% \author{Michael Kohlhase\\
+% Computer Science, Jacobs University Bremen\\
+% \url{http://kwarc.info/kohlhase}}
+% \maketitle
+%
+% \begin{abstract}
+% The |euproposal| class supports many of the specific elements of a Framework 7
+% Proposal. It is optimized towards collaborative projects. The package comes with an
+% extensive example (a fake EU proposal) that shows all elements in action.
+% \end{abstract}
+%
+% \tableofcontents\newpage
+%
+% \section{Introduction}\label{sec:intro}
+%
+% Writing grant proposals is a collaborative effort that requires the integration of
+% contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
+% allows to coordinate the process via a source code control system like
+% \subversion, allowing the proposal writing team to concentrate on the contents
+% rather than the mechanics of wrangling with text fragments and revisions.
+%
+% The |euproposal| class extends the |proposal| class~\cite{Kohlhase:pplp:svn} and
+% supports many of the specific elements of Part B of a Framework 7 Proposal. The
+% package documentation is still preliminary, fragmented and incomplete and only dwells
+% on the particulars of DFG proposals, so we treat~\cite{Kohlhase:pplp:svn} as a
+% prerequisite. Please consult the example proposal |propB.tex|, which comes with the
+% package and shows the usage of the class in action. It is intended as a template for
+% your proposal, but please bear in mind that the EU guidelines may change from call to
+% call, if in doubt, please consult the FP7 guide for proposers.\ednote{say something
+% about the proposers guide.}
+%
+% The |eureporting| class supports most of the specific elements of the project reports
+% to the EC. The example report |dfg/report.tex| is intended as a template for your
+% final report\ednote{say something about reporting}.
+%
+% The |euproposal| and |eureporting| classes and the |eupdata| package are distributed
+% under the terms of the LaTeX Project Public License from CTAN archives in directory
+% macros/latex/base/lppl.txt. Either version 1.0 or, at your option, any later
+% version. The CTAN archive always contains the latest stable version, the development
+% version can be found at \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports
+% please use the sTeX TRAC at \url{https://github.com/KWARC/LaTeX-proposal/issues}.
+%
+% \section{The User Interface}\label{sec:user-interface}
+%
+% In this section we will describe the functionality offered by the |euproposal| class
+% along the lines of the macros and environments the class provides. Much of the
+% functionality can better be understood by studying the functional example |proposal.tex|
+% (and its dependents) that comes with the |euproposal| package in conjunction with the
+% proposer's EU proposer's guidelines (we have included it as |***| for convenience into
+% the package distribution).\ednote{MK@MK do that and talk about reporting as well.}
+%
+% \subsection{Package Options}\label{sec:user:options}
+%
+% As usual in {\LaTeX}, the package is loaded by
+% |\documentclass[|\meta{options}|]{euproposal}|, where |[|\meta{options}|]| is optional
+% and gives a comma separated list of options specified in~\cite{Kohlhase:pplp:svn}. Some
+% versions EU proposals want non-standard numbering schemes (e.g. starting with
+% \textbf{B...} since we are writing Part B.), this can be reached by giving the |propB|
+% option.
+%
+% \subsection{Proposal Metadata and Title page}\label{sec:user:metadata}
+%
+% The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal|
+% environment, which also generates the title page and the first section of the proposal
+% as well as the last pages of the proposal with the signatures, enclosures, and
+% references. The |proposal| environment should contain all the mandatory parts of the
+% proposal text. The |proposal| environment uses the following EU-specific keys to
+% specify metadata.
+% \begin{compactitem}
+% \item \DescribeMacro{callname}|callname| specifies the call the proposal addresses. It is
+% usually a string of the form |ICT Call 1|, \DescribeMacro{callid}|callid| is the
+% corresponding identifier, usually a string of the form |FP7-???-200?-?|. An overview
+% over open calls can be found at \url{http://cordis.europa.eu/fp7/dc/index.cfm}
+% \item The \DescribeMacro{challenge}|challenge|, \DescribeMacro{objective}|objective|,
+% and \DescribeMacro{outcome}|outcome| keys specifies the specific parts in the call
+% this proposal addresses. These are specified in the ``call fiche'' that can be
+% obtained from the URL above. All of these have an identifier, which can be specified
+% via the \DescribeMacro{challengeid}|challengeid|,
+% \DescribeMacro{objectiveid}|objectiveid|, and \DescribeMacro{outcomeid}|outcomeid|
+% keys.\ednote{MK@MK: the outcomeid should key should be a list key, I am not
+% implementing this right now, since it comes more natural when we change the class to
+% metakeys support.}
+% \item \DescribeMacro{topicsaddressed}|topicsaddressed| allows to enter free-form text
+% instead of specifying the |challenge*|, |objective*|, and |outcome*| keys.
+% \item The \DescribeMacro{coordinator}|coordinator| key gives the identifier of the
+% proposal coordinator. The |euproposal| package uses the |workaddress| package for
+% representation of personal metadata, see~\cite{Kohlhase:workaddress:ctan} for details.
+% \item The \DescribeMacro{coordinatorsite}|coordinatorsite| key gives the identifier of
+% the coordinating site (for the table).
+% \item If given, the \DescribeMacro{iconrowheight}|iconrowheight| key instructs the
+% |euproposal| class to make a line with the logos of the participants at the bottom of
+% the title page, and specify their heights; |1.5cm| is often a good value.
+% \end{compactitem}
+%
+% \subsection{Work Packages and Work Areas}\label{sec:user:wpwa}
+%
+% \DescribeMacro{type} The |type| key specifies the activity type of the work package:
+% |RTD| = Research and technological development (including any activities to prepare for
+% the dissemination and/or exploitation of project results, and coordination activities);
+% |DEM| = Demonstration; |MGT| = Management of the consortium; |OTHER| = Other specific
+% activities, if applicable in this call.
+%
+% \subsection{Milestones and Deliverables}\label{sec:user:deliverables}
+%
+% |euproposal.cls| adds the \DescribeMacro{verif}|verif| key to \DescribeMacro{\milestone}
+% for specifying a means of verification that the milestone has been successful.
+%
+% With this, we can generate the milestone table that is required in many EU
+% proposals. This can simply be done via the
+% \DescribeMacro{\milestonetable}|\milestonetable| macro. It takes a keyword argument with
+% the keys \DescribeMacro{caption}|caption| for specifying a different caption, and the
+% widths \DescribeMacro{wname}|wname|, \DescribeMacro{wdeliv}|wdeliv|, and
+% \DescribeMacro{wverif}|wverif| that can be used to specify different widths for the
+% name/deliverables/verification columns in the milestone table.
+%
+% \subsection{Risks}\label{sec:user:risks}
+% In some EU proposals (e.g. FET), we need to identify risks and contingency and specify
+% mitigation plans for them. In the |euproposal| we use two environments to mark them up.
+%
+% \DescribeMacro{risk}|\begin{risk}{|\meta{title}|}{|\meta{prob}|}{|\meta{grav}|}|\ldots|\end{risk}|
+% makes a paragraph no a risk \meta{title} with gravity \meta{grav} and probability
+% \meta{prob}, where the body of the environment contains a description of the risk. The
+% \DescribeMacro{riskcont}|riskcont| is a variant, where \meta{title} names a risk and the
+% body is a description of the contingency plan.
+%
+% \begin{newpart}{MK@MK: This is new, and only partially implemented}
+% \subsection{Reporting Infrastructure}\label{sec:user:report}
+%
+% The |eureporting| class gives an infrastructure for writing final reports of completed
+% projects (see the file |finalreport.tex| in the package distribution). The
+% \DescribeEnv{report}|report| environment has functionality analogous to the |proposal|
+% environment. It takes the same metadata keys --- making it easy to generate by
+% copy/paste from the proposal --- but adds the keys \DescribeMacro{key}|key| can be used
+% to specify the reference key (something like \texttt{KO 2428 47-11}) given to the
+% project by EU. Note that in the case of multiple proposers, you can use multiple
+% instances of |key| to specify more than one reference key.
+% \end{newpart}
+%
+% \section{Limitations and Enhancements}\label{sec:limitations}
+%
+% The |euproposal| is relatively early in its development, and many enhancements are
+% conceivable. We will list them here.
+% \begin{enumerate}
+% \item none reported yet.
+% \end{enumerate}
+% If you have other enhancements to propose or feel you can alleviate some limitation,
+% please feel free to contact the author.
+%
+% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage
+%
+% \section{The Implementation}\label{sec:implementation}
+%
+% In this section we describe the implementation of the functionality of the |euproposal|
+% and |eureporting| classes and the |eupdata| package.
+%
+% \subsection{Package Options and Format Initialization}\label{sec:impl:options}
+%
+% We first set up the options for the package.
+%
+% \begin{macrocode}
+%<*cls>
+\newif\ifpartB\partBfalse
+\DeclareOption{partB}{\partBtrue}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{proposal}}
+%</cls>
+%<reporting>\DeclareOption*{\PassOptionsToClass{\CurrentOption}{reporting}}
+%<cls|reporting>\ProcessOptions
+% \end{macrocode}
+%
+% Then we load the packages we make use of
+%
+% \begin{macrocode}
+%<cls>\ifpartB\LoadClass[report,noRAM]{proposal}\else\LoadClass[noRAM]{proposal}\fi
+%<reporting>\LoadClass[report,noRAM]{reporting}
+%<*cls|reporting>
+\RequirePackage{longtable}
+\RequirePackage{eurosym}
+\RequirePackage{wrapfig}
+\RequirePackage{eupdata}
+% \end{macrocode}
+% we want to change the numbering of figures and tables
+% \begin{macrocode}
+\RequirePackage{chngcntr}
+\counterwithin{figure}{subsection}
+\counterwithin{table}{subsection}
+%</cls|reporting>
+% \end{macrocode}
+%
+% \subsection{Proposal Metadata and Title Page}\label{sec:impl:metadata}
+%
+% We extend the metadata keys from the |proposal| class.
+% \begin{macrocode}
+%<*pdata>
+\define@key{prop@gen}{coordinator}{\def\prop@gen@coordinator{#1}\pdata@def{prop}{gen}{coordinator}{#1}}
+\define@key{prop@gen}{coordinatorsite}{\def\prop@gen@coordinatorsite{#1}\pdata@def{prop}{gen}{coordinator}{#1}}
+\def\prop@gen@challenge{??}\def\prop@gen@challengeid{??}
+\define@key{prop@gen}{challenge}{\def\prop@gen@challenge{#1}\pdata@def{prop}{gen}{challenge}{#1}}
+\define@key{prop@gen}{challengeid}{\def\prop@gen@challengeid{#1}\pdata@def{prop}{gen}{challengeid}{#1}}
+\def\prop@gen@objective{??}\def\prop@gen@objectiveid{??}
+\define@key{prop@gen}{objective}{\def\prop@gen@objective{#1}\pdata@def{prop}{gen}{objective}{#1}}
+\define@key{prop@gen}{objectiveid}{\def\prop@gen@objectiveid{#1}\pdata@def{prop}{gen}{objectiveid}{#1}}
+\def\prop@gen@outcome{??}\def\prop@gen@outcomeid{??}
+\define@key{prop@gen}{outcome}{\def\prop@gen@outcome{#1}\pdata@def{prop}{gen}{outcome}{#1}}
+\define@key{prop@gen}{outcomeid}{\def\prop@gen@outcomeid{#1}\pdata@def{prop}{gen}{outcomeid}{#1}}
+\define@key{prop@gen}{callname}{\def\prop@gen@call{#1}\pdata@def{prop}{gen}{callname}{#1}}
+\define@key{prop@gen}{callid}{\def\prop@gen@call{#1}\pdata@def{prop}{gen}{callid}{#1}}
+\define@key{prop@gen}{iconrowheight}{\def\prop@gen@iconrowheight{#1}}
+\define@key{prop@gen}{topicsaddressed}{\def\prop@gen@topicsaddressed{#1}}
+%</pdata>
+% \end{macrocode}
+%
+% and now the ones for the final report
+% \begin{macrocode}
+%<*reporting>
+\define@key{prop@gen}{reportperiod}{\def\prop@gen@reportperiod{#1}}
+\define@key{prop@gen}{key}{\@dmp{key=#1}%
+\@ifundefined{prop@gen@keys}{\xdef\prop@gen@keys{#1}}{\xdef\prop@gen@keys{\prop@gen@keys,#1}}}
+\define@key{prop@gen}{projpapers}{\def\prop@gen@projpapers{#1}}
+%</reporting>
+% \end{macrocode}
+%
+% and the default values, these will be used, if the author does not specify something
+% better.
+%
+% If the |propB| option is given, we need to redefine some of the internal counters and
+% table of contents mechanisms to adapt to the fact that the proposal text is just Part B.
+%
+% \begin{macrocode}
+%<*cls>
+\ifpartB
+\def\thepart{\Alph{part}}
+\setcounter{part}{2}
+\def\thechapter{\thepart.\arabic{chapter}}
+\def\numberline#1{\hb@xt@\@tempdima{#1\hfil} }
+\fi
+% \end{macrocode}
+%
+% \begin{macro}{\prop@sites@table}
+% \begin{macrocode}
+\newcommand\prop@sites@table{\def\@@table{}
+{\let\tabularnewline\relax\let\hline\relax
+\@for\@I:=\prop@gen@sites\do{\xdef\@@table{\@@table\pdataref{site}\@I{number}}
+\xdef\@@table{\@@table&\@nameuse{wa@institution@\@I @name}
+\ifx\@I\prop@gen@coordinatorsite (coordinator)\fi}
+\xdef\@@table{\@@table&\@nameuse{wa@institution@\@I @acronym}}
+\xdef\@@table{\@@table&\@nameuse{wa@institution@\@I @countryshort}\tabularnewline\hline}}}
+\begin{tabular}{|l|p{8cm}|l|l|}\hline%|
+\# & Participant organisation name & Short name & Country\\\hline\hline
+\@@table
+\end{tabular}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{prop@proposal}
+% \begin{macrocode}
+\renewenvironment{prop@proposal}
+{\ifgrantagreement\else
+ \thispagestyle{empty}\begin{center}
+ {\Large \prop@gen@instrument}\\[.2cm]
+ {\Large\textbf\prop@gen@callname}\\[.4cm]
+ {\LARGE \prop@gen@callid}\\[.8cm]
+ {\huge\textbf\prop@gen@title}\\[.4cm]
+ {\LARGE Acronym: {\prop@gen@acronym}}\\[2cm]
+\end{center}
+%{\large\prop@gen@instrument}\\
+{\large\textbf{Date of Preparation: \today}}
+% \ifsubmit\else\if@svninfo\if@gitinfo\\
+% {\large\textbf{Revision}:
+% \if@svninfo\svnInfoRevision\fi\if@gitinfo\gitAbbrevHash\fi
+% of
+% \if@svninfo\svnInfoDate\fi\if@gitinfo\gitAuthorDate\fi}
+% \fi\fi\fi
+\\[1em]
+\begin{large}
+ \begin{description}
+ % \item[Work program topics addressed by \pn:]
+ % \@ifundefined{prop@gen@topicsaddressed}
+ % {\textbf{Challenge \prop@gen@challengeid}: \prop@gen@challenge,
+ % \textbf{Objective \prop@gen@objectiveid}: \prop@gen@objective,
+ % \textbf{target outcome \prop@gen@outcomeid}) \prop@gen@outcome.
+ % {\prop@gen@topicsaddressed}\\[1em]
+ \item[Coordinator:] \wa@ref{person}\prop@gen@coordinator{name}
+ \item[e-mail:] \wa@ref{person}\prop@gen@coordinator{email}
+ \item[tel/fax:] \wa@ref{person}\prop@gen@coordinator{worktelfax}
+ \@ifundefined{prop@gen@keywords}{}{\item[Keywords:] \prop@gen@keywords}
+ \end{description}
+\end{large}
+\vspace*{1em}
+\begin{center}
+\prop@sites@table\vfill
+\@ifundefined{prop@gen@iconrowheight}{}
+{\@for\@site:=\prop@gen@sites\do{\wa@institution@logo[height=\prop@gen@iconrowheight]\@site\qquad}}
+\end{center}
+\newpage
+\fi% ifgrantagreement
+\setcounter{tocdepth}{2}\setcounter{part}{2}}
+{\newpage\printbibliography[heading=warnpubs,maxnames=999]}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macrocode}
+\def\prop@gen@instrument{Proposal Instrument (e.g. IP)}
+% \end{macrocode}
+%
+% \subsection{Site Descriptions}\label{sec:sitedesc}
+% \ednote {this functionality should probably be refactored into proposal.dtx}
+%
+% \begin{environment}{sitedescription}
+% \ednote{document this above} |\begin{sitedescritpion}[|\meta{opt}|]{\meta{site}}|
+% marks up the description for the site \meta{site}. It looks up the relevant metadata
+% from the respective |\WAinstitution| declarations. The options argument \meta{opt}
+% is a key-value list for the keys \DescribeMacro{logo}|logo| (add the logo from
+% |\WAinstitution| to the site description), \DescribeMacro{width}|width|,
+% \DescribeMacro{height}|height| (intended dimensions of the logo), \ednote{more?}.
+% \begin{macrocode}
+\define@key{site@desc}{box}[true]{\def\site@desc@box{#1}%
+\pdata@def{sitedesc}{\@site}{box}{#1}}
+\define@key{site@desc}{logo}[true]{\def\site@desc@logo{#1}%
+\pdata@def{sitedesc}{\@site}{logo}{#1}}
+\define@key{site@desc}{width}{\def\site@desc@width{#1}%
+\pdata@def{sitedesc}{\@site}{width}{#1}\@dmp{wd=#1}}
+\define@key{site@desc}{height}{\def\site@desc@height{#1}%
+\pdata@def{sitedesc}{\@site}{height}{#1}\@dmp{ht=#1}}
+\newenvironment{sitedescription}[2][]%
+{\def\c@site{#2}% remember the site ID
+\newcounter{site@#2@PM} % for the site PM
+\def\site@desc@box{false}% not box unless requested
+\def\site@desc@logo{false}% not logo unless requested
+\def\site@desc@height{1.3cm}% default height
+\def\site@desc@width{5cm}% default width
+\setkeys{site@desc}{#1}% read the keys to overwrite the defaults
+\ifx\@site@desc@box\@true% if we want a logo
+\begin{wrapfigure}{r}{\site@desc@width}\vspace{-2.5ex}%
+\begin{tabular}{|p{\site@desc@width}|}\hline\vspace{1mm}%
+\ifx\@site@desc@logo\@true% if we want a logo
+\wa@institution@logo[height=\site@desc@width]{#2}\\[1ex]%
+\fi% end logo
+\textbf{\wa@ref{institution}{#2}{type}.\hfill \wa@ref{institution}{#2}{country}}\\%
+\small\wa@ref{institution}{#2}{streetaddress}, \wa@ref{institution}{#2}{townzip}\\\hline%
+\end{tabular}\vspace{-2.5ex}%
+\end{wrapfigure}%
+\fi% end box
+\pdata@target{site}{#2}%
+{\subsubsection{\wa@ref{institution}{#2}{acronym}: % space here
+{\textsc{\wa@ref{institution}{#2}{name}} (\wa@ref{institution}{#2}{countryshort})}}}%
+\small%
+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {0.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries}}}
+{\pdata@def{site}{\c@site}{reqPM}{\csname thesite@\c@site @PM\endcsname}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{participant}
+% \ednote{document this above} |\begin{picv}[|\meta{PM}|]{\meta{name}}| marks up the CV
+% and metadata about a principal investigator of a site (it can only be use inside a
+% |sitedescription| environment). The first argument \meta{PM} specifies the
+% involvement in person months: a fair estimation this PI will spend on this specific
+% project over its whole duration.
+% \begin{macrocode}
+\define@key{site@part}{type}{\def\site@part@type{#1}\@dmp{type=#1}}
+\define@key{site@part}{PM}{\def\site@part@PM{#1}\@dmp{PM=#1}}
+\define@key{site@part}{salary}{\def\site@part@salary{#1}}%\@dmp{\euro=#1}}
+\define@key{site@part}{gender}{\def\site@part@gender{#1}}%\@dmp{\euro=#1}}
+\newenvironment{participant}[2][]%
+{\def\site@part@type{}\def\site@part@PM{}\def\site@part@salary{}\def\site@part@gender{}%
+\setkeys{site@part}{#1}%
+\ifx\site@part@PM\@empty\else\addtocounter{site@\c@site @PM}{\site@part@PM}\fi%
+\paragraph*{#2\ %
+(\ifx\site@part@type\@empty\else\site@part@type\fi%
+\ifx\site@part@gender\@empty\else, \site@part@gender\fi%
+\ifx\site@part@PM\@empty\else, \site@part@PM~PM\fi%
+)}%
+\ignorespaces}
+{\par\medskip}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Work Packages, Work Areas, and Deliverables}\label{sec::impl:wpwa}
+%
+% \begin{environment}{wp*}
+% \begin{macrocode}
+\newmdenv[frametitle=Objectives]{wpobjectives}
+\newmdenv[frametitle=Description]{wpdescription}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{workpackage}
+%
+% \begin{macrocode}
+\renewenvironment{workpackage}[1][]
+{\begin{work@package}[#1]\medskip\wpheadertable%
+\addcontentsline{toc}{subsubsection}{\wp@label\wp@num: \pdataref{wp}\wp@id{title}}}
+{\end{work@package}}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\wpheadertable}
+% We redefine the macro that computes the default work package header table, since there
+% are more sites in a EU proposal, we do this in a tabular form as asked for in the
+% template. We use the internal counter |@sites@po| (sites plus one) for convenience.
+% \begin{macrocode}
+\newcounter{@sitespo}\newcounter{@sitespt}
+\renewcommand\wpheadertable{%
+\wp@sites@efforts@lines%
+\setcounter{@sitespo}{\thewp@sites@num}\addtocounter{@sitespo}{1}%
+\par\noindent\begin{tabular}{|l|*{\thewp@sites@num}{c|}c|}\hline%
+\multicolumn{\the@sitespo}{|l|}{\textbf{\wp@mk@title{\wp@num}: }%
+\textsf{\pdata@target{wp}{\wp@id}{\pdataref{wp}\wp@id{title}}}}
+&\textbf{Start: }\pdataref{wp}\wp@id{start}\\\hline%
+\wp@sites@line\\\hline%
+\wp@efforts@line\\\hline%
+\end{tabular}\smallskip\par\noindent\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Milestones and Deliverables}\label{sec:impl:deliverables}
+%
+% \begin{environment}{wpdelivs}
+% We make the deliverables boxed in EU proposals, this is simple with |mdframed.sty|.
+% \begin{macrocode}
+\surroundwithmdframed{wpdelivs}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\milestone}
+% \begin{macrocode}
+\define@key{milestone}{verif}{\gdef\mile@verif{#1}\pdata@def{mile}\mile@id{verif}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{milestonetable}
+% here we do the work.
+% \begin{macrocode}
+\define@key{mst}{caption}{\gdef\mst@caption{#1}}
+\define@key{mst}{wname}{\gdef\mst@wname{#1}}
+\define@key{mst}{wdeliv}{\gdef\mst@wdeliv{#1}}
+\define@key{mst}{wverif}{\gdef\mst@wverif{#1}}
+\newcommand\milestonetable[1][]{%
+\def\mst@caption{Milestones, Deliverables, and Verification}%
+\def\mst@wname{2.5cm}\def\mst@wdeliv{7cm}\def\mst@wverif{4cm}
+\setkeys{mst}{#1}%
+{\gdef\mst@lines{}%initialize
+\let\tabularnewline\relax\let\hline\relax% so they
+\let\textbf\relax\let\emph\relax% do not bother us
+\edef\@@miles{\pdataref{all}{mile}{ids}}
+\@for\@I:=\@@miles\do{
+\edef\@delivs{\pdataref@safe{mile}{\@I}{delivs}}%
+\def\@@delivs{}
+\@for\@J:=\@delivs\do{\xdef\@@delivs{\@@delivs\ \pdataref{deliv}\@J{label}}}
+\def\@@line{
+\textbf{\pdataref{mile}\@I{label}}&
+\emph{\pdataref{mile}{\@I}{title}} &
+\@@delivs&
+\pdataref{mile}\@I{month} &
+\pdataref{mile}\@I{verif}}
+\xdef\mst@lines{\mst@lines\@@line\tabularnewline\hline}}}
+\begin{table}[ht]
+\begin{tabular}{|l|p{\mst@wname}|p{\mst@wdeliv}|l|p{\mst@wverif}|}\hline
+\#&\textbf{\miles@legend@name}
+&\textbf{\miles@legend@involved}
+&\textbf{\miles@legend@mo}
+&\textbf{\miles@legend@verif}\\\hline\hline
+\mst@lines
+\end{tabular}
+\caption{\mst@caption}\label{tab:milestonetable}
+\end{table}
+\footnotetext\miles@legend@footnote}
+% \end{macrocode}
+% now the multilinguality support
+% \begin{macrocode}
+\newcommand\miles@legend@name{Name}
+\newcommand\miles@legend@mo{Mo}
+\newcommand\miles@legend@verif{Means of Verif.}
+\newcommand\miles@legend@involved{WPs\footnotemark/Deliverables involved}
+\newcommand\miles@legend@footnote{The work package number is the first number in the deliverable number.}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\prop@milesfor}
+% the due date is the first argument to facilitate sorting
+% \begin{macrocode}
+\newcommand\prop@milesfor[1]{\edef\@delivs{\pdataref@safe{mile}{#1}{delivs}}%
+\let\m@sep=\relax\def\new@sep{,\ }%
+\@for\@I:=\@delivs\do{\m@sep\pdataRef{deliv}\@I{label}\let\m@sep=\new@sep}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Risks}\label{sec:impl:risks}
+%
+% \begin{environment}{risk}
+% \begin{macrocode}
+\newenvironment{risk}[3]
+{\paragraph{Risk: #1}\hfill\emph{probability}: #2, \emph{gravity}: #3\par\noindent\ignorespaces}
+{}
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{environment}{riskcont}
+% \begin{macrocode}
+\newenvironment{riskcont}[3]
+{\begin{risk}{#1}{#2}{#3}\textbf{Contingency:} }
+{\end{risk}}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Relevant Papers}\label{sec:impl:papers}
+%
+% \begin{macro}{\keypubs}
+% \ednote{MK: the baselinestretch manipulation does not work here, since
+% \texttt{prop@paperslist} makes its own provisions. We should provide a way of
+% manipulating sizes here.}
+% \begin{macrocode}
+\newcommand\keypubs[1]{%
+\paragraph{Key publications relevant to the project}%
+{\renewcommand{\baselinestretch}{.9}\prop@paperlist{#1}}}
+%</cls>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput
+% LocalWords: iffalse cls euproposal euproposal.dtx tt maketitle newpage wpwa eudata dfg
+% LocalWords: tableofcontents ednote euproposal DescribeEnv compactitem impl eureporting
+% LocalWords: longtable eurosym pdata thepart setcounter env vfill qquad NeedsTeXFormat
+% LocalWords: thechapter newcommand tabularnewline hline xdef pdataref nameuse SciML gen
+% LocalWords: countryshort rpoposal clange wrapfig wrapfigure vspace bfseries eupdata wd
+% LocalWords: startsection normalfont normalsize baselinestretch callname hb newpart wp
+% LocalWords: countryshort rpoposal clange wrapfig renewenvironment worktelfax prop@gen
+% LocalWords: tocdepth wpobjectives newenvironment noindent boxedminipage fbox warnpubs
+% LocalWords: textwidth textbf wpdescription sitedescription pgfdeclareimage projpapers
+% LocalWords: wrapfigure vspace pgfuseimage streetaddress townzip textsc xt wa maxnames
+% LocalWords: renewcommand startsection normalfont normalsize bfseries wptitle sitedesc
+% LocalWords: workpackage subsubsection wpheadertable newcounter sitespo hfil if@svninfo
+% LocalWords: newcounter sitespt addtocounter textsf smallskip ignorespaces pn setkeys
+% LocalWords: cellcolor lightgray keypubs paperlist callname callid callid ifx csname
+% LocalWords: challengeid challengeid objectiveid objectiveid outcomeid hfill if@gitinfo
+% LocalWords: outcomeid metakeys workaddress numberline tempdima ifsubmit iconrowheight
+% LocalWords: proposal.dtx texttt paperslist workaddress.dtx topicsaddressed thesite
+% LocalWords: topicsaddressed iconrowheight finalreport.tex printbibliography endcsname
+% LocalWords: reportperiod organisation thispagestyle gitAbbrevHash sitedescritpion
+% LocalWords: WAinstitution picv medskip newmdenv frametitle wpdelivs mdframed.sty emph
+% LocalWords: surroundwithmdframed emph riskcont prob grav ldots endinput
diff --git a/macros/latex/contrib/proposal/eu/euproposal.ins b/macros/latex/contrib/proposal/eu/euproposal.ins
new file mode 100644
index 0000000000..eba8cbf9bb
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/euproposal.ins
@@ -0,0 +1,37 @@
+%%
+%% This file generates files required to use the dfgproposal package.
+%% At your command prompt write
+%%
+%% latex dfgproposal.ins
+%%
+%% Copyright(c) 2010 Michael Kohlhase
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%% $Id: euproposal.ins 23009 2012-01-18 10:12:28Z kohlhase $
+%% $HeadURL: https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/eu/euproposal.ins $
+
+\input docstrip
+\preamble
+\endpreamble
+
+%\usedir{tex/latex/listings}
+\keepsilent
+\askforoverwritefalse
+
+% generate base package
+\generate{\file{eupdata.sty}{\from{euproposal.dtx}{pdata}}}
+\generate{\file{euproposal.cls}{\from{euproposal.dtx}{cls}}}
+\generate{\file{eureporting.cls}{\from{euproposal.dtx}{reporting}}}
+
+\Msg{*}
+\Msg{* You probably need to move the file euproposal.cls, eureporting.cls, and eupdata.sty}
+\Msg{* into a directory searched by TeX.}
+\Msg{*}
+\Msg{* And don't forget to refresh your filename database}
+\Msg{* if your TeX distribution uses such a database.}
+\Msg{*}
+
+\endbatchfile
diff --git a/macros/latex/contrib/proposal/eu/euproposal.pdf b/macros/latex/contrib/proposal/eu/euproposal.pdf
new file mode 100644
index 0000000000..8d3cd256f0
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/euproposal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/eu/strep/Makefile b/macros/latex/contrib/proposal/eu/strep/Makefile
new file mode 100644
index 0000000000..9b4a6fdb04
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/Makefile
@@ -0,0 +1,77 @@
+###########################################################################
+# Automating proposal management by make.
+# The participants work on proposal.tex in "draft" mode, which gives a lot
+# of information to the developers. Variants submit.tex and public.tex are
+# used to prepare official versions (hiding development/private info).
+###########################################################################
+# possibly customize the following variables to your setting
+PROPOSAL = propB.tex # the proposal
+BIB = ../lib/dummy.bib # bibTeX databases
+PROP.dir = ../../..
+###########################################################################
+# the following are computed
+TSIMP = # pdflatex Targets without bibTeX
+TSIMP.pdf = $(TSIMP:%.tex=%.pdf) # PDFs to be produced
+TBIB = $(PROPOSAL) # pdflatex Targets with bibTeX
+TARGET = $(TSIMP) $(TBIB) # all pdflatex targets
+TBIB.pdf = $(TBIB:%.tex=%.pdf) # PDFs to be produced
+TBIB.aux = $(TBIB:%.tex=%.aux) # their aux files.
+PDATA = $(PROPOSAL:%.tex=%.pdata) # the proposal project data
+SRC = $(filter-out $(TARGET),$(shell ls *.tex)) # included files
+PDFLATEX = pdflatex -interaction batchmode -file-line-error
+BBL.base = 1 2 3 4
+BBL = $(PROPOSAL:%.tex=%.bbl) $(BBL.base:%=$(PROPOSAL:%.tex=%)%-blx.bbl)
+PROPCLS.dir = $(PROP.dir)/base
+PROPETC.dir = $(PROP.dir)/etc
+EUPROPCLS.dir = $(PROP.dir)/eu
+TEXINPUTS := .//:$(PROPCLS.dir)//:$(EUPROPCLS.dir)//:$(PROPETC.dir)//:
+BIBINPUTS := ../lib:$(BIBINPUTS)
+PROPCLS.clssty = proposal.cls pdata.sty
+PROPETC.sty = workaddress.sty metakeys.sty sref.sty
+EUPROPCLS.clssty = euproposal.cls
+PROPCLS = $(PROPCLS.clssty:%=$(PROPCLS.dir)/%) $(EUPROPCLS.clssty:%=$(EUPROPCLS.dir)/%) $(PROPETC.sty:%=$(PROPETC.dir)/%)
+
+all: $(TBIB.pdf) $(TSIMP.pdf)
+
+submit:
+ $(MAKE) -w PROPOSAL=final.tex all
+
+public:
+ $(MAKE) -w PROPOSAL=public.tex all
+
+bbl: $(BBL)
+$(BBL): %.bbl: %.aux
+ bibtex -min-crossrefs=100 -terse $<
+
+$(TSIMP.pdf): %.pdf: %.tex $(PROPCLS) $(PDATA)
+ $(PDFLATEX) $< || $(RM) $@
+
+$(PDATA): %.pdata: %.tex
+ $(PDFLATEX) $<
+
+$(TBIB.aux): %.aux: %.tex
+ $(PDFLATEX) $<
+
+$(TBIB.pdf): %.pdf: %.tex $(SRC) $(BIB) $(PROPCLS)
+ $(PDFLATEX) $< || $(RM) $@
+ sort $(PROPOSAL:%.tex=%.delivs) > $(PROPOSAL:%.tex=%.deliverables)
+ @if (test -e $(patsubst %.tex, %.idx, $<));\
+ then makeindex $(patsubst %.tex, %.idx, $<); fi
+ $(MAKE) -$(MAKEFLAGS) $(BBL)
+ @if (grep "(re)run BibTeX" $(patsubst %.tex, %.log, $<)> /dev/null);\
+ then $(MAKE) -B $(BBL); fi
+ $(PDFLATEX) $< || $(RM) $@
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+ @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
+ then $(PDFLATEX) $< || $(RM) $@; fi
+
+clean:
+ rm -f *.log *.blg *~ *.synctex.gz *.cut
+
+distclean: clean
+ rm -f *.aux *.out *.run.xml *.bbl *.toc *.deliv* *.pdata
+ rm -Rf auto
+
+echo:
+ echo $(BBL)
diff --git a/macros/latex/contrib/proposal/eu/strep/README b/macros/latex/contrib/proposal/eu/strep/README
new file mode 100644
index 0000000000..72aee78682
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/README
@@ -0,0 +1,14 @@
+An Exapmle for euproposal.cls
+
+proposal.tex is a fake EU proposal that shows all elements of euproposal.cls
+ in action.
+*.tex the rest are intemediate files
+Makefile allows the automation via a unix Makefile on the author's
+ machine, adapt it to your needs
+
+Copyright(c) 2010 Michael Kohlhase
+The package is distributed under the terms of the LaTeX Project Public License (LPPL)
+
+The development version of this package can be found at
+https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/euproposal
+
diff --git a/macros/latex/contrib/proposal/eu/strep/deliverables.tex b/macros/latex/contrib/proposal/eu/strep/deliverables.tex
new file mode 100644
index 0000000000..355a7fd13e
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/deliverables.tex
@@ -0,0 +1,34 @@
+\subsection{List of Deliverables}\label{sec:deliverables}
+
+\begin{todo}{from the proposal template}
+\begin{compactenum}
+\item Deliverable numbers in order of delivery dates. Please use the numbering convention <WP number>.<number of deliverable within
+that WP>. For example, deliverable 4.2 would be the second deliverable from work package 4.
+\item Please indicate the nature of the deliverable using one of the following codes:
+R = Report, P = Prototype, D = Demonstrator, O = Other
+\item Please indicate the dissemination level using one of the following codes:
+PU = Public
+PP = Restricted to other programme participants (including the Commission Services).
+RE = Restricted to a group specified by the consortium (including the Commission Services).
+CO = Confidential, only for members of the consortium (including the Commission Services).
+\end{compactenum}
+\end{todo}
+We will now give an overview over the deliverables and milestones of the work
+packages. Note that the times of deliverables after month 24 are estimates and may change
+as the work packages progress.
+
+In the table below, {\emph{integrating work deliverables}} (see top of
+section~\ref{sec:wplist}) are printed in boldface to mark them. They integrate
+contributions from multiple work packages. \ednote{CL: the rest of this paragraph does not
+ comply with the EU guide for applicants, needs to be rewritten}These can have the
+dissemination level ``partial'', which indicates that it contains parts of level
+``project'' that are to be disseminated to the project and evaluators only. In such
+reports, two versions are prepared, and disseminated accordingly.
+
+{\footnotesize\inputdelivs{8cm}}
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/draft.tex b/macros/latex/contrib/proposal/eu/strep/draft.tex
new file mode 100644
index 0000000000..9b8be16dd9
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/draft.tex
@@ -0,0 +1 @@
+\input{proposal.tex}
diff --git a/macros/latex/contrib/proposal/eu/strep/final.tex b/macros/latex/contrib/proposal/eu/strep/final.tex
new file mode 100644
index 0000000000..3d105cc409
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/final.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{submit}
+\input{proposal.tex}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/grantagreement.tex b/macros/latex/contrib/proposal/eu/strep/grantagreement.tex
new file mode 100644
index 0000000000..b90ee7b8f7
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/grantagreement.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{submit,grantagreement}
+\input{proposal.tex}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/impact.tex b/macros/latex/contrib/proposal/eu/strep/impact.tex
new file mode 100644
index 0000000000..210ebdee35
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/impact.tex
@@ -0,0 +1,40 @@
+\chapter{Impact}\label{chap:impact}
+\ednote{Maximum length for the whole of Section 3 –-- ten pages}
+
+\section{Expected Impacts listed in the Work Programe }\label{sec:expected-impact}
+\begin{todo}{from the proposal template}
+ Describe how your project will contribute towards the expected impacts listed in the
+ work programme in relation to the topic or topics in question. Mention the steps that
+ will be needed to bring about these impacts. Explain why this contribution requires a
+ European (rather than a national or local) approach. Indicate how account is taken of
+ other national or international research activities. Mention any assumptions and
+ external factors that may determine whether the impacts will be achieved.
+\end{todo}
+\subsection{Medium Term Expected Outcome}
+
+\subsection{Long Term Expected Outcomes}
+\subsection{Use Cases}
+
+\section{Dissemination and/or Use of Project Results, and Management of Intellectual Property}\label{sec:dissemination}
+
+\begin{todo}{from the proposal template}
+ Describe the measures you propose for the dissemination and/or exploitation of project
+ results, and how these will increase the impact of the project. In designing these
+ measures, you should take into account a variety of communication means and target
+ groups as appropriate (e.g. policy-makers, interest groups, media and the public at
+ large).
+
+ For more information on communication guidance, see the URL
+ \url{http://ec.europa.eu/research/science-society/science-communication/index_en.htm}
+
+ Describe also your plans for the management of knowledge (intellectual property)
+ acquired in the course of the project.
+\end{todo}
+
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: ednote
diff --git a/macros/latex/contrib/proposal/eu/strep/implementation.tex b/macros/latex/contrib/proposal/eu/strep/implementation.tex
new file mode 100644
index 0000000000..5d687c903d
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/implementation.tex
@@ -0,0 +1,103 @@
+\chapter{Implementation}\label{chap:implementation}
+
+\section{Management Structure and Procedures}\label{chap:management}
+\begin{todo}{from the proposal template}
+ Describe the organizational structure and decision-making mechanisms
+ of the project. Show how they are matched to the nature, complexity
+ and scale of the project. Maximum length of this section: five pages.
+\end{todo}
+
+The Project Management of {\pn} is based on its Consortium Agreement, which will be
+signed before the Contract is signed by the Commission. The Consortium Agreement will
+enter into force as from the date the contract with the European Commission is signed.
+\subsection{Organizational structure}\label{sec:management-structure}
+\subsection{Milestones}\label{sec:milestones}
+\milestonetable
+\subsection{Risk Assessment and Management}
+\subsection{Information Flow and Outreach}\label{sec:spread-excellence}
+\subsection{Quality Procedures}\label{sec:quality-management}
+\subsection{Internal Evaluation Procedures}
+\newpage
+\section{Individual Participants}\label{sec:partners}
+\begin{todo}{from the proposal template}
+For each participant in the proposed project, provide a brief description of the legal entity, the main
+tasks they have been attributed, and the previous experience relevant to those tasks. Provide also a
+short profile of the individuals who will be undertaking the work.\\
+Maximum length for Section 2.2: one page per participant. However, where two or more departments within
+an organisation have quite distinct roles within the proposal, one page per department is acceptable.\\
+The maximum length applying to a legal entity composed of several members, each of which is a separate
+legal entity (for example an EEIG1), is one page per member, provided that the members have quite distinct
+roles within the proposal.
+\end{todo}
+\newpage
+\input{site-jacu}\newpage
+\input{site-efo}\newpage
+\input{site-bar}\newpage
+\input{site-baz}\newpage
+
+\section{The {\protect\pn} consortium as a whole}
+\begin{todo}{from the proposal template}
+ Describe how the participants collectively constitute a consortium capable of achieving
+ the project objectives, and how they are suited and are committed to the tasks assigned
+ to them. Show the complementarity between participants. Explain how the composition of
+ the consortium is well-balanced in relation to the objectives of the project.
+
+ If appropriate describe the industrial/commercial involvement to ensure exploitation of
+ the results. Show how the opportunity of involving SMEs has been addressed
+\end{todo}
+
+The project partners of the \pn project have a long history of successful collaboration;
+Figure~\ref{tab:collaboration} gives an overview over joint projects (including proposals) and
+joint publications (only international, peer reviewed ones).
+
+\jointorga{jacu,efo,baz}
+\jointpub{efo,baz,jacu}
+\jointproj{efo,bar}
+\jointsup{jacu,bar}
+\jointsoft{baz,efo}
+\coherencetable
+
+\subsection{Subcontracting}\label{sec:subcontracting}
+\begin{todo}{from the proposal template}
+ If any part of the work is to be sub-contracted by the participant responsible for it,
+ describe the work involved and explain why a sub-contract approach has been chosen for
+ it.
+\end{todo}
+\subsection{Other Countries}\label{sec:other-countries}
+\begin{todo}{from the proposal template}
+ If a one or more of the participants requesting EU funding is based outside of the EU
+ Member states, Associated countries and the list of International Cooperation Partner
+ Countries\footnote{See CORDIS web-site, and annex 1 of the work programme.}, explain in
+ terms of the project’s objectives why such funding would be essential.
+\end{todo}
+
+\subsection{Additional Partners}\label{sec:assoc-partner}
+\begin{todo}{from the proposal template}
+ If there are as-yet-unidentified participants in the project, the expected competences,
+ the role of the potential participants and their integration into the running project
+ should be described
+\end{todo}
+\section{Resources to be Committed}\label{sec:resources}
+\begin{todo}{from the proposal template}
+Maximum length: two pages
+
+Describe how the totality of the necessary resources will be mobilized, including any resources that
+will complement the EC contribution. Show how the resources will be integrated in a coherent way,
+and show how the overall financial plan for the project is adequate.
+
+In addition to the costs indicated on form A3 of the proposal, and the effort shown in Section 1.3
+above, please identify any other major costs (e.g. equipment). Ensure that the figures stated in Part B
+are consistent with these.
+\end{todo}
+
+\subsection{Travel Costs and Consumables}\label{sec:travel-costs}
+\subsection{Subcontracting Costs}
+\subsection{Other Costs}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: pn newpage site-jacu site-efo site-baz jointpub efo baz
+% LocalWords: jointproj coherencetable assoc-partner
diff --git a/macros/latex/contrib/proposal/eu/strep/issues.tex b/macros/latex/contrib/proposal/eu/strep/issues.tex
new file mode 100644
index 0000000000..e17761b8b7
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/issues.tex
@@ -0,0 +1,59 @@
+\chapter{Ethical Issues}\label{chap:ethical}
+\begin{todo}{from the proposal template}
+ Describe any ethical issues that may arise in the project. In particular, you should
+ explain the benefit and burden of the experiments and the effects it may have on the
+ research subject. Identify the countries where research will be undertaken and which
+ ethical committees and regulatory organisations will need to be approached during the
+ life of the project.
+
+ Include the Ethical issues table below. If you indicate YES to any issue, please
+ identify the pages in the proposal where this ethical issue is described. Answering
+ 'YES' to some of these boxes does not automatically lead to an ethical review1. It
+ enables the independent experts to decide if an ethical review is required. If you are
+ sure that none of the issues apply to your proposal, simply tick the YES box in the last
+ row.
+\end{todo}
+
+\begin{small}
+\begin{tabular}{|p{1em}p{11cm}|l|l|}\hline
+ \multicolumn{2}{|l|}{\cellcolor{lightgray}{\strut}} &
+ \cellcolor{lightgray}{YES} &
+ \cellcolor{lightgray}{PAGE}\\\hline
+ \multicolumn{2}{|l|}{\bf{Informed Consent}} & & \\\hline
+ & Does the proposal involve children? & & \\\hline
+ & Does the proposal involve patients or persons not able to give consent? & & \\\hline
+ & Does the proposal involve adult healthy volunteers? & & \\\hline
+ & Does the proposal involve Human Genetic Material? & & \\\hline
+ & Does the proposal involve Human biological samples? & & \\\hline
+ & Does the proposal involve Human data collection? & & \\\hline
+ \multicolumn{2}{|l|}{\bf{Research on Human embryo/foetus}} & & \\\hline
+ & Does the proposal involve Human Embryos? & & \\\hline
+ & Does the proposal involve Human Foetal Tissue / Cells? & & \\\hline
+ & Does the proposal involve Human Embryonic Stem Cells? & & \\\hline
+ \multicolumn{2}{|l|}{\bf{Privacy}} & & \\\hline
+ & Does the proposal involve processing of genetic information
+ or personal data (eg. health, sexual lifestyle, ethnicity,
+ political opinion, religious or philosophical conviction) & & \\\hline
+ & Does the proposal involve tracking the location or observation
+ of people? & & \\\hline
+ \multicolumn{2}{|l|}{\bf{Research on Animals}} & & \\\hline
+ & Does the proposal involve research on animals? & & \\\hline
+ & Are those animals transgenic small laboratory animals? & & \\\hline
+ & Are those animals transgenic farm animals? & & \\\hline
+ & Are those animals cloned farm animals? & & \\\hline
+ & Are those animals non-human primates? & & \\\hline
+ \multicolumn{2}{|l|}{\bf{Research Involving Developing Countries}} & & \\\hline
+ & Use of local resources (genetic, animal, plant etc) & & \\\hline
+ & Benefit to local community (capacity building
+ i.e. access to healthcare, education etc) & & \\\hline
+ \multicolumn{2}{|l|}{\bf{Dual Use}} & & \\\hline
+ & Research having direct military application & & \\\hline
+ & Research having the potential for terrorist abuse & & \\\hline
+ \multicolumn{2}{|l|}{\bf{ICT Implants}} & & \\\hline
+ & Does the proposal involve clinical trials of ICT implants? & & \\\hline
+ \multicolumn{2}{|l|}{\bf\footnotesize{I CONFIRM THAT NONE OF THE ABOVE ISSUES APPLY TO MY PROPOSAL}}
+ & &\cellcolor{lightgray}{} \\\hline
+\end{tabular}
+\end{small}
+
+\section{Personal Data}
diff --git a/macros/latex/contrib/proposal/eu/strep/methodology.tex b/macros/latex/contrib/proposal/eu/strep/methodology.tex
new file mode 100644
index 0000000000..86eea4c848
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/methodology.tex
@@ -0,0 +1,49 @@
+\section{Scientific/Technical Methodology and Work Plan}\label{sec:methodology}
+\begin{todo}{from the proposal template}
+ A detailed work plan should be presented, broken down into work packages\footnote{A work
+ package is a major sub-division of the proposed project with a verifiable end-point –
+ normally a deliverable or an important milestone in the overall project.} (WPs) which
+ should follow the logical phases of the implementation of the project, and include
+ consortium management and assessment of progress and results. (Note that your overall
+ approach to management will be described later, in Section 2).
+
+Notes: The number of work packages used must be appropriate to the complexity of the work
+and the overall value of the proposed project. The planning should be sufficiently
+detailed to justify the proposed effort and allow progress monitoring by the Commission.
+
+Any significant risks should be identified, and contingency plans described
+\end{todo}
+\newpage\input{workplan}
+
+\newpage
+\subsection{Work Package List}\label{sec:wplist}
+
+\begin{todo}{from the proposal template}
+Please indicate one activity per work package:
+RTD = Research and technological development; DEM = Demonstration; MGT = Management of the consortium
+\end{todo}
+
+%\makeatletter\wp@total@RM{management}\makeatother
+\wpfigstyle{\footnotesize}
+\wpfig[pages,type,start,end]
+
+\newpage\input{deliverables}
+\newpage\input{milestones}
+
+\subsection{Work Package Descriptions}\label{sec:workpackages}
+\begin{workplan}
+\input{wp-management}\newpage
+\input{wp-dissem}\newpage
+\input{wp-class}\newpage
+\input{wp-temple}\newpage
+\end{workplan}
+\newpage\input{risks}
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: workplan newpage wplist makeatletter makeatother wpfig
+% LocalWords: workpackages wp-dissem wp-class wp-temple
diff --git a/macros/latex/contrib/proposal/eu/strep/milestones.tex b/macros/latex/contrib/proposal/eu/strep/milestones.tex
new file mode 100644
index 0000000000..b64a865eac
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/milestones.tex
@@ -0,0 +1,40 @@
+\subsection{List of Milestones}\label{sec:milestones}
+
+\begin{todo}{from the proposal template}
+ Milestones are control points where decisions are needed with regard to the next stage
+ of the project. For example, a milestone may occur when a major result has been
+ achieved, if its successful attainment is a requirement for the next phase of
+ work. Another example would be a point when the consortium must decide which of several
+ technologies to adopt for further development.
+
+ Means of verification: Show how you will confirm that the milestone has been
+ attained. Refer to indicators if appropriate. For examples: a laboratory prototype
+ completed and running flawlessly, software released and validated by a user group, field
+ survey complete and data quality validated.
+\end{todo}
+
+
+The work in the {\pn} project is structured by seven milestones, which coincide with the
+project meetings in summer and fall. Since the meetings are the main face-to-face
+interaction points in the project, it is suitable to schedule the milestones for these
+events, where they can be discussed in detail. We envision that this setup will give the
+project the vital coherence in spite of the broad mix of disciplinary backgrounds of the
+participants.\ednote{maybe automate the milestones}
+
+\begin{milestones}
+ \milestone[id=kickoff,verif=Inspection,month=1]
+ {Initial Infrastructure}
+ {Set up the organizational infrastructure, in particular: Web Presence, project TRAC,\ldots}
+ \milestone[id=consensus,verif=Inspection,month=24]{Consensus} {Reach Consensus on the
+ way the project goes}
+ \milestone[id=exploitation,verif=Inspection,month=36]{Exploitation}{The exploitation
+ plan should be clear so that we can start on this in the last year.}
+ \milestone[id=final,verif=Inspection,month=48]{Final Results}{all is done}
+\end{milestones}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: pn ednote verif ldots
diff --git a/macros/latex/contrib/proposal/eu/strep/objectives.tex b/macros/latex/contrib/proposal/eu/strep/objectives.tex
new file mode 100644
index 0000000000..d960032a30
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/objectives.tex
@@ -0,0 +1,13 @@
+\section{Concept and Objectives}\label{sec:objectives}
+\begin{todo}{from the proposal template}
+ Explain the concept of your project. What are the main ideas that led you to propose
+ this work? Describe in detail the S\&T objectives. Show how they relate to the topics
+ addressed by the call. The objectives should be those achievable within the project, not
+ through subsequent development. They should be stated in a measurable and verifiable
+ form, including through the milestones that will be indicated under Section 1.3 below.
+\end{todo}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/progress.tex b/macros/latex/contrib/proposal/eu/strep/progress.tex
new file mode 100644
index 0000000000..bd39229025
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/progress.tex
@@ -0,0 +1,11 @@
+\section{Progress beyond the State-of-the-Art}\label{sec:progress}
+\begin{todo}{from the proposal template}
+ Describe the state-of-the-art in the area concerned, and the advance that the proposed
+ project would bring about. If applicable, refer to the results of any patent search you
+ might have carried out.
+\end{todo}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/propB.pdf b/macros/latex/contrib/proposal/eu/strep/propB.pdf
new file mode 100644
index 0000000000..1c5eebf5f1
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/propB.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/eu/strep/propB.tex b/macros/latex/contrib/proposal/eu/strep/propB.tex
new file mode 100644
index 0000000000..13afd61a7d
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/propB.tex
@@ -0,0 +1,65 @@
+% The main file for developing the proposal.
+% Variants with different class options are
+% - submit.tex (no draft stuff, no ednotes, no revision information)
+% - public.tex (like submit.tex, but no financials either)
+\providecommand{\classoptions}{,keys} % to be overwritten in variants
+\documentclass[noworkareas,deliverables,gitinfo,propB\classoptions]{euproposal}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\addbibresource{../lib/dummy}
+\input{../lib/WApersons}% Some sections of the included files depend on this.
+
+\begin{document}
+\begin{center}\color{red}\huge
+ This mock proposal is just an example for \texttt{euproposal.cls} it reflects the ICT
+ template of January 2012
+\end{center}
+\begin{proposal}[site=jacu,jacuRM=36,
+ site=efo,efoRM=36,
+ site=bar,barRM=36,
+ site=baz,bazRM=36,
+ coordinator=miko,
+ acronym={iPoWr},
+ acrolong={\underline{I}ntelligent} {\underline{P}r\underline{o}sal} {\underline{Wr}iting},
+ title=\pn: \protect\pnlong,
+ callname = ICT Call 1,
+ callid = FP7-???-200?-?,
+ instrument= Small or Medium-Scale Focused Research Project (STREP),
+ challengeid = 4,
+ challenge = ICT for EU Proposals,
+ objectiveid={ICT-2012.4.4},
+ objective = Technology-enhanced Documents,
+ outcomeid = b1,
+ outcome = {More time for Research, not Proposal writing},
+ coordinator=miko,
+ months=24,
+ compactht]
+\begin{abstract}
+ Writing grant proposals is a collaborative effort that requires the integration of
+ contributions from many individuals. The use of an ASCII-based format like {\LaTeX}
+ allows to coordinate the process via a source code control system like
+ {\textsc{Subversion}}, allowing the proposal writing team to concentrate on the contents
+ rather than the mechanics of wrangling with text fragments and revisions.
+\end{abstract}
+
+\tableofcontents
+
+\begin{todo}{from the proposal template}
+ Recommended length for the whole part B: 50--60 pages (including tables, references,
+ etc.)
+\end{todo}
+\include{quality}\newpage
+\include{implementation}\newpage
+\include{impact}\newpage
+\include{issues}
+\end{proposal}
+\end{document}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: t
+%%% End:
+
+% LocalWords: efo efoRM baz bazRM miko acrolong ntelligent iting pn pnlong
+% LocalWords: textsc newpage compactht texttt euproposal.cls callname callid
+% LocalWords: challengeid objectiveid outcomeid tableofcontents
diff --git a/macros/latex/contrib/proposal/eu/strep/public.pdf b/macros/latex/contrib/proposal/eu/strep/public.pdf
new file mode 100644
index 0000000000..2c9e43abdb
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/public.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/eu/strep/public.tex b/macros/latex/contrib/proposal/eu/strep/public.tex
new file mode 100644
index 0000000000..00c95f15a3
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/public.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{,submit,public}
+\input{proposal}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/quality.tex b/macros/latex/contrib/proposal/eu/strep/quality.tex
new file mode 100644
index 0000000000..5aee278b8f
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/quality.tex
@@ -0,0 +1,14 @@
+\chapter{Scientific and Technical Quality}\label{chap:quality}
+\begin{todo}{from the proposal template}
+ Maximum length for the whole of Section 1 –-- twenty pages, not including the tables in
+ Section 1.3
+\end{todo}
+
+\input{objectives}
+\input{progress}
+\input{methodology}
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
diff --git a/macros/latex/contrib/proposal/eu/strep/risks.tex b/macros/latex/contrib/proposal/eu/strep/risks.tex
new file mode 100644
index 0000000000..19580761f7
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/risks.tex
@@ -0,0 +1,17 @@
+\subsection{Significant Risks and Associated Contingency Plans}\label{sec:risks}
+\begin{todo}{from the proposal template}
+ Describe any significant risks, and associated contingency plans
+\end{todo}
+\begin{oldpart}{need to integrate this somewhere. CL: I will check other proposals to see how they did it; the Guide does not really prescribe anything.}
+\paragraph{Global Risk Management}
+The crucial problem of \pn (and similar endeavors that offer a new basis for communication
+and interaction) is that of community uptake: Unless we can convince scientists and
+knowledge workers industry to use the new tools and interactions, we will
+never be able to assemble the large repositories of flexiformal mathematical knowledge we
+envision. We will consider uptake to be the main ongoing evaluation criterion for the network.
+\end{oldpart}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/site-bar.tex b/macros/latex/contrib/proposal/eu/strep/site-bar.tex
new file mode 100644
index 0000000000..13868a7e78
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/site-bar.tex
@@ -0,0 +1,19 @@
+\begin{sitedescription}{bar}
+
+\paragraph{Organization}
+ Universit\'e de BAR specializes on drinking lots of red wine. It is a partner in the
+ consortium, because it has a very nice chateau on the Cote d'Azure, where it can host
+ gorgeous project meetings.
+
+\paragraph{Main tasks}
+\paragraph{Relevant previous experience}
+\paragraph{Specific expertise}
+\paragraph{Staff members undertaking the work}
+\keypubs{providemore}
+
+\end{sitedescription}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/site-baz.tex b/macros/latex/contrib/proposal/eu/strep/site-baz.tex
new file mode 100644
index 0000000000..d3f5d1f0fd
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/site-baz.tex
@@ -0,0 +1,13 @@
+\begin{sitedescription}{baz}
+\paragraph{Organization}
+\paragraph{Main tasks}
+\paragraph{Relevant previous experience}
+\paragraph{Specific expertise}
+\paragraph{Staff members undertaking the work}
+\keypubs{providemore}
+\end{sitedescription}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/site-efo.tex b/macros/latex/contrib/proposal/eu/strep/site-efo.tex
new file mode 100644
index 0000000000..c3bafffadf
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/site-efo.tex
@@ -0,0 +1,14 @@
+\begin{sitedescription}{efo}
+\paragraph{Organization}
+ The EFO is the world leader in futurology, \ldots
+\paragraph{Main tasks}
+\paragraph{Relevant previous experience}
+\paragraph{Specific expertise}
+\paragraph{Staff members undertaking the work}
+\keypubs{providemore}
+\end{sitedescription}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/site-jacu.tex b/macros/latex/contrib/proposal/eu/strep/site-jacu.tex
new file mode 100644
index 0000000000..6b4fe3b8c7
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/site-jacu.tex
@@ -0,0 +1,53 @@
+\begin{sitedescription}{jacu}
+
+\paragraph{Organization} Jacobs University Bremen is a private research university patterned
+after the Anglo-Saxon university system. The university opened in
+2001 and has an international student body ($1,245$ students from 102
+nations as of 2011, admitted in a highly selective process).
+
+The KWARC (KnoWledge Adaptation and Reasoning for
+Content\footnote{\url{http://kwarc.info}}) Group headed by
+{\emph{Prof.\ Dr.\ Michael Kohlhase}} specializes in building
+knowledge management systems for e-science applications, in particular
+for the natural and mathematical sciences. Formal logic, natural
+language semantics, and semantic web technology provide the
+foundations for the research of the group.
+
+ Since doing research and developing systems is much more fun than writing proposals,
+ they try go do that as efficiently as possible, hence this meta-proposal.
+
+\paragraph{Main tasks}
+
+\begin{itemize}
+\item creating {\LaTeX} class files
+\end{itemize}
+
+\paragraph{Relevant previous experience}
+
+The KWARC group is the main center and lead implementor of the OMDoc
+(Open Mathematical Document) format for representing mathematical
+knowledge. The group has developed added-value services powered by such semantically rich representations, different paths to obtaining them, as well as platforms that integrate both aspects. Services include the adaptive context-sensitive presentation framework JOMDoc and the semantic search engine MathWebSearch. For obtaining rich mathematical content, the group has been pursuing the two alternatives of assisting manual editing (with the sTeXIDE editing environment) and automatic annotation using natural language processing techniques. The latter is work in progress but builds on the arXMLiv system, which is currently capable of converting 70\% out of the 600,000 scientific publications in the arXiv from {\LaTeX} to XHTML+MathML without errors. Finally, the KWARC group has been developing the Planetary integrated environment.
+
+\paragraph{Specific expertise}
+
+\begin{itemize}
+\item writing intelligent proposals
+\end{itemize}
+
+\paragraph{Staff members involved}
+
+\textbf{Prof.\ Dr.\ Michael Kohlhase} is head of the KWARC research
+group. He is the head developer of the OMDoc mathematical markup
+language. He was a member of the Math Working Group at W3C, which finished its work with the publication of the MathML 3 recommendation. He is president of the OpenMath society and trustee of the MKM
+interest group.
+
+\keypubs{KohDavGin:psewads11,Kohlhase:pdpl10,Kohlhase:omdoc1.2,CarlisleEd:MathML10,StaKoh:tlcspx10}
+\end{sitedescription}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: site-jacu.tex sitedescription emph textbf keypubs KohDavGin
+% LocalWords: psewads11 pdpl10 StaKoh tlcspx10
diff --git a/macros/latex/contrib/proposal/eu/strep/site-templatex.tex b/macros/latex/contrib/proposal/eu/strep/site-templatex.tex
new file mode 100644
index 0000000000..6ffc6ad724
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/site-templatex.tex
@@ -0,0 +1,40 @@
+\begin{sitedescription}{???}
+
+\paragraph{Organization:}
+\ednote{Give a one-paragraph run-down of the site and the team there. }
+
+\paragraph{Main tasks:}
+
+\begin{compactitem}
+\item\ednote{specify the main tasks and reference the respective work packages}
+\end{compactitem}
+
+
+\paragraph{Relevant previous experience:}
+
+\ednote{give an overview over previous work and projects that add to the \pn project}
+
+\paragraph{Specific expertise:}
+
+\begin{compactitem}
+\item \ednote{give three to five specific areas of expertise that pertain to the \pn project}
+\end{compactitem}
+
+\paragraph{Staff members undertaking the work:}
+
+\textbf{Dr.\ Great Leader}\ednote{describe the site leader and his expertise}
+\textbf{Joe Implementor}\ednote{and more of them. }
+\ednote{provide the key publications below}
+\keypubs{providemore}
+\end{sitedescription}
+\end{oldpart}
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: site-jacu.tex clange sitedescription emph compactitem pn semmath
+% LocalWords: prosuming-flexiformal KohSuc asemf06 GinJucAnc alsaacl09 StaKoh
+% LocalWords: tlcspx10 KohDavGin psewads11 ednote Radboud Bia ystok CALCULEMUS
+% LocalWords: textbf keypubs OntoLangMathSemWeb uwb Deyan Ginev Stamerjohanns
+% LocalWords: searchability
diff --git a/macros/latex/contrib/proposal/eu/strep/submit.pdf b/macros/latex/contrib/proposal/eu/strep/submit.pdf
new file mode 100644
index 0000000000..9fee253527
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/submit.pdf
Binary files differ
diff --git a/macros/latex/contrib/proposal/eu/strep/submit.tex b/macros/latex/contrib/proposal/eu/strep/submit.tex
new file mode 100644
index 0000000000..5d92f9374d
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/submit.tex
@@ -0,0 +1,7 @@
+\newcommand{\classoptions}{submit}
+\input{proposal}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/workplan.tex b/macros/latex/contrib/proposal/eu/strep/workplan.tex
new file mode 100644
index 0000000000..d189192bbe
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/workplan.tex
@@ -0,0 +1,19 @@
+\begin{todo}{from the proposal template}
+\begin{enumerate}
+\item Describe the overall strategy of the work plan\ednote{Maximum length – one page}
+\item Show the timing of the different WPs and their components (Gantt chart or similar).
+\end{enumerate}
+\end{todo}
+\begin{figure}
+ \caption{Work package dependencies}
+ \label{fig:wp-deps}
+\end{figure}
+
+\ganttchart[draft,xscale=.45]
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: workplan.tex ednote wp-deps ganttchart xscale
diff --git a/macros/latex/contrib/proposal/eu/strep/wp-class.tex b/macros/latex/contrib/proposal/eu/strep/wp-class.tex
new file mode 100644
index 0000000000..c0c4519861
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/wp-class.tex
@@ -0,0 +1,44 @@
+\begin{workpackage}[id=class,type=RTD,lead=jacu,
+ wphases=3-9!1,
+ title=A {\LaTeX} class for EU Proposals,short=Class,
+ jacuRM=12,barRM=12]
+We can state the state of the art and similar things before the summary in the boxes
+here.
+\wpheadertable
+\begin{wpobjectives}
+\LaTeX is the best document markup language, it can even be used for literate
+programming~\cite{DK:LP,Lamport:ladps94,Knuth:ttb84}
+
+ To develop a {\LaTeX} class for marking up EU Proposals
+\end{wpobjectives}
+
+\begin{wpdescription}
+ We will follow strict software design principles, first comes a requirements analys,
+ then \ldots
+\end{wpdescription}
+
+\begin{wpdelivs}
+ \begin{wpdeliv}[due=6,id=req,nature=R,dissem=PP,miles=kickoff]
+ {Requirements analysis}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=12,id=spec,nature=R,dissem=PU,miles=consensus]
+ {{\pn} Specification }
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=18,id=demonstrator,nature=P,dissem=PU,miles={consensus,final}]
+ {First demonstrator ({\tt{article.cls}} really)}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=24,id=proto,nature=P,dissem=PU,miles=final]
+ {First prototype}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=36,id=release,nature=P,dissem=PU,miles=final]
+ {Final {\LaTeX} class, ready for release}
+ \end{wpdeliv}
+ \end{wpdelivs}
+Furthermore, this work package contributes to {\pdataRef{deliv}{managementreport2}{label}} and
+{\pdataRef{deliv}{managementreport7}{label}}.
+\end{workpackage}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
diff --git a/macros/latex/contrib/proposal/eu/strep/wp-dissem.tex b/macros/latex/contrib/proposal/eu/strep/wp-dissem.tex
new file mode 100644
index 0000000000..7ad3fa9b1f
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/wp-dissem.tex
@@ -0,0 +1,62 @@
+\begin{workpackage}%
+[id=dissem,type=RTD,lead=efo,
+ wphases=10-24!1,
+ title=Dissemination and Exploitation,short=Dissemination,
+ efoRM=8,jacuRM=2,barRM=2,bazRM=2]
+We can state the state of the art and similar things before the summary in the boxes
+here.
+\wpheadertable
+
+\begin{wpobjectives}
+ Much of the activity of a project involves small groups of nodes in joint work. This
+ work package is set up to ensure their best wide-scale integration, communication, and
+ synergetic presentation of the results. Clearly identified means of dissemination of
+ work-in-progress as well as final results will serve the effectiveness of work within
+ the project and steadily improve the visibility and usage of the emerging semantic
+ services.
+\end{wpobjectives}
+
+\begin{wpdescription}
+ The work package members set up events for dissemination of the research and
+ work-in-progress results for researchers (workshops and summer schools), and for
+ industry (trade fairs). An in-depth evaluation will be undertaken of the response of
+ test-users.
+
+ Within two months of the start of the project, a project website will go live. This
+ website will have two areas: a members' area and a public area.\ldots
+\end{wpdescription}
+
+\begin{wpdelivs}
+ \begin{wpdeliv}[due=2,id=website,nature=O,dissem=PU,miles=kickoff]
+ {Set-up of the Project web server}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=8,id=ws1proc,nature=R,dissem=PU,miles={kickoff}]
+ {Proceedings of the first {\pn} Summer School.}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=9,id=dissem,nature=R,dissem=PP]
+ {Dissemination Plan}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=9,id=exploitplan,nature=R,dissem=PP,miles=exploitation]
+ {Scientific and Commercial Exploitation Plan}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=20,id=ws2proc,nature=R,dissem=PU,miles={exploitation}]
+ {Proceedings of the second {\pn} Summer School.}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=32,id=ss1proc,nature=R,dissem=PU,miles={exploitation}]
+ {Proceedings of the third {\pn} Summer School.}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=44,id=ws3proc,nature=R,dissem=PU,miles=exploitation]
+ {Proceedings of the fourth {\pn} Summer School.}
+ \end{wpdeliv}
+ \end{wpdelivs}
+\end{workpackage}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: wp-dissem.tex workpackage dissem efo fromto bazRM wpheadertable
+% LocalWords: wpobjectives wpdescription ldots wpdelivs wpdeliv ws1proc pn
+% LocalWords: exploitplan ws2proc ss1proc ws3proc pdataRef deliv
+% LocalWords: mansubsusintReport
diff --git a/macros/latex/contrib/proposal/eu/strep/wp-management.tex b/macros/latex/contrib/proposal/eu/strep/wp-management.tex
new file mode 100644
index 0000000000..4ee5c645d3
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/wp-management.tex
@@ -0,0 +1,61 @@
+\begin{workpackage}[id=management,type=MGT,wphases=0-24!.2,
+ title=Project Management,short=Management,
+ jacuRM=2,barRM=2,efoRM=2,bazRM=2]
+We can state the state of the art and similar things before the summary in the boxes
+here.
+\wpheadertable
+\begin{wpobjectives}
+ \begin{itemize}
+ \item To perform the administrative, scientific/technical, and financial
+ management of the project
+ \item To co-ordinate the contacts with the EU
+ \item To control quality and timing of project results and to resolve conflicts
+ \item To set up inter-project communication rules and mechanisms
+ \end{itemize}
+\end{wpobjectives}
+
+\begin{wpdescription}
+ Based on the Consortium Agreement, i.e. the contract with the European Commission, and
+ based on the financial and administrative data agreed, the project manager will carry
+ out the overall project management, including administrative management. A project
+ quality handbook will be defined, and a {\pn} help-desk for answering questions about
+ the format (first project-internal, and after month 12 public) will be established. The
+ project management will\ldots we can even reference deliverables:
+ \delivref{management}{report2} and even the variant with a title:
+ \delivtref{management}{report2}
+\end{wpdescription}
+
+\begin{wpdelivs}
+ \begin{wpdeliv}[due=1,id=mailing,nature=O,dissem=PP,miles=kickoff]
+ {Project-internal mailing lists}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=3,id=handbook,nature=R,dissem=PU,miles=consensus]
+ {Project management handbook}
+ \end{wpdeliv}
+\begin{wpdeliv}[due={6,12,18,24,30,36,42,48},id=report2,nature=R,dissem=public,miles={consensus,final}]
+ {Periodic activity report}
+ Partly compiled from activity reports of the work package
+ coordinators; to be approved by the work package coordinators before delivery to the
+ Commission. Financial reporting is mainly done in months 18 and 36.\Ednote{how about
+ these numbers?}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=6,id=helpdesk,dissem=PU,nature=O,miles=kickoff]
+ {{\pn} Helpdesk}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=36,id=report6,nature=R,dissem=PU,miles=final]
+ {Final plan for using and disseminating the knowledge}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=48,id=report7,nature=R,dissem=PU,miles=final]
+ {Final management report}
+ \end{wpdeliv}
+\end{wpdelivs}
+\end{workpackage}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: wp-management.tex workpackage efoRM bazRM wpheadertable pn ldots
+% LocalWords: wpobjectives wpdescription delivref delivtref wpdelivs wpdeliv
+% LocalWords: dissem Ednote pdataRef deliv mansubsusintReport wphases
diff --git a/macros/latex/contrib/proposal/eu/strep/wp-temple.tex b/macros/latex/contrib/proposal/eu/strep/wp-temple.tex
new file mode 100644
index 0000000000..92426deaf6
--- /dev/null
+++ b/macros/latex/contrib/proposal/eu/strep/wp-temple.tex
@@ -0,0 +1,44 @@
+\begin{workpackage}[id=temple,type=DEM,lead=bar,
+ wphases=6-12!1,
+ title={\pn} Proposal Template,short=Template,barRM=6,bazRM=6]
+We can state the state of the art and similar things before the summary in the boxes
+here.
+\wpheadertable
+
+\begin{wpobjectives}
+ To develop a template file for {\pn} proposals
+\end{wpobjectives}
+
+\begin{wpdescription}
+ We abstract an example from existing proposals
+\end{wpdescription}
+
+\begin{wpdelivs}
+ \begin{wpdeliv}[due=6,id=req,nature=R,dissem=PP,miles=kickoff]
+ {Requirements analysis}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=12,id=spec,nature=R,dissem=PU,miles=consensus]
+ {{\pn} Specification }
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=18,id=demonstrator,nature=D,dissem=PU,miles={consensus,final}]
+ {First demonstrator ({\tt{article.cls}} really)}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=24,id=proto,nature=P,dissem=PU,miles=final]
+ {First prototype}
+ \end{wpdeliv}
+ \begin{wpdeliv}[due=36,id=release,nature=P,dissem=PU,miles=final]
+ {Final Template, ready for release}
+ \end{wpdeliv}
+\end{wpdelivs}
+Furthermore, this work package contributes to {\pdataRef{deliv}{managementreport2}{label}} and
+{\pdataRef{deliv}{managementreport7}{label}}.
+\end{workpackage}
+
+%%% Local Variables:
+%%% mode: LaTeX
+%%% TeX-master: "propB"
+%%% End:
+
+% LocalWords: wp-temple.tex workpackage fromto pn bazRM wpheadertable wpdelivs
+% LocalWords: wpobjectives wpdescription wpdeliv req dissem tt article.cls
+% LocalWords: pdataRef deliv systemsintReport
diff --git a/macros/latex/contrib/proposal/lib/Makefile.ctan b/macros/latex/contrib/proposal/lib/Makefile.ctan
new file mode 100644
index 0000000000..d24d524aa6
--- /dev/null
+++ b/macros/latex/contrib/proposal/lib/Makefile.ctan
@@ -0,0 +1,88 @@
+################################################################
+# make a zip for CTAN submission including the TeX directory structure.
+#
+# The overall procedure is to run make in this directory $(HERE) and then
+# export it to a temporary directory $(EXPORTED) without all the generated
+# files. On this directory we run "make ctanext" (see below) which makes a
+# CTAN-compliant directory structure, and zips it up to the file
+# <package>.ctan.zip which can be submitted to the CTAN maintainers.
+#
+# Note that part of the CTAN submission is a zip file with a TDS-compliant
+# directory struture, which is generated by running "make tdsext" (see below)
+# on $(EXPORTED).
+#
+# Note furthermore, that this Makefile only automates the top-level mechanics
+# of the CTAN zip files, ... It relies on the Variables set in the regular Makefiles
+# and in particular on their targets "ltds", "lctan", "filedate", and "checksum".
+################################################################
+
+HERE = $(shell pwd)
+GITREPOS = $(HERE)
+REPOSNAME = LaTeX-proposal
+TMP = /tmp
+#TDSCOLL ?= $(shell basename $$PWD)
+TDSCOLL = proposal
+EXPORTED = $(TMP)/$(TDSCOLL).exp
+
+TDS.dir = $(TDSCOLL).tds
+TDSDIR = $(TMP)/$(TDS.dir)
+TDS.zip = $(TDS.dir).zip
+TDSZIP = $(TMP)/$(TDS.zip)
+
+CTANDIR = $(TMP)/$(TDSCOLL)
+CTAN.zip = $(TDSCOLL).ctan.zip
+CTANZIP = $(TMP)/$(CTAN.zip)
+
+MAKE = make
+
+# this target makes the file CTANZIP by creating and populating the directory
+# CTANDIR and zipping it. To be current, we first make all, and update
+# the filedates and the checksums. To get rid of all the junk we commit and
+# export a clean copy EXPORTED, on which we run the target ctanexp below,
+# which generates a directory CTANDIR, which we zip and move into place.
+ctan: all filedate checksum
+ git commit -am'draining just to be sure for CTAN distribution' --allow-empty
+ rm -Rf $(EXPORTED)
+ @echo "exporting a clean copy to $(EXPORTED)"
+ cd $(TMP);rm -Rf $(REPOSNAME);git clone $(GITREPOS);mv $(REPOSNAME) $(EXPORTED)
+ rm -Rf $(EXPORTED)/.git
+ find $(EXPORTED) -name ".gitignore" -delete
+ cd $(EXPORTED);$(MAKE) -$(MAKEFLAGS) ctanext
+ @echo "zipping the result to $(TDSCOLL).ctan.zip"
+ cd $(TMP);zip -r $(CTANZIP) $(TDS.zip) $(TDSCOLL);cp $(CTANZIP) $(HERE)
+ @echo "cleaning up"
+ rm -Rf $(EXPORTED) $(CTANDIR) $(CTANZIP) $(TDSZIP)
+ @echo "disabling checksums again for further development"
+ $(MAKE) -$(MAKEFLAGS) disablechecksum
+
+# this target is run on EXPORTED. It first makes the target tdsext below,
+# and then copies all necessary stuff into CTANDIR.
+ctanext: tdsext
+ @echo "making a CTAN compliant archive in $(CTANDIR)"
+ rm -Rf $(CTANDIR) $(CTANZIP)
+ mkdir -p $(CTANDIR)
+ @echo " copying material from $(EXPORTED) to $(CTANDIR)"
+ @for d in $(DTXDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) lctan) done
+ @for d in $(SRCDIRS) $(DOCDIRS); do (cp -R $$d $(CTANDIR)) done;
+ @for d in $(SRCFILES); do (cp -p $$d $(CTANDIR)) done;
+ cp $(TDS.README) $(CTANDIR)/README
+
+# this target makes the file TDSZIP by creating and populating the directory
+# TDSDIR and zipping it.
+tdsext:
+ @echo "making a TDS compliant archive"
+ rm -Rf $(TDSDIR) $(TDSZIP)
+ @echo " enabling checksums"
+ $(MAKE) -$(MAKEFLAGS) enablechecksum
+ @echo " copying LaTeX Sources to $(TDSDIR)"
+ @for d in $(DTXDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) ltds) done
+ @echo " copying binary dir to $(TDSDIR)"
+ @for d in $(SRCDIRS); do (cp -R $$d $(TDSDIR)/source/latex/$(TDSCOLL)) done;
+ @for d in $(SRCFILES); do (cp -R $$d $(TDSDIR)/source/latex/$(TDSCOLL)) done;
+ @echo " copying documentation to $(TDSDIR)"
+ @for d in $(DOCDIRS); do (cp -R $$d $(TDSDIR)/doc/latex/$(TDSCOLL)) done;
+ @for d in $(TDS.doc); do (cp -R $$d $(TDSDIR)/doc/latex/$(TDSCOLL)) done;
+ @echo "zipping the result to $(TDSCOLL).tds.zip"
+ cd $(TDSDIR);zip -r -q $(TDSZIP) .
+ @echo "and removing the temporary directory $(TDSDIR)"
+ rm -Rf $(TDSDIR)
diff --git a/macros/latex/contrib/proposal/lib/Makefile.in b/macros/latex/contrib/proposal/lib/Makefile.in
new file mode 100644
index 0000000000..57da62fad1
--- /dev/null
+++ b/macros/latex/contrib/proposal/lib/Makefile.in
@@ -0,0 +1,90 @@
+all: package doc
+package: $(DTX.sty) $(DTX.cls)
+doc: $(DTX.pdf) $(EXAMPLE.pdf)
+
+$(DTX.sty) $(DTX.cls): $(INS) $(DTX)
+ $(PDFLATEX) $(INS)
+
+
+$(EXAMPLE.pdf): %.pdf: %.tex $(DTX.sty) $(DTX.cls) $(EXAMPLE.deps)
+ $(PDFLATEX) $(firstword $<)
+ @if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then biber $(patsubst %.dtx, %, $(firstword $<));fi
+ @if (grep 'Please (re)run BibTeX' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then bibtex $(patsubst %.dtx, %, $(firstword $<));fi
+ @if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then makeindex\
+ -o $(patsubst %.dtx, %.ind, $(firstword $<))\
+ $(patsubst %.dtx, %.idx, $(firstword $<)); fi
+ @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then $(PDFLATEX) $(firstword $<); fi
+ @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then $(PDFLATEX) $(firstword $<); fi
+
+%.ind:
+ touch $@
+
+$(DTX.pdf): %.pdf: %.dtx $(DTX.sty) $(DTX.cls)
+ $(PDFLATEX) $(firstword $<)
+ @if (grep 'Please (re)run Biber' $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then biber $(patsubst %.dtx, %, $(firstword $<));fi
+ @if (grep "Writing glossary file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then makeindex\
+ -o $(patsubst %.dtx, %.gls, $(firstword $<))\
+ $(patsubst %.dtx, %.glo, $(firstword $<)); fi
+ @if (grep "Writing index file" $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then makeindex\
+ -o $(patsubst %.dtx, %.ind, $(firstword $<))\
+ $(patsubst %.dtx, %.idx, $(firstword $<)); fi
+ @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then $(PDFLATEX) $(firstword $<); fi
+ @if (grep Rerun $(patsubst %.dtx, %.log, $(firstword $<)) > /dev/null);\
+ then $(PDFLATEX) $(firstword $<); fi
+
+clean:
+ rm -f *~ *.log *.ilg *.out *.glo *.idx *.ilg *.blg
+
+distclean: clean
+ rm -f *.aux *.ind *.gls *.ps *.dvi *.toc *.thm
+ rm -Rf auto
+
+filedate:
+ @for d in $(DTX); do \
+ $(FILEDATEPROG) $$d ; \
+ done
+
+checksum:
+ @for d in $(DTX); do \
+ $(CHECKSUMPROG) $$d --update ; \
+ done
+
+enablechecksum:
+ @for d in $(DTX); do \
+ $(CHECKSUMPROG) $$d --enable ; \
+ done
+
+disablechecksum:
+ @for d in $(DTX); do \
+ $(CHECKSUMPROG) $$d --disable ; \
+ done
+
+# copy stuff around for making the TeX Directory Structure
+ltds:
+ rm -Rf $(TDSDIR.doc);mkdir -p $(TDSDIR.doc)
+ rm -Rf $(TDSDIR.tex);mkdir -p $(TDSDIR.tex)
+ rm -Rf $(TDSDIR.src);mkdir -p $(TDSDIR.src)
+ cp $(DTX.src) $(TDS.src) $(TDSDIR.src)
+ cp $(DTX.sty) $(DTX.cls) $(TDS.tex) $(TDSDIR.tex)
+ cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(TDSDIR.doc)
+ @for d in $(TDS.exdirs); do cp -R $$d $(TDSDIR.doc); done
+
+lctan:
+ mkdir -p $(CTANDIR)
+ cp $(DTX.src) $(DTX.sty) $(DTX.cls) $(TDS.src) $(TDS.tex) $(CTANDIR)
+ cp README $(DTX.pdf) $(EXAMPLE.tex) $(EXAMPLE.pdf) $(TDS.doc) $(CTANDIR)
+ @for d in $(TDS.exdirs); do cp -R $$d $(CTANDIR); done
+
+# sometimes (when bibLaTeX changes) we have to rerun biber; use make -B biber
+biber:
+ pdflatex $(DTX.base:%=%.dtx)
+ biber $(DTX.base)
diff --git a/macros/latex/contrib/proposal/lib/Makefile.vars b/macros/latex/contrib/proposal/lib/Makefile.vars
new file mode 100644
index 0000000000..6155fee090
--- /dev/null
+++ b/macros/latex/contrib/proposal/lib/Makefile.vars
@@ -0,0 +1,38 @@
+# DTX.sty.base and DTX.cls.base are set in the including Makefiles
+DTX.base ?= $(DTX.sty.base) $(DTX.cls.base)
+DTX.src = $(DTX) $(DTX:%.dtx=%.ins)
+INS = $(DTX:%.dtx=%.ins)
+
+DTX.sty = $(DTX.sty.base:%=%.sty)
+DTX.cls = $(DTX.cls.base:%=%.cls)
+DTX.pdf = $(DTX:%.dtx=%.pdf)
+
+# The examples
+EXAMPLE.pdf = $(EXAMPLE.base:%=%.pdf)
+EXAMPLE.tex = $(EXAMPLE.base:%=%.tex)
+EXAMPLE.deps = $(filter-out $(EXAMPLE.base:%=%.tex), $(shell ls *.tex))
+
+# The TeX Directory Structure (see http://www.tug.org/tds/tds.html)
+TDSDIR = /tmp/$(TDSCOLL).tds
+TDSDIR.tex = $(TDSDIR)/tex/latex/$(TDSCOLL)/$(PACKAGE)
+TDSDIR.doc = $(TDSDIR)/doc/latex/$(TDSCOLL)/$(PACKAGE)
+TDSDIR.src = $(TDSDIR)/source/latex/$(TDSCOLL)/$(PACKAGE)
+
+# make a zip for CTAN submission
+CTANDIR = /tmp/$(TDSCOLL)/$(CTANPREFIX)$(PACKAGE)
+
+# the dependencies
+SOURCES = $(DTX.sty) $(BIB)
+TEXINPUTS := .:$(PREFIX)//:
+BIBINPUTS := .:$(PREFIX)//:
+BSTINPUTS := .:$(PREFIX)//:
+
+# we want to quiet down pdflatex
+PDFLATEX = pdflatex -interaction batchmode -file-line-error
+
+# we set the package date for 'make filedate' to today
+BINDIR = $(PREFIX)/../bin
+PACKAGEDATE ?= $(shell date "+%Y/%m/%d")
+FILEDATEPROG = PERL5LIB=$(BINDIR) $(BINDIR)/filedate
+CHECKSUMPROG = PERL5LIB=$(BINDIR) $(BINDIR)/checksum
+
diff --git a/macros/latex/contrib/proposal/lib/proposal.bib b/macros/latex/contrib/proposal/lib/proposal.bib
new file mode 100644
index 0000000000..8970c41baa
--- /dev/null
+++ b/macros/latex/contrib/proposal/lib/proposal.bib
@@ -0,0 +1,76 @@
+@STRING{stexyear = 2016}
+@techreport{Kohlhase:ed:ctan,crossref={Kohlhase:ed:base},
+ institution = {Comprehensive {\TeX} Archive Network (CTAN)},
+ CHANGEurl = {http://www.ctan.org/get/macros/latex/contrib/ed/ed.pdf},
+ pubs = {mkohlhase,projects/stex}}
+@techreport{Kohlhase:ed:svn,crossref={Kohlhase:ed:base},
+ url = {https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/ed/ed.pdf}}
+@techreport{Kohlhase:ed:base,
+ author = {Michael Kohlhase},
+ title = {Editorial Notes for {\LaTeX}},
+ type = {Self-documenting {\LaTeX} package},
+ year = stexyear}
+
+@online{gitinfo2:on,
+ title = {gitinfo2.sty},
+ subtitle = {A package for accessing metadata from the git dvcs},
+ author = {Brent Longborough},
+ urldate = {2014-10-26},
+ url = {http://mirrors.ctan.org/macros/latex/contrib/gitinfo2/gitinfo2.pdf}}
+
+@techreport{Kohlhase:workaddress:ctan,crossref={Kohlhase:workaddress:base},
+ institution = {Comprehensive {\TeX} Archive Network (CTAN)},
+ url = {http://mirror.ctan.org/macros/latex/contrib/stex/sty/workaddress/workaddress.pdf},
+ pubs = {mkohlhase,projects/stex}}
+@techreport{Kohlhase:workaddress:svn,crossref={Kohlhase:workaddress:base},
+ url = {https://github.com/KWARC/sTeX/raw/master/sty/stex/workaddress/workaddress.pdf}}
+@techreport{Kohlhase:workaddress:base,
+ author = {Michael Kohlhase},
+ title = {{\texttt{workaddress.sty}}: An Infrastructure for marking up {Dublin Core} Metadata in {\LaTeX} documents},
+ type = {Self-documenting {\LaTeX} package},
+ year = stexyear}
+
+@techreport{Kohlhase:pdrp:ctan,crossref={Kohlhase:pdrp:base},
+ institution = {Comprehensive {\TeX} Archive Network (CTAN)},
+ url = {http://mirror.ctan.org/macros/latex/contrib/proposal/dfg/dfgproposal.pdf},
+ pubs = {mkohlhase,projects/stex}}
+@techreport{Kohlhase:pdrp:svn,crossref={Kohlhase:pdrp:base},
+ url = {http://github.com/KWARC/LaTeX-proposal/dfg/dfgproposal.pdf}}
+@techreport{Kohlhase:pdrp:base,
+ author = {Michael Kohlhase},
+ title = {Preparing DFG Proposals and Reports in {\LaTeX} with {\texttt{dfgproposal.cls}}},
+ type = {Self-documenting {\LaTeX} package},
+ year = stexyear}
+
+@techreport{Kohlhase:pplp:ctan,crossref={Kohlhase:pplp:base},
+ institution = {Comprehensive {\TeX} Archive Network (CTAN)},
+ url = {http://mirror.ctan.org/macros/latex/contrib/proposal/base/proposal.pdf},
+ pubs = {mkohlhase,projects/stex}}
+@techreport{Kohlhase:pplp:svn,crossref={Kohlhase:pplp:base},
+ url = {http://github.com/KWARC/LaTeX-proposal/base/proposal.pdf}}
+@techreport{Kohlhase:pplp:base,
+ author = {Michael Kohlhase},
+ title = {Preparing Proposals in {\LaTeX} with {\tt{proposal.cls}}},
+ type = {Self-documenting {\LaTeX} package},
+ year = stexyear}
+
+@Manual{DFG:102e,
+ title = {Research Grants, Guidelines and Proposal Preparation Instructions},
+ organization = {German Research Foundation (DFG)},
+ url = {http://www.dfg.de/download/programme/emmy_noether_programm/antragstellung/1_02_e/1_02e.pdf},
+ month = oct,
+ year = 2010}
+
+@Manual{DFG:2012e,
+ title = {Guidelines for the Use of Funds International Research Grants with Guidelines for Final Reports},
+ organization = {German Research Foundation (DFG)},
+ url = {http://www.dfg.de/download/programme/sachbeihilfe/antragstellung/2_012_e/2_012e.pdf},
+ month = jul,
+ year = 2010}
+
+@Manual{DFG:201,
+ title = {Verwendungsrichtlinien, Sachbeihilfen mit Leitfaden f{\"ur}r Abschlussberichte und Regeln guter wissenschaftlicher Praxis},
+ organization = {German Research Foundation (DFG)},
+ url = {http://www.dfg.de/download/programme/sachbeihilfe/abschlussberichte/2_01/2_01.pdf},
+ month = jun,
+ year = 2010}