From eacb790d5448da1764e43075bfc5d219f8c330d2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 4 May 2020 21:24:57 +0000 Subject: gitver (3may20) git-svn-id: svn://tug.org/texlive/trunk@55019 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/gitver/ChangeLog | 6 +++-- Master/texmf-dist/doc/latex/gitver/README.md | 2 +- Master/texmf-dist/doc/latex/gitver/gitver.pdf | Bin 134931 -> 138738 bytes Master/texmf-dist/doc/latex/gitver/gitver.tex | 36 ++++++++++++++++++-------- Master/texmf-dist/tex/latex/gitver/gitver.sty | 8 +++--- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/Master/texmf-dist/doc/latex/gitver/ChangeLog b/Master/texmf-dist/doc/latex/gitver/ChangeLog index 78a7ec28d34..cfe47491cdd 100644 --- a/Master/texmf-dist/doc/latex/gitver/ChangeLog +++ b/Master/texmf-dist/doc/latex/gitver/ChangeLog @@ -1,2 +1,4 @@ -2019-02-06 - * initial release \ No newline at end of file +2019-02-06 - v1.0 + * initial release +2020-04-30 - v1.1 + * Clean up docs and remove extra space from hash output \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/gitver/README.md b/Master/texmf-dist/doc/latex/gitver/README.md index 777c97792e4..17e449a236a 100644 --- a/Master/texmf-dist/doc/latex/gitver/README.md +++ b/Master/texmf-dist/doc/latex/gitver/README.md @@ -1,4 +1,4 @@ -Git Version (version 1.0) +Git Version (version 1.1) ========================= URL: https://github.com/charlesbaynham/gitver diff --git a/Master/texmf-dist/doc/latex/gitver/gitver.pdf b/Master/texmf-dist/doc/latex/gitver/gitver.pdf index 1317ae211ea..82935f0a003 100644 Binary files a/Master/texmf-dist/doc/latex/gitver/gitver.pdf and b/Master/texmf-dist/doc/latex/gitver/gitver.pdf differ diff --git a/Master/texmf-dist/doc/latex/gitver/gitver.tex b/Master/texmf-dist/doc/latex/gitver/gitver.tex index dd600690402..044b3537502 100644 --- a/Master/texmf-dist/doc/latex/gitver/gitver.tex +++ b/Master/texmf-dist/doc/latex/gitver/gitver.tex @@ -18,7 +18,7 @@ \title{\textsf{gitver} -- Git version tags \\ for \LaTeX{} projects} \author{Charles Baynham} -\date{2019/02/06 (v\,1.0)} +\date{2020/04/30 (v\,1.1)} \MaintainedBy{% This file is maintained by Charles Baynham.\\% Bug reports can be opened at\\% @@ -30,8 +30,8 @@ for \LaTeX{} projects} \section{Introduction} The \textsf{gitver} package gets a description of the current git version of this -document and store it in a command |\gitVer|. If memoir or fancyhdr are in use, it -will also add this to the document footers unless the option "noheader" is +document and stores it in a command |\gitVer|. If memoir or fancyhdr are in use, it +will also add this to the document footers unless the option |noheader| is passed. It also defines a command |\versionBox| which outputs a box containing the @@ -39,8 +39,8 @@ version and date of compilation. For this to work, you must have git installed and available on the command line, this document must be part of a git repository, and latex must be -running in "shell escape" mode. This can be enabled by passing \textsf{--shell-escape} -on the command line when compiling your docuemnt, or will be available in the +running in ``shell escape'' mode. This can be enabled by passing \textsf{--shell-escape} +on the command line when compiling your document, or will be available in the options of whatever GUI you're using (try Googling). Note that it's a good idea to tell git to ignore all the latex auxilary files, @@ -60,7 +60,8 @@ License, version 1.3. \DescribeMacro{\gitVer} % -The main point of this package, the command |\gitVer| prints a string of text describing the current revision of this git repository. Use like so: +The main point of this package, the command |\gitVer| prints a string of text +describing the current revision of this git repository. Use like so: \begin{quote} The current version of this repository is ``|\gitVer{}|''. \end{quote} @@ -83,23 +84,36 @@ gives the output: \subsection{Footers} % (fold) \label{sub:footers} -By default, \textsf{gitver} will try to place a |\versionBox| into the footer of your document. If you're using the |memoir| class or the |fancyhdr| package, this will happen automatically. This document has these footers enabled: have a look at the bottom of this page for an example. +By default, \textsf{gitver} will try to place a |\versionBox| into the footer of +your document. If you're using the |memoir| class or the |fancyhdr| package, +this will happen automatically. This document has these footers enabled: have a +look at the bottom of this page for an example. \DescribeMacro{noheader} You can disable the headers by adding the option |noheader| to the package call. -If you include |gitver| without either of |memoir| or |fancyhdr| loaded, it will complain. To suppress this complaint, pass the |noheader| option. +If you include |gitver| without either of |memoir| or |fancyhdr| loaded, it will +complain. To suppress this complaint, pass the |noheader| option. -To customise the header / footer behavior, pass |noheader| and then use a combination of |\versionBox| and |\gitVer| to make your own headers/footers. +To customise the header / footer behavior, pass |noheader| and then use a +combination of |\versionBox| and |\gitVer| to make your own headers/footers. % subsection footers (end) \subsection{Metadata} % (fold) \label{sub:metadata} -\DescribeMacro{nopdfinfo} -By default, this package also adds the git tag to to pdf document's metadata under the subject field. To disable this behaviour, pass the option |nopdfinfo|. +\DescribeMacro{nopdfinfo} By default, this package also adds the git tag to the +pdf document's metadata under the subject field. To disable this behaviour, pass +the option |nopdfinfo|. % subsection metadata (end) +\section{History} + +\begin{itemize} + \item v1.0 - First release + \item v1.1 - Remove extra space from output +\end{itemize} + \end{document} diff --git a/Master/texmf-dist/tex/latex/gitver/gitver.sty b/Master/texmf-dist/tex/latex/gitver/gitver.sty index 38165fe8098..d5a6963d0e6 100644 --- a/Master/texmf-dist/tex/latex/gitver/gitver.sty +++ b/Master/texmf-dist/tex/latex/gitver/gitver.sty @@ -19,7 +19,7 @@ \NeedsTeXFormat{LaTeX2e} \def\@gitVerPkgName{gitver} \ProvidesPackage{\@gitVerPkgName} - [2019/02/06 v1.0 Access current git version and optionally add it to document headers] + [2020/04/30 v1.1 Access current git version and optionally add it to document headers] \RequirePackage{hyperref} \RequirePackage{catchfile} @@ -73,10 +73,10 @@ \@gitver@successfalse \IfFileExists{\jobname_desc.aux}{ % Read the file into \gitVer - \CatchFileDef{\gitVer}{\jobname_desc.aux}{} + \CatchFileDef{\gitVer}{\jobname_desc.aux}{\endlinechar=-1} - % Check if the macro \gitVer is "\par ": this is its definition if the file had no contents - \def\@gitver@emptyfile{\par } + % Check if the macro \gitVer is empty: this is its definition if the file had no contents + \def\@gitver@emptyfile{} \ifx\gitVer\@gitver@emptyfile% \PackageError{\@gitVerPkgName}{Git output is empty: is this folder a git repo?}{Make sure that this directory has had "git init" called in it, and has at least one commit.} -- cgit v1.2.3