more documentation and separating out proposal.sty

This commit is contained in:
Michael Kohlhase 2016-10-26 13:55:42 +02:00
parent 4755b4b24c
commit b197b98eb7
7 changed files with 54 additions and 1381 deletions

View File

@ -7,7 +7,7 @@
%% proposal.dtx (with options: `pdata') %% proposal.dtx (with options: `pdata')
%% %%
\NeedsTeXFormat{LaTeX2e}[1999/12/01] \NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pdata}[2016/04/15 v1.5 Project Data] \ProvidesPackage{pdata}[2016/10/26 v1.6 Project Data]
\RequirePackage{workaddress}[2016/07/06] \RequirePackage{workaddress}[2016/07/06]
\RequirePackage{eurosym} \RequirePackage{eurosym}
\newif\if@sites\@sitesfalse\let\prop@gen@sites=\relax% \newif\if@sites\@sitesfalse\let\prop@gen@sites=\relax%
@ -74,140 +74,6 @@
\tab@line} \tab@line}
\def\prop@gen@compactht{false} \def\prop@gen@compactht{false}
\define@key{prop@gen}{compactht}[true]{\def\prop@gen@compactht{#1}} \define@key{prop@gen}{compactht}[true]{\def\prop@gen@compactht{#1}}
\newcommand\deliv@error{\PackageError{proposal}
{To use use deliverables, you have to specify the option 'deliverables'}}
\newenvironment{wpdelivs}{\begin{wp@delivs}}{\end{wp@delivs}}
\newenvironment{wp@delivs}
{\ifdelivs\textbf\deliv@legend@delivs:\\[-3ex]%
\begin{compactdesc}\else\deliv@error\fi}
{\ifdelivs\end{compactdesc}\fi}
\newcommand\deliv@legend@delivs{Deliverables}
\newenvironment{wadelivs}
{\textbf\deliv@legend@delivs:\\[-3ex]\begin{wp@delivs}}
{\end{wp@delivs}}
\newcommand\lec[1]{\strut\hfil\strut\null\nobreak\hfill\hbox{$\leadsto$#1}\par}
\newcommand\deliv@label[1]{D{#1}}
\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}}
\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}}
\define@key{deliv}{issue}{\def\deliv@issue{#1}}
\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}{\taskin\deliv@id\wpg@id}{label}{\current@label}
\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{title}{#2}
\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{page}{\thepage}%
\@ifundefined{deliv@short}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{short}{#2}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{short}{\deliv@short}}
\@ifundefined{deliv@nature}
{\protect\G@refundefinedtrue\@latex@warning{key 'nature' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{nature}{\deliv@nature}}
\@ifundefined{deliv@dissem}
{\protect\G@refundefinedtrue\@latex@warning{key 'dissem' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{dissem}{\deliv@dissem}}
\@ifundefined{deliv@lead}
{\protect\G@refundefinedtrue\@latex@warning{key 'lead' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{lead}{\deliv@lead}}
\@ifundefined{deliv@due}{}{%
\@ifundefined{deliv@issue}{}{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{issue}{\deliv@issue}}
\@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}{??}{\taskin\deliv@id\wpg@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
\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}{\taskin\deliv@id\wpg@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}}}
\newenvironment{wadeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wa}\else\deliv@error\fi}{}
\newenvironment{wpdeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wp}\else\deliv@error\fi}{}
\newcommand\milestone@label[1]{M{#1}}
\newcommand\mileref[1]{\pdataRef{mile}{#1}{label}}
\newcommand\miletref[1]{\mileref{#1}: \pdataRefFB{mile}{#1}{short}{title}}
\newcounter{milestone}
\define@key{milestone}{id}{\gdef\mile@id{#1}}
\define@key{milestone}{month}{\gdef\mile@month{#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{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}
\newcommand\@milestone[3]{% id, title, description
\item \textbf{\miles@legend@milestone\xspace\pdata@target{mile}\mile@id{\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}
\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}
\newenvironment{@milestones}{\begin{enumerate}}{\end{enumerate}}
\newcommand{\deliverable}[9]{\pdataRef{deliv}{#4}{label}&#7&#8&#9&#6&#5&#2\\\hline}%sortkey,due,label,id,title,type,level,lead
\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}
\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}
\newcommand{\inputdelivs}[1]{%
\begin{deliverables}{#1}%
\IfFileExists{\jobname.deliverables}%
{\input{\jobname.deliverables}}%
{\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}}
\end{deliverables}}
\newif\ifwork@areas\work@areastrue \newif\ifwork@areas\work@areastrue
\DeclareOption{noworkareas}{\work@areasfalse} \DeclareOption{noworkareas}{\work@areasfalse}
\ProcessOptions \ProcessOptions

File diff suppressed because it is too large Load Diff

View File

@ -12,10 +12,11 @@
% \fi % \fi
% %
% \iffalse % \iffalse
%<cls|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<cls|sty|pdata|reporting>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{proposal}[2016/04/15 v1.5 Project Proposal] %<cls>\ProvidesClass{proposal}[2016/10/26 v1.6 Project Proposal]
%<pdata>\ProvidesPackage{pdata}[2016/04/15 v1.5 Project Data] %<sty>\ProvidesPackage{proposal}[2016/10/26 v1.6 Project Proposal]
%<reporting>\ProvidesPackage{reporting}[2016/04/15 v1.5 Project Reporting] %<pdata>\ProvidesPackage{pdata}[2016/10/26 v1.6 Project Data]
%<reporting>\ProvidesPackage{reporting}[2016/10/26 v1.6 Project Reporting]
%<*driver> %<*driver>
\documentclass{ltxdoc} \documentclass{ltxdoc}
\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} \DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global}
@ -67,11 +68,12 @@
% \changes{v1.4}{2012/01/28}{some localization support} % \changes{v1.4}{2012/01/28}{some localization support}
% \changes{v1.4}{2013/01/12}{more documentation of milestones} % \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} % \changes{v1.5}{2014/01/14}{many layout tweaks support for CVs, milestones in gantt}
% \changes{v1.6}{2016/10/26}{splitting off proposal.sty so that documentation becomes easier}
% %
% \GetFileInfo{proposal.cls} % \GetFileInfo{proposal.cls}
% %
% \MakeShortVerb{\|} % \MakeShortVerb{\|}
% \title{Preparing Proposals in {\LaTeX} with \texttt{proposal.cls}} % \title{Preparing Proposals in {\LaTeX} with \texttt{proposal.cls}\thanks{Version {\fileversion} (last revised {\filedate})}}
% \author{Michael Kohlhase\\ % \author{Michael Kohlhase\\
% Computer Science, Jacobs University Bremen\\ % Computer Science, Jacobs University Bremen\\
% \url{http://kwarc.info/kohlhase}} % \url{http://kwarc.info/kohlhase}}
@ -476,9 +478,24 @@
% %
% One of the most useful features of the |proposal| class is that we can generate an % One of the most useful features of the |proposal| class is that we can generate an
% overview table for the distribution of workloads in the project fully automatically. All % overview table for the distribution of workloads in the project fully automatically. All
% it takes is the \DescribeMacro{\wpfig}|\wpfig| macro. % it takes is the \DescribeMacro{\wpfig}|\wpfig| macro. We invoke this as
% |\wpfig[|\meta{opt}|]|, where \meta{opt} contains the following keywords:
% %
% The general appearance of the table \DescribeMacro{\wpfigstyle}|\wpfigstyle| % \begin{description}
% \item |pages| makes a column with page numbers of the respective work package/area description.
% \item |type| makes a column with work package/area types
% \item |start|, |end|, and |length| makes a columns with work package/area start/end
% months and length (in months).
% \item if |caption| is given then the table contains an explicatory caption.
% \item |label| allows to specify a label other than the default |fig:wplist|.
% \end{description}
% For instance |\wpfig[pages,start,length,caption=Overview of Work Packages]| gives a
% table with columns for page references, duration information, and a special caption.
%
% The general appearance of the table \DescribeMacro{\wpfigstyle}|\wpfigstyle| macro takes
% a token sequence to specialize the global appearance (mostly used for text sizes and
% color) of the work package table. Cell styling can be tweaked by redefining special
% internal macros; see section~\ref{sec:implwptable}.
% %
% \subsection{Gantt Charts}\label{sec:user:gantt} % \subsection{Gantt Charts}\label{sec:user:gantt}
% %
@ -596,12 +613,15 @@
\DeclareOption{deliverables}{\delivstrue} \DeclareOption{deliverables}{\delivstrue}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions \ProcessOptions
\LoadClass[a4paper,twoside]{\proposal@class}
\RequirePackage{proposal}
%</cls|reporting>
% \end{macrocode} % \end{macrocode}
% %
% Then we load the packages we make use of % For |proposal.sty| we load the packages we make use of
% %
% \begin{macrocode} % \begin{macrocode}
\LoadClass[a4paper,twoside]{\proposal@class} %<*sty>
\RequirePackage{amssymb} \RequirePackage{amssymb}
\RequirePackage{wasysym} \RequirePackage{wasysym}
\RequirePackage{url} \RequirePackage{url}
@ -626,10 +646,10 @@
\RequirePackage[hyperref=auto,style=alphabetic,defernumbers=true,backend=bibtex,backref=true,firstinits=true,maxbibnames=6]{biblatex}[2010/11-19] \RequirePackage[hyperref=auto,style=alphabetic,defernumbers=true,backend=bibtex,backref=true,firstinits=true,maxbibnames=6]{biblatex}[2010/11-19]
\RequirePackage{csquotes} \RequirePackage{csquotes}
\RequirePackage{mdframed} \RequirePackage{mdframed}
\RequirePackage{pdata}
% \end{macrocode} % \end{macrocode}
% in submit mode, we make the links a bit darker, so they print better. % in submit mode, we make the links a bit darker, so they print better.
% \begin{macrocode} % \begin{macrocode}
\RequirePackage{pdata}
\definecolor{darkblue}{rgb}{0,0,.7} \definecolor{darkblue}{rgb}{0,0,.7}
\ifsubmit\def\prop@link@color{darkblue}\else\def\prop@link@color{blue}\fi \ifsubmit\def\prop@link@color{darkblue}\else\def\prop@link@color{blue}\fi
\RequirePackage[bookmarks=true,linkcolor=\prop@link@color, \RequirePackage[bookmarks=true,linkcolor=\prop@link@color,
@ -686,7 +706,7 @@
\fancyhead[LE,RO]{\prop@of@pages\thepage{\pdataref@num{prop}{page}{last}}} \fancyhead[LE,RO]{\prop@of@pages\thepage{\pdataref@num{prop}{page}{last}}}
\fi \fi
\pagestyle{fancyplain} \pagestyle{fancyplain}
%</cls|reporting> %</sty>
% \end{macrocode} % \end{macrocode}
% %
% \subsection{Proposal Metadata}\label{sec:impl:metadata} % \subsection{Proposal Metadata}\label{sec:impl:metadata}
@ -809,7 +829,7 @@
% %
% \begin{environment}{emphbox} % \begin{environment}{emphbox}
% \begin{macrocode} % \begin{macrocode}
%<*cls> %<*sty>
\newmdenv[settings=\large]{emphbox} \newmdenv[settings=\large]{emphbox}
% \end{macrocode} % \end{macrocode}
% \end{environment} % \end{environment}
@ -876,7 +896,7 @@
{\end{prop@proposal} {\end{prop@proposal}
\pdata@def{prop}{page}{last}{\thepage}\ofpagefalse \pdata@def{prop}{page}{last}{\thepage}\ofpagefalse
\pdata@close} \pdata@close}
%</cls> %</sty>
% \end{macrocode} % \end{macrocode}
% \end{environment} % \end{environment}
% %
@ -922,7 +942,7 @@
% %
% \begin{macro}{\site*} % \begin{macro}{\site*}
% \begin{macrocode} % \begin{macrocode}
%<*cls> %<*sty>
\newcommand\site[1]{\hyperlink{site@#1@target}{\wa@ref3{institution}{#1}{acronym}}} \newcommand\site[1]{\hyperlink{site@#1@target}{\wa@ref3{institution}{#1}{acronym}}}
\newcommand\sitename[1]{\hyperlink{site@#1@target}{\wa@ref3{institution}{#1}{name}}} \newcommand\sitename[1]{\hyperlink{site@#1@target}{\wa@ref3{institution}{#1}{name}}}
% \end{macrocode} % \end{macrocode}
@ -1383,7 +1403,6 @@
\pdata@def{taskdep}\dep@id{from}{\taskin{#1}\wp@id}% \pdata@def{taskdep}\dep@id{from}{\taskin{#1}\wp@id}%
\pdata@def{taskdep}\dep@id{to}{#2}% \pdata@def{taskdep}\dep@id{to}{#2}%
\update@deps\dep@id} \update@deps\dep@id}
%</cls>
% \end{macrocode} % \end{macrocode}
% %
%\subsection{Milestones and Deliverables}\label{sec:impl:deliverables} %\subsection{Milestones and Deliverables}\label{sec:impl:deliverables}
@ -1652,6 +1671,7 @@
{\input{\jobname.deliverables}}% {\input{\jobname.deliverables}}%
{\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}} {\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}}
\end{deliverables}} \end{deliverables}}
%</sty>
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
@ -1779,6 +1799,7 @@
% These macros\ednote{maybe add ``wpfig'' in the name to show dependency} determine the % These macros\ednote{maybe add ``wpfig'' in the name to show dependency} determine the
% styling of cells in the work package table. That can be tweaked by redefining them. % styling of cells in the work package table. That can be tweaked by redefining them.
% \begin{macrocode} % \begin{macrocode}
%<*sty>
\definecolorset{gray/rgb/hsb/cmyk}{}{}% \definecolorset{gray/rgb/hsb/cmyk}{}{}%
{leadgray,.90/.90,.90,.90/0,0,.90/0,0,0,.10;% {leadgray,.90/.90,.90,.90/0,0,.90/0,0,0,.10;%
wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30;% wagray,.70/.70,.70,.70/0,0,.70/0,0,0,.30;%
@ -1799,11 +1820,8 @@ ganttgray,.60/.60,.60,.60/0,0,.60/0,0,0,.40}
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{environment}{wp@figure} % We first define the options for the |\wpfig| macro, they specify what columns we have
% This environment makes legend for the table (but not the contents) for the |\wpfig| % in the table.
% macro. The main work achieved here is to generate the head line (sideways) and the
% footer in the various cases given by the package options.\ednote{this is a bit of
% misnomer, it does not do the figure bit. }
% \begin{macrocode} % \begin{macrocode}
\newcounter{wpfig@options} \newcounter{wpfig@options}
\define@key{wpfig}{size}{\def\wpfig@size{#1}\@dmp{size=#1}} \define@key{wpfig}{size}{\def\wpfig@size{#1}\@dmp{size=#1}}
@ -1820,6 +1838,15 @@ ganttgray,.60/.60,.60,.60/0,0,.60/0,0,0,.40}
\define@key{wpfig}{end}[true]{\def\wpfig@end{#1}\stepcounter{wpfig@options}} \define@key{wpfig}{end}[true]{\def\wpfig@end{#1}\stepcounter{wpfig@options}}
\define@key{wpfig}{label}{\def\wpfig@label{#1}} \define@key{wpfig}{label}{\def\wpfig@label{#1}}
\define@key{wpfig}{caption}{\def\wpfig@caption{#1}} \define@key{wpfig}{caption}{\def\wpfig@caption{#1}}
% \end{macrocode}
%
% \begin{environment}{wp@figure}
% This environment makes legend for the table (but not the contents) for the |\wpfig|
% macro. The main work achieved here is to generate the head line (sideways) and the
% footer in the various cases given by the package options.\ednote{this is a bit of
% misnomer, it does not do the figure bit. } Depending on the various class and |wpfig|
% options, we make header and footer line for the table.
% \begin{macrocode}
\def\@sw#1{\begin{sideways}#1\end{sideways}} \def\@sw#1{\begin{sideways}#1\end{sideways}}
\newenvironment{wp@figure}{\begin{table}[ht]\wpfig@style\begin{center} \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% {\let\@sw\relax\let\textbf\relax\let\site\relax\let\pn\relax\let\sys\relax%
@ -2406,7 +2433,6 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% now the multilinguality support % now the multilinguality support
% \begin{macrocode} % \begin{macrocode}
\newcommand\coherence@caption{Previous Collaboration between {\pn} members} \newcommand\coherence@caption{Previous Collaboration between {\pn} members}
%</cls>
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
@ -2415,7 +2441,6 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% We first define a bibLaTeX bibliography heading that does not create headers, we need % We first define a bibLaTeX bibliography heading that does not create headers, we need
% it somewhere. % it somewhere.
% \begin{macrocode} % \begin{macrocode}
%<*cls|reporting>
\defbibheading{empty}{} \defbibheading{empty}{}
% \end{macrocode} % \end{macrocode}
% We define an internal macro that prints a publication list of a given {bib\TeX} entry % We define an internal macro that prints a publication list of a given {bib\TeX} entry
@ -2486,7 +2511,7 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
use the pubspage key in the proposal environment!}} use the pubspage key in the proposal environment!}}
{\prop@warnpubs@message% {\prop@warnpubs@message%
\@for\@I:=\prop@gen@pubspages\do{\par\noindent\csname\@I\endcsname}}} \@for\@I:=\prop@gen@pubspages\do{\par\noindent\csname\@I\endcsname}}}
%</cls|reporting> %</sty>
% \end{macrocode} % \end{macrocode}
% %
% \subsection{Miscellaneous}\label{sec:impl:misc} % \subsection{Miscellaneous}\label{sec:impl:misc}

View File

@ -23,6 +23,7 @@
% generate base package % generate base package
\generate{\file{proposal.cls}{\from{proposal.dtx}{cls}}} \generate{\file{proposal.cls}{\from{proposal.dtx}{cls}}}
\generate{\file{proposal.sty}{\from{proposal.dtx}{sty}}}
\generate{\file{reporting.cls}{\from{proposal.dtx}{reporting}}} \generate{\file{reporting.cls}{\from{proposal.dtx}{reporting}}}
\generate{\file{pdata.sty}{\from{proposal.dtx}{pdata}}} \generate{\file{pdata.sty}{\from{proposal.dtx}{pdata}}}

Binary file not shown.

View File

@ -7,7 +7,7 @@
%% proposal.dtx (with options: `reporting') %% proposal.dtx (with options: `reporting')
%% %%
\NeedsTeXFormat{LaTeX2e}[1999/12/01] \NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{reporting}[2016/04/15 v1.5 Project Reporting] \ProvidesPackage{reporting}[2016/10/26 v1.6 Project Reporting]
\newif\if@wpsubsection\@wpsubsectionfalse \newif\if@wpsubsection\@wpsubsectionfalse
\newif\ifsubmit\submitfalse \newif\ifsubmit\submitfalse
\newif\ifgrantagreement\grantagreementfalse \newif\ifgrantagreement\grantagreementfalse
@ -33,64 +33,7 @@
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions \ProcessOptions
\LoadClass[a4paper,twoside]{\proposal@class} \LoadClass[a4paper,twoside]{\proposal@class}
\RequirePackage{amssymb} \RequirePackage{proposal}
\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}
\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}
\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}
\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}
\ifpublic\excludecomment{private}\else\includecomment{private}\fi
\setcounter{secnumdepth}{3}
\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}
\newif\if@report\@reportfalse \newif\if@report\@reportfalse
\newenvironment{report}[1][]% \newenvironment{report}[1][]%
{\@reporttrue\readpdata\jobname% {\@reporttrue\readpdata\jobname%
@ -117,174 +60,6 @@
\end{center} \end{center}
\setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}} \setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
{} {}
\newcommand\deliv@error{\PackageError{proposal}
{To use use deliverables, you have to specify the option 'deliverables'}}
\newenvironment{wpdelivs}{\begin{wp@delivs}}{\end{wp@delivs}}
\newenvironment{wp@delivs}
{\ifdelivs\textbf\deliv@legend@delivs:\\[-3ex]%
\begin{compactdesc}\else\deliv@error\fi}
{\ifdelivs\end{compactdesc}\fi}
\newcommand\deliv@legend@delivs{Deliverables}
\newenvironment{wadelivs}
{\textbf\deliv@legend@delivs:\\[-3ex]\begin{wp@delivs}}
{\end{wp@delivs}}
\newcommand\lec[1]{\strut\hfil\strut\null\nobreak\hfill\hbox{$\leadsto$#1}\par}
\newcommand\deliv@label[1]{D{#1}}
\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}}
\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}}
\define@key{deliv}{issue}{\def\deliv@issue{#1}}
\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}{\taskin\deliv@id\wpg@id}{label}{\current@label}
\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{title}{#2}
\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{page}{\thepage}%
\@ifundefined{deliv@short}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{short}{#2}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{short}{\deliv@short}}
\@ifundefined{deliv@nature}
{\protect\G@refundefinedtrue\@latex@warning{key 'nature' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{nature}{\deliv@nature}}
\@ifundefined{deliv@dissem}
{\protect\G@refundefinedtrue\@latex@warning{key 'dissem' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{dissem}{\deliv@dissem}}
\@ifundefined{deliv@lead}
{\protect\G@refundefinedtrue\@latex@warning{key 'lead' for Deliv \wpg@id undefined}}
{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{lead}{\deliv@lead}}
\@ifundefined{deliv@due}{}{%
\@ifundefined{deliv@issue}{}{\pdata@def{deliv}{\taskin\deliv@id\wpg@id}{issue}{\deliv@issue}}
\@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}{??}{\taskin\deliv@id\wpg@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
\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}{\taskin\deliv@id\wpg@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}}}
\newenvironment{wadeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wa}\else\deliv@error\fi}{}
\newenvironment{wpdeliv}[2][]{\ifdelivs\wpg@deliv{#1}{#2}{wp}\else\deliv@error\fi}{}
\newcommand\milestone@label[1]{M{#1}}
\newcommand\mileref[1]{\pdataRef{mile}{#1}{label}}
\newcommand\miletref[1]{\mileref{#1}: \pdataRefFB{mile}{#1}{short}{title}}
\newcounter{milestone}
\define@key{milestone}{id}{\gdef\mile@id{#1}}
\define@key{milestone}{month}{\gdef\mile@month{#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{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}
\newcommand\@milestone[3]{% id, title, description
\item \textbf{\miles@legend@milestone\xspace\pdata@target{mile}\mile@id{\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}
\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}
\newenvironment{@milestones}{\begin{enumerate}}{\end{enumerate}}
\newcommand{\deliverable}[9]{\pdataRef{deliv}{#4}{label}&#7&#8&#9&#6&#5&#2\\\hline}%sortkey,due,label,id,title,type,level,lead
\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}
\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}
\newcommand{\inputdelivs}[1]{%
\begin{deliverables}{#1}%
\IfFileExists{\jobname.deliverables}%
{\input{\jobname.deliverables}}%
{\IfFileExists{\jobname.delivs}{\input{\jobname.delivs}}{}}
\end{deliverables}}
\defbibheading{empty}{}
\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}}}
\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}
\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}}
\DeclareBibliographyCategory{featured}
\newcommand\prop@paperlist[2][]{%
\let\biboldfont\bibfont%
\renewcommand{\bibfont}{\footnotesize}%
\renewcommand{\baselinestretch}{.9}%
\nocite{#2}\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}
\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}}}
\endinput \endinput
%% %%
%% End of file `reporting.cls'. %% End of file `reporting.cls'.

Binary file not shown.