better handling of attachements (adding an option) in \end{proposal}

This commit is contained in:
Michael Kohlhase 2021-03-25 08:09:26 +01:00
parent 91ef2dff13
commit 616d1b004b
6 changed files with 46 additions and 21 deletions

View File

@ -140,6 +140,7 @@
\def\@dmp#1{\ifkeys\marginpar{\small #1}\fi}
\renewcommand\euro{\officialeuro\xspace}
\endinput
%%
%% End of file `pdata.sty'.

View File

@ -20,6 +20,7 @@
\newif\if@gitinfo\@gitinfofalse
\newif\if@numericcites\@numericcitesfalse
\newif\if@longtasklabels\@longtasklabelsfalse
\newif\if@attachments\@attachmentsfalse
\def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue}
@ -34,11 +35,13 @@
\DeclareOption{keys}{\keystrue}
\DeclareOption{deliverables}{\delivstrue}
\DeclareOption{longtasklabels}{\@longtasklabelstrue}
\DeclareOption{attachments}{\@attachmentsfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\proposal@class}}
\ProcessOptions
\LoadClass[a4paper,twoside]{\proposal@class}
\RequirePackage{proposal}
\endinput
%%
%% End of file `proposal.cls'.

View File

@ -134,7 +134,8 @@
% \subsection{Package Options}\label{sec:user:options}
%
% The |proposal| package takes the options |submit|, |noworkareas|, |RAM|, |deliverables|,
% |wpsubsection|, |keys|, |svninfo|, |gitinfo|, |numericcites|, and |public|.
% |wpsubsection|, |keys|, |svninfo|, |gitinfo|, |numericcites|, |public|,
% |longtasklabels|, and |attachments|.
%
% The \DescribeMacro{submit}|submit| option will disable various proposal management decorations
% which are enabled by default for submission.
@ -153,7 +154,11 @@
% subsections headings for the WPs (and WAs, if we have them).
%
% The \DescribeMacro{longtasklabels}|longtasklabels| option specifies that we want to long
% task labels (i.e. including the WP and possibly WA numbers)
% task labels (i.e. including the WP and possibly WA numbers).
%
% The \DescribeMacro{attachments}|attachments| option specifies that we want a list of
% attachments generated by the |\end{proposal}|. This uses the macor |\prop@attachments|
% which can be customized.
%
% 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|.
@ -629,6 +634,7 @@
\newif\if@gitinfo\@gitinfofalse
\newif\if@numericcites\@numericcitesfalse
\newif\if@longtasklabels\@longtasklabelsfalse
\newif\if@attachments\@attachmentsfalse
\def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue}
@ -643,6 +649,7 @@
\DeclareOption{keys}{\keystrue}
\DeclareOption{deliverables}{\delivstrue}
\DeclareOption{longtasklabels}{\@longtasklabelstrue}
\DeclareOption{attachments}{\@attachmentsfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\proposal@class}}
\ProcessOptions
\LoadClass[a4paper,twoside]{\proposal@class}
@ -912,16 +919,23 @@
% \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
\pdataref{PI\@I}{title} \pdataref{PI}\@I{name}}
\end{itemize}\newpage
{\if@attachments\proposal@attachments\fi
\printbibliography[heading=warnpubs]}
% \end{macrocode}
% \end{environment}
%
%
% \begin{macro}{\prop@attachments}
% \begin{macrocode}
\newcommand\prop@attachments{%
\section{List of Attachments}\label{sec:attachments}%
\begin{itemize}%
\@for\@I:=\prop@gen@PIs\do{%
\item Curriculum Vitae and list of publications for%
\pdataref{PI\@I}{title} \pdataref{PI}\@I{name}}%
\end{itemize}\newpage}
% \end{macrocode}
% \end{macro}
%
% \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| (if the |RAM| package option was
@ -2720,7 +2734,13 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% \end{macro}
% \Finale
% \endinput
% LocalWords: localization sec:user-interface standardizes initialization referencable
% Local Variables:
% mode: doctex
% TeX-master: t
% End:
% LocalWords: localization sec:user-interface standardizes initialization referencable
% LocalWords: pages,start,length,caption sec:implwptable draft,yscale organization
% LocalWords: tab:collaboration sec:limitations sec:implementation ifgrantagreement
% LocalWords: grantagreementfalse grantagreement grantagreementtrue a4paper,twoside
@ -2805,11 +2825,6 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% LocalWords: numericcites LaTeX-proposal:git numeric,hyperref auto,defernumbers 5,step
% LocalWords: 9,maxcitenames alphabetic,hyperref bigcentering rightskip parindent
% LocalWords: parfillskip endbigcenter endtrivlist 2,title customized if@longtasklabels
% Local Variables:
% mode: doctex
% TeX-master: t
% End:
% LocalWords: 9,maxcitenames multilinguality 2pt,color 2,title 5,step true,giveninits
% LocalWords: 9,maxcitenames hide,marginnote show,marginnote if@taskshowwps 2pt,color
% LocalWords: 2,title 5,step 9,maxcitenames 2pt,color 2,title 5,step 9,maxcitenames

Binary file not shown.

View File

@ -87,13 +87,15 @@
\end{tabular}\\[2cm]
\end{center}
\setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
{\section{List of Attachments}
\begin{itemize}
\@for\@I:=\prop@gen@PIs\do{%
\item Curriculum Vitae and list of publications for
\pdataref{PI\@I}{title} \pdataref{PI}\@I{name}}
\end{itemize}\newpage
{\if@attachments\proposal@attachments\fi
\printbibliography[heading=warnpubs]}
\newcommand\prop@attachments{%
\section{List of Attachments}\label{sec:attachments}%
\begin{itemize}%
\@for\@I:=\prop@gen@PIs\do{%
\item Curriculum Vitae and list of publications for%
\pdataref{PI\@I}{title} \pdataref{PI}\@I{name}}%
\end{itemize}\newpage}
\newenvironment{proposal}[1][]{\readpdata\jobname
\ofpagetrue\setkeys{prop@gen}{#1}
\pdata@open\jobname
@ -1099,6 +1101,7 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
{\usebibmacro{url+urldate}}
{}}
\endinput
%%
%% End of file `proposal.sty'.

View File

@ -20,6 +20,7 @@
\newif\if@gitinfo\@gitinfofalse
\newif\if@numericcites\@numericcitesfalse
\newif\if@longtasklabels\@longtasklabelsfalse
\newif\if@attachments\@attachmentsfalse
\def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue}
@ -34,6 +35,7 @@
\DeclareOption{keys}{\keystrue}
\DeclareOption{deliverables}{\delivstrue}
\DeclareOption{longtasklabels}{\@longtasklabelstrue}
\DeclareOption{attachments}{\@attachmentsfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\proposal@class}}
\ProcessOptions
\LoadClass[a4paper,twoside]{\proposal@class}
@ -66,6 +68,7 @@
\setcounter{tocdepth}{2}\tableofcontents\newpage\setcounter{page}{1}}
{}
\endinput
%%
%% End of file `reporting.cls'.