From 2c905f0fd74eea2216913ec3f453cd01cffc9c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hilbig?= Date: Wed, 1 Apr 2015 00:38:45 +0200 Subject: [PATCH] =?UTF-8?q?gitinfo2=20hinzugef=C3=BCgt,=20versioninfo=20pe?= =?UTF-8?q?r=20gitinfo-Option=20an=20ahilbig-script=20bzw=20ahilbig-presen?= =?UTF-8?q?tation=20aufrufbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ahilbig-common.sty | 3 +-- ahilbig-presentation.sty | 26 +++++++++++++++++--------- ahilbig-script.sty | 30 ++++++++++++++++++++---------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/ahilbig-common.sty b/ahilbig-common.sty index 9397995..6edbdfb 100644 --- a/ahilbig-common.sty +++ b/ahilbig-common.sty @@ -38,7 +38,7 @@ \RequirePackage{staves} \RequirePackage{rotating} \RequirePackage{scalerel} -\RequirePackage{longtable} +\RequirePackage{longtable,booktabs} \RequirePackage[official]{eurosym} \RequirePackage{fancybox} \RequirePackage{tabularx} @@ -99,7 +99,6 @@ \def\UrlFont{} - %%\ifcd\else %\RequirePackage{futura} %% \RequirePackage{utopia} diff --git a/ahilbig-presentation.sty b/ahilbig-presentation.sty index 13e2aa4..77f8aea 100644 --- a/ahilbig-presentation.sty +++ b/ahilbig-presentation.sty @@ -31,6 +31,8 @@ \DeclareOption{cmmath}{\cmmathtrue} \newif\ifonelecture \DeclareOption{onelecture}{\onelecturetrue} +\newif\ifgitinfo +\DeclareOption{gitinfo}{\gitinfotrue} \ProcessOptions %\RequirePackage[draft]{ddi-common} @@ -61,16 +63,22 @@ \providecommand\insertlecture{Vortrag} \providecommand\lecturename{Vortragtitel} -\providecommand\versionsinfo{% -% \textcolor{blue!50}{% -% \begin{tabular}{ll} -% Version: &\svnfilerev \\ %\hline -% Stand: &\svnfiletoday, \svnfilehour:\svnfileminute ~Uhr\\ %\hline -% Zuletzt bearbeitet von:&\svnFullAuthor{\svnfileauthor} -% \end{tabular} -% } -} +\ifgitinfo + \RequirePackage{gitinfo2} + \providecommand\versionsinfo{% + %Gitinfo -- \gitAbbrevHash in \gitBranch von (\gitAuthorEmail) am \gitAuthorDate + Versionsinformationen: + \begin{tabular}{ll} + \textcolor{blue!70}{Hash:} & \textcolor{blue!45}{\gitAbbrevHash} \\ + \textcolor{blue!70}{Branch:} & \textcolor{blue!45}{\gitBranch} \\ + \textcolor{blue!70}{Stand:} & \textcolor{blue!45}{\gitAuthorIsoDate} \\ + \textcolor{blue!70}{Zuletzt bearbeitet von:} & \textcolor{blue!45}{\gitAuthorName\ (\gitAuthorEmail)}\\ + \end{tabular} + } +\else + \providecomman\versionsinfo{} +\fi % Common packages % diff --git a/ahilbig-script.sty b/ahilbig-script.sty index c91bc64..d077ade 100644 --- a/ahilbig-script.sty +++ b/ahilbig-script.sty @@ -31,6 +31,8 @@ \DeclareOption{cmmath}{\cmmathtrue} \newif\ifonelecture \DeclareOption{onelecture}{\onelecturetrue} +\newif\ifgitinfo +\DeclareOption{gitinfo}{\gitinfotrue} \ProcessOptions %\RequirePackage{caption} @@ -38,7 +40,7 @@ %\RequirePackage[draft]{ddi-common} %\RequirePackage[blackandwhite]{ddi-common} %\RequirePackage[cd]{ddi-common} -\RequirePackage{ahilbig-common} + \RequirePackage{ahilbig-common} \RequirePackage{ahilbig-semester} @@ -55,6 +57,7 @@ \RequirePackage{pdflscape} \RequirePackage{placeins} + \RequirePackage{varsfromjobname} % Element[e] aus \jobname extrahieren %\RequirePackage{qrcode} % Wird in maintitle genutzt - auskommentiert @@ -65,15 +68,22 @@ \providecommand\insertlecture{Vortrag} \providecommand\lecturename{Vortragtitel} -\providecommand\versionsinfo{% - %\textcolor{blue!50}{% - % \begin{tabular}{ll} - % Version: &\svnfilerev \\ %\hline - % Stand: &\svnfiletoday, \svnfilehour:\svnfileminute ~Uhr\\ %\hline - % Zuletzt bearbeitet von:&\svnFullAuthor{\svnfileauthor} - % \end{tabular} - %} -} +\ifgitinfo + \RequirePackage{gitinfo2} + \providecommand\versionsinfo{% + %Gitinfo -- \gitAbbrevHash in \gitBranch von (\gitAuthorEmail) am \gitAuthorDate + Versionsinformationen: + + \begin{tabular}{ll} + \textcolor{blue!70}{Hash:} & \textcolor{blue!45}{\gitAbbrevHash} \\ + \textcolor{blue!70}{Branch:} & \textcolor{blue!45}{\gitBranch} \\ + \textcolor{blue!70}{Stand:} & \textcolor{blue!45}{\gitAuthorIsoDate} \\ + \textcolor{blue!70}{Zuletzt bearbeitet von:} & \textcolor{blue!45}{\gitAuthorName\ (\gitAuthorEmail)}\\ + \end{tabular} + } +\else + \providecomman\versionsinfo{} +\fi \ifonelecture