summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty')
-rw-r--r--Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty20
1 files changed, 17 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty b/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty
index c50777ff67f..bfe37398131 100644
--- a/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty
+++ b/Master/texmf-dist/tex/latex/gitinfo2/gitinfo2.sty
@@ -18,8 +18,9 @@
% and gitPseudoHeadInfo.gin
% -----------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{gitinfo2}[2014/10/03 v2.0.4 git revision information]
+\ProvidesPackage{gitinfo2}[2015/11/08 v2.0.5 git revision information]
\RequirePackage{etoolbox}
+\RequirePackage{xstring}
\RequirePackage{kvoptions}
\RequirePackage{eso-pic}
\SetupKeyvalOptions{family=gitinfo,prefix=gitInf@}
@@ -63,7 +64,11 @@
\newcommand{\gitRoff}{}
\newcommand{\gitDescribe}{(None)}
\newcommand{\gitMarkPref}{[git]}
-\newcommand{\gitMarkFormat}{\color{gray}\small\sffamily}
+\@ifpackageloaded{xcolor}{%
+ \newcommand{\gitMarkFormat}{\color{gray}\small\sffamily}%
+}{%
+ \newcommand{\gitMarkFormat}{\small\sffamily}%
+}
\newcommand{\gitMark}{}
\newcommand{\gitWrapEmail}[1]{#1}
% private values
@@ -106,7 +111,7 @@
\else
\edef\GI@repo@prefix{../\GI@repo@prefix}%
\IfFileExists{\GI@githeadinfo@file}{%
- \PackageWarningNoLine{gitinfo2}{%
+ \PackageInfo{gitinfo2}{%
gitinfo2 found : \GI@githeadinfo@file \MessageBreak
}%
\GI@export@macro\GI@githeadinfo@file
@@ -187,6 +192,15 @@
% ---------------------------------------------------------------------
% Datetime integration
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+\@ifpackageloaded{datetime2}{%
+ \IfEq{\gitAuthorDate}{\gitInf@missing}{%
+ \DTMsavedate{gitdate}{\THEDAY-\THEMONTH-\THEYEAR}
+ }{%
+ \StrCut{\gitAuthorDate}{-}{\gitInf@year}{\gitInf@md}
+ \StrCut{\gitInf@md}{-}{\gitInf@month}{\gitInf@day}
+ \DTMsavenoparsedate{gitdate}{\gitInf@year}{\gitInf@month}{\gitInf@day}{-1}
+ }
+}{}%
\@ifpackageloaded{datetime}{%
\IfEq{\gitAuthorDate}{\gitInf@missing}{%
\newdate{gitdate}{\THEDAY}{\THEMONTH}{\THEYEAR}