diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-20 21:07:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-20 21:07:14 +0000 |
commit | c01e3cc67bce910fad535c50c41da044fc23e882 (patch) | |
tree | d13fbc9bd655a58139ccb7d6acf3c2da154bb147 /Master/texmf-dist/source/latex/latexgit | |
parent | 265f9ac6d3fc91d897651772036f22f7f8f094de (diff) |
latexgit (20apr20)
git-svn-id: svn://tug.org/texlive/trunk@54811 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/latexgit')
-rw-r--r-- | Master/texmf-dist/source/latex/latexgit/latexgit.dtx | 23 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/latexgit/latexgit.ins | 4 |
2 files changed, 21 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/latexgit/latexgit.dtx b/Master/texmf-dist/source/latex/latexgit/latexgit.dtx index 100d1d16a8d..2d8435fc7ba 100644 --- a/Master/texmf-dist/source/latex/latexgit/latexgit.dtx +++ b/Master/texmf-dist/source/latex/latexgit/latexgit.dtx @@ -16,7 +16,7 @@ latexgit Author: Camil Staps <info@camilstaps.nl> \endpreamble \postamble -Copyright (c) 2016 Camil Staps <info@camilstaps.nl> +Copyright (c) 2016-2020 Camil Staps <info@camilstaps.nl> Licensed under GPL v3. \endpostamble \usedir{tex/latex/latexgit} @@ -226,11 +226,15 @@ Licensed under GPL v3. % %\DescribeMacro{\gitcommitdate} % This macro displays the \git{} commit date. -% The following example shows a usage example and shows the results of the -% options +% The following example shows the effect of the options % \gitopt{formatDate}, \gitopt{formatTime} and \gitopt{showTimeZone}. % \LTXinputExample[pos=b,numbers=none]{exmp/gitcommitdate.tex} % +%\DescribeMacro{\gitcommand} +% This macro executes an arbitrary \git{} command and directly typesets the +% result. It only accepts the option \gitopt{directory}. +% \LTXinputExample[pos=b,numbers=none]{exmp/gitcommand.tex} +% %\section{Implementation} %\label{sec:implementation} %Define the package and load required packages. @@ -240,7 +244,7 @@ Licensed under GPL v3. % \end{comment} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{latexgit}[2020/03/18] +\ProvidesPackage{latexgit}[2020/04/20] \RequirePackage{pgfkeys} \RequirePackage{datetime} @@ -319,6 +323,17 @@ Licensed under GPL v3. % \end{macrocode} %\end{macro} % +%\begin{macro}{\gitcommand} +% A wrapper around \cs{git@command} and \cs{git@result}, to directly typeset the +% result of arbitrary commands. +% \begin{macrocode} +\newcommand{\gitcommand}[2][]{% + \pgfkeys{/git,default,#1}% + \git@command{git #2}% + \git@result} +% \end{macrocode} +%\end{macro} +% %In what follows, \verb$%$ may be used in calls to \git{}. Therefore we use %\verb$&$ as comment character. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/latexgit/latexgit.ins b/Master/texmf-dist/source/latex/latexgit/latexgit.ins index 532ab7ac2d1..e73c6f02b2e 100644 --- a/Master/texmf-dist/source/latex/latexgit/latexgit.ins +++ b/Master/texmf-dist/source/latex/latexgit/latexgit.ins @@ -15,7 +15,7 @@ latexgit Author: Camil Staps <info@camilstaps.nl> \endpreamble \postamble -Copyright (c) 2016 Camil Staps <info@camilstaps.nl> +Copyright (c) 2016-2020 Camil Staps <info@camilstaps.nl> Licensed under GPL v3. \endpostamble \usedir{tex/latex/latexgit} @@ -23,7 +23,7 @@ Licensed under GPL v3. \file{\jobname.sty}{\from{\jobname.dtx}{package}} } \endbatchfile -%% Copyright (c) 2016 Camil Staps <info@camilstaps.nl> +%% Copyright (c) 2016-2020 Camil Staps <info@camilstaps.nl> %% Licensed under GPL v3. %% %% End of file `latexgit.ins'. |