addign support for gitinfo2

This commit is contained in:
Michael Kohlhase 2014-10-28 09:10:50 +01:00
parent d996e2bf3d
commit 2b4ed3986f
6 changed files with 71 additions and 47 deletions

View File

@ -15,9 +15,13 @@
\newif\ifdelivs\delivsfalse \newif\ifdelivs\delivsfalse
\newif\ifwork@areas\work@areastrue \newif\ifwork@areas\work@areastrue
\newif\if@RAM\@RAMfalse \newif\if@RAM\@RAMfalse
\newif\if@svninfo\@svninfofalse
\newif\if@gitinfo\@gitinfofalse
\def\proposal@class{article} \def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue} \DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue} \DeclareOption{submit}{\submittrue}
\DeclareOption{gitinfo}{\@gitinfotrue}
\DeclareOption{svninfo}{\@svninfotrue}
\DeclareOption{public}{\publictrue} \DeclareOption{public}{\publictrue}
\DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}} \DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}}
\DeclareOption{RAM}{\@RAMtrue} \DeclareOption{RAM}{\@RAMtrue}
@ -57,10 +61,11 @@
breaklinks=true, bookmarksopen=true]{hyperref} breaklinks=true, bookmarksopen=true]{hyperref}
\ifsubmit \ifsubmit
\RequirePackage[hide]{ed} \RequirePackage[hide]{ed}
\RequirePackage[final,today]{svninfo} \ifsvninfo\RequirePackage[final,today]{svninfo}\fi
\else \else
\RequirePackage[show]{ed} \RequirePackage[show]{ed}
\RequirePackage[eso-foot,today]{svninfo} \ifsvninfo\RequirePackage[eso-foot,today]{svninfo}\fi
\ifgitinfo\RequirePackage[mark]{gitinfo2}\fi
\fi \fi
\renewcommand\ednoteshape{\sl\footnotesize} \renewcommand\ednoteshape{\sl\footnotesize}
\ifpublic\excludecomment{private}\else\includecomment{private}\fi \ifpublic\excludecomment{private}\else\includecomment{private}\fi

View File

@ -95,9 +95,9 @@
% The |proposal| class is distributed under the terms of the LaTeX Project Public License % 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 % 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 % your option, any later version. The CTAN archive always contains the latest stable
% version, the development version can be found at % version, the development version can be found on GitHub at
% \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports please use the sTeX trac % \url{https://github.com/KWARC/LaTeX-proposal}. For bug reports please use the issue
% at \url{https://github.com/KWARC/LaTeX-proposal/issues}. % tracker there.
% %
% \section{The User Interface}\label{sec:user-interface} % \section{The User Interface}\label{sec:user-interface}
% %
@ -106,8 +106,8 @@
% %
% \subsection{Package Options}\label{sec:user:options} % \subsection{Package Options}\label{sec:user:options}
% %
% The |proposal| package takes the options |submit|, |noworkareas|, |public|, and % The |proposal| package takes the options |submit|, |noworkareas|, |RAM|, |deliverables|,
% |keys|. % |wpsubsection|, |keys|, |svninfo|, |gitinfo|, and |public|.
% %
% The \DescribeMacro{submit}|submit| option will disable various proposal management decorations % The \DescribeMacro{submit}|submit| option will disable various proposal management decorations
% which are enabled by default for submission. % which are enabled by default for submission.
@ -125,6 +125,26 @@
% The \DescribeMacro{wpsubsection}|wpsubsection| option specifies that we want to see % The \DescribeMacro{wpsubsection}|wpsubsection| option specifies that we want to see
% subsections headings for the WPs (and WAs, if we have them). % 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 % 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 % (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 % \DescribeEnv{private}|private| environment. If the option |public| is set, the parts of
@ -137,12 +157,6 @@
% \DescribeMacro{\ifpublic}|\ifpublic| conditional: |\ifpublic{3}\else{5}\fi| will result % \DescribeMacro{\ifpublic}|\ifpublic| conditional: |\ifpublic{3}\else{5}\fi| will result
% in ``5'' in the submitted draft and ``3'' in the public document. % in ``5'' in the submitted draft and ``3'' in the public document.
% %
% 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.
%
% \subsection{Proposal Metadata and Title page}\label{sec:user:metadata} % \subsection{Proposal Metadata and Title page}\label{sec:user:metadata}
% %
% The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal| % The metadata of the proposal is specified in the \DescribeEnv{proposal}|proposal|
@ -315,7 +329,7 @@
% expensive to run) are carried out. Note that the value does not have to be given, so % 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. % |\begin{gantt}{draft,yscale=.5,step=3}| is a perfectly good invocation.
% %
% Usually, the |gant| environment is not used however, since it is part of the % 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 % \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 % 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. % above we have to run {\LaTeX} two times for the work phases to show up.
@ -511,9 +525,13 @@
\newif\ifdelivs\delivsfalse \newif\ifdelivs\delivsfalse
\newif\ifwork@areas\work@areastrue \newif\ifwork@areas\work@areastrue
\newif\if@RAM\@RAMfalse \newif\if@RAM\@RAMfalse
\newif\if@svninfo\@svninfofalse
\newif\if@gitinfo\@gitinfofalse
\def\proposal@class{article} \def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue} \DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue} \DeclareOption{submit}{\submittrue}
\DeclareOption{gitinfo}{\@gitinfotrue}
\DeclareOption{svninfo}{\@svninfotrue}
\DeclareOption{public}{\publictrue} \DeclareOption{public}{\publictrue}
\DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}} \DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}}
\DeclareOption{RAM}{\@RAMtrue} \DeclareOption{RAM}{\@RAMtrue}
@ -565,15 +583,16 @@
% the |ed| package~\cite{Kohlhase:ed:ctan} is very useful for collaborative writing and % 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 % 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 % 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| package. % mode. Furthermore, we adapt the options for the |svninfo| and |gitinfo2| packages.
% %
% \begin{macrocode} % \begin{macrocode}
\ifsubmit \ifsubmit
\RequirePackage[hide]{ed} \RequirePackage[hide]{ed}
\RequirePackage[final,today]{svninfo} \ifsvninfo\RequirePackage[final,today]{svninfo}\fi
\else \else
\RequirePackage[show]{ed} \RequirePackage[show]{ed}
\RequirePackage[eso-foot,today]{svninfo} \ifsvninfo\RequirePackage[eso-foot,today]{svninfo}\fi
\ifgitinfo\RequirePackage[mark]{gitinfo2}\fi
\fi \fi
\renewcommand\ednoteshape{\sl\footnotesize} \renewcommand\ednoteshape{\sl\footnotesize}
% \end{macrocode} % \end{macrocode}
@ -722,7 +741,7 @@
% \end{macrocode} % \end{macrocode}
% \end{environment} % \end{environment}
% %
% \subsection{Title Page}\label{sec:impl:metadata} % \subsection{Title Page}\label{sec:impl:titlepage}
% %
% \begin{environment}{prop@proposal} % \begin{environment}{prop@proposal}
% This internal environment is called in the |proposal| environment from the |proposal| % This internal environment is called in the |proposal| environment from the |proposal|
@ -756,7 +775,7 @@
% \end{environment} % \end{environment}
% %
% \begin{environment}{proposal} % \begin{environment}{proposal}
% The |proposal| environment reads the metdata keys defined above, and if there were no % 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 % |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 % 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. % opens up the project data file |\pdata@out|, which it also closes at the end.
@ -1554,7 +1573,7 @@
% \end{macro} % \end{macro}
% %
% \begin{macro}{\pdata@target} % \begin{macro}{\pdata@target}
% This internal macro makes a hypertarget: % This internal macro makes a hyper-target:
% |\pdata@target{|\meta{cat}|}{|\meta{id}|}{|\meta{label}|}| prints \meta{label} with a % |\pdata@target{|\meta{cat}|}{|\meta{id}|}{|\meta{label}|}| prints \meta{label} with a
% target name \meta{cat}|@|\meta{id}|@target| attached to it. % target name \meta{cat}|@|\meta{id}|@target| attached to it.
% \begin{macrocode} % \begin{macrocode}
@ -2323,20 +2342,20 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% \end{macro} % \end{macro}
% \Finale % \Finale
\endinput \endinput
% LocalWords: proposal dtx xkohlhase areastrue svninfo noworkareas twoside emph % LocalWords: proposal dtx xkohlhase areastrue svninfo noworkareas twoside emph gitinfo
% LocalWords: areasfalse wa textcomp amssymb url graphicx colortbl xcolor RO % LocalWords: areasfalse wa textcomp amssymb url graphicx colortbl xcolor RO OJBref sl
% LocalWords: fancyhdr keyval eurosym tikz calc USenglish ngerman linkcolor ne % LocalWords: fancyhdr keyval eurosym tikz calc USenglish ngerman linkcolor ne WPref gen
% LocalWords: citecolor urlcolor colorlinks pagecolor breaklinks bookmarksopen % LocalWords: citecolor urlcolor colorlinks pagecolor breaklinks bookmarksopen WPref
% LocalWords: hyperref LaTeX workpackage PIs thema acrolong anzungsantrag im % LocalWords: hyperref LaTeX workpackage PIs thema acrolong anzungsantrag im Mitarbeiter
% LocalWords: Einzelverfahren tabline Allgemeine Angaben Antragsteller worktel % LocalWords: Einzelverfahren tabline Allgemeine Angaben Antragsteller worktel ifsvninfo
% LocalWords: bitabline personaltitle academictitle birthdate Dienstanschrift % LocalWords: bitabline personaltitle academictitle birthdate Dienstanschrift Hilfskraft
% LocalWords: workaddress atabline workfax Privatanschrift privaddress privtel % LocalWords: workaddress atabline workfax Privatanschrift privaddress privtel ifgitinfo
% LocalWords: dt Kennwort Fachgebiet und Arbeitsrichtung Voraussichtliche wa % LocalWords: dt Kennwort Fachgebiet und Arbeitsrichtung Voraussichtliche wa fancyfoot
% LocalWords: Gesamtdauer Antragszeitraum Zusammenfassung workarea wp wps num % LocalWords: Gesamtdauer Antragszeitraum Zusammenfassung workarea wp wps num prop@gen
% LocalWords: refundefinedtrue lightgray gantt xstep Unterschriften Id areas % LocalWords: refundefinedtrue lightgray gantt xstep Unterschriften Id areas acro
% LocalWords: submit hide ed public article paper today array comment wide RE % 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 % 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 % LocalWords: def id title acronym discipline start months Proposal Erg by cls endinput
% LocalWords: empty em name affiliation Applicants Work Address email The pn % LocalWords: empty em name affiliation Applicants Work Address email The pn
% LocalWords: curriculum vita the applicants are enclosed appendix reference % LocalWords: curriculum vita the applicants are enclosed appendix reference
% LocalWords: Research area and field work Scientific Fields Anticipated write % LocalWords: Research area and field work Scientific Fields Anticipated write
@ -2392,6 +2411,7 @@ joint&\multicolumn{\the@site}{l|}{\jpub $\hat=$ publication, \jpro $\hat=$ proje
% LocalWords: inproceedings wspapers notkeyword techreports techreport emphbox % LocalWords: inproceedings wspapers notkeyword techreports techreport emphbox
% LocalWords: textbackslash wpsectionheadings compactht compactht emphbox sym % LocalWords: textbackslash wpsectionheadings compactht compactht emphbox sym
% LocalWords: dfgproposal Tsanko Tsankov mdframed newmdenv wphase thealltasks % LocalWords: dfgproposal Tsanko Tsankov mdframed newmdenv wphase thealltasks
% LocalWords: alltasks taskreflong definecolorset leadgray wagray thewpfig % LocalWords: alltasks taskreflong definecolorset leadgray wagray thewpfig fancyhfoffset
% LocalWords: wpfigstyle colspan keyvals gantttaskchart baselinestretch % LocalWords: wpfigstyle colspan keyvals gantttaskchart baselinestretch NeedsTeXFormat
% LocalWords: mileref mileref miletref backref firstinits % LocalWords: mileref mileref miletref backref firstinits wissenschaftlicher
% LocalWords: wissenschaftliche startend@wphases addtocategory

Binary file not shown.

View File

@ -15,9 +15,13 @@
\newif\ifdelivs\delivsfalse \newif\ifdelivs\delivsfalse
\newif\ifwork@areas\work@areastrue \newif\ifwork@areas\work@areastrue
\newif\if@RAM\@RAMfalse \newif\if@RAM\@RAMfalse
\newif\if@svninfo\@svninfofalse
\newif\if@gitinfo\@gitinfofalse
\def\proposal@class{article} \def\proposal@class{article}
\DeclareOption{wpsubsection}{\@wpsubsectiontrue} \DeclareOption{wpsubsection}{\@wpsubsectiontrue}
\DeclareOption{submit}{\submittrue} \DeclareOption{submit}{\submittrue}
\DeclareOption{gitinfo}{\@gitinfotrue}
\DeclareOption{svninfo}{\@svninfotrue}
\DeclareOption{public}{\publictrue} \DeclareOption{public}{\publictrue}
\DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}} \DeclareOption{noworkareas}{\work@areasfalse\PassOptionsToClass{\CurrentOption}{pdata}}
\DeclareOption{RAM}{\@RAMtrue} \DeclareOption{RAM}{\@RAMtrue}
@ -57,10 +61,11 @@
breaklinks=true, bookmarksopen=true]{hyperref} breaklinks=true, bookmarksopen=true]{hyperref}
\ifsubmit \ifsubmit
\RequirePackage[hide]{ed} \RequirePackage[hide]{ed}
\RequirePackage[final,today]{svninfo} \ifsvninfo\RequirePackage[final,today]{svninfo}\fi
\else \else
\RequirePackage[show]{ed} \RequirePackage[show]{ed}
\RequirePackage[eso-foot,today]{svninfo} \ifsvninfo\RequirePackage[eso-foot,today]{svninfo}\fi
\ifgitinfo\RequirePackage[mark]{gitinfo2}\fi
\fi \fi
\renewcommand\ednoteshape{\sl\footnotesize} \renewcommand\ednoteshape{\sl\footnotesize}
\ifpublic\excludecomment{private}\else\includecomment{private}\fi \ifpublic\excludecomment{private}\else\includecomment{private}\fi

View File

@ -1,16 +1,10 @@
% the document class specification for the proposal writing process, add the 'submit' option % 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 % for submitting (switches off various draft features); add the 'public' option to exclude
% any private parts. % any private parts.
\documentclass[RAM,noworkareas,nosites]{dfgproposal} \documentclass[RAM,noworkareas,gitinfo]{dfgproposal}
%\documentclass[submit]{dfgproposal} %\documentclass[submit]{dfgproposal}
%\documentclass[submit,public]{dfgproposal} %\documentclass[submit,public]{dfgproposal}
\addbibresource{../lib/dummy} \addbibresource{../lib/dummy}
% the following lines get updated by subversion keyword replacement. They are used by the
% \svninfo package in draft mode to generate metadata.
\svnInfo $Id: proposal.tex 24441 2013-06-04 07:00:05Z kohlhase $
\svnKeyword $HeadURL: https://svn.kwarc.info/repos/kwarc/doc/macros/forCTAN/proposal/dfg/examples/simple-proposal/proposal.tex $
%
\input{../lib/WApersons} \input{../lib/WApersons}