From c01e3cc67bce910fad535c50c41da044fc23e882 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Apr 2020 21:07:14 +0000 Subject: latexgit (20apr20) git-svn-id: svn://tug.org/texlive/trunk@54811 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/latexgit/latexgit.dtx | 23 ++++++++++++++++++---- .../texmf-dist/source/latex/latexgit/latexgit.ins | 4 ++-- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/source/latex') 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 \endpreamble \postamble -Copyright (c) 2016 Camil Staps +Copyright (c) 2016-2020 Camil Staps 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 \endpreamble \postamble -Copyright (c) 2016 Camil Staps +Copyright (c) 2016-2020 Camil Staps 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 +%% Copyright (c) 2016-2020 Camil Staps %% Licensed under GPL v3. %% %% End of file `latexgit.ins'. -- cgit v1.2.3