Questions tagged [gitinfo]

This tag is for questions about using the gitinfo and gitinfo2 packages, which allow for the inclusion of metadata from a git repository in your LaTeX document.

9
votes
2answers
1k views

How to include the current Git commit ID and branch in my document?

I use Git to track changes on my TEX files. When producing a PDF, it would be nice to include the current branch and commit ID somewhere in the document (e.g. on the title page or in a footer). I ...
1
vote
1answer
78 views

How to print the gitinfo2 watermark vertically on the margin?

I know that I can insert a watermark containing information about the git revision into my document using the gitinfo2 package like this: \documentclass{article} \usepackage{lipsum} \usepackage[mark]...
1
vote
1answer
77 views

Use output of gitinfo2 package with datetime2 commands

The gitinfo2 package provides the command \gitAuthorDate which returns the date of the current commit in ISO format, e.g., 2018-02-22. I would like to use this date with a different format within in ...
1
vote
1answer
65 views

ifthen condition fails for gitinfo2 metadata

I am using the gitinfo2 package (2.0.7) together with the ifthen package (v1.1c), both from TeXLive 2017, in order to include Git metadata in my document: \documentclass{article} \usepackage[local]{...
1
vote
2answers
312 views

LyX math. git and maths mode

It's probably a pretty trivial question but where do I find or download git for LyX? Where can I find details on LyX math? I presume it's distinct from maths mode, i.e. ctrl m, where the math's box ...
2
votes
1answer
138 views

gitinfo2 Only display branch when not on master

I am currently using the gitinfo2 package in my document to display the current git revision, branch, and date. However, I would only like to display the branch if I am not on the master branch. This ...
9
votes
2answers
646 views

How can a Git tag be aligned with the formatted PDF using gitinfo2?

I think I do not understand the workflow of the gitinfo2 package correctly. The documentation says (shortend): Edit and format abc.tex until ready for release Commit the release version of abc.tex ...
0
votes
1answer
158 views

get git metadata (using gitinfo2) of input file directory rather than current directory

I have one git repository that I'm calling my book directory. Within that I have a tex file that calls a bunch of chapters or sections that are in their own git directories. My goal is to the get ...
1
vote
0answers
236 views

gitinfo/gitinfo2: how to work around errors with underscores in git tags/branches? [closed]

Using the gitinfo2 package, I've run into errors which appear to originate from git tags or branch names that contain underscores. These would need to be escaped for LaTeX, gitinfo2 commands such as \...
6
votes
1answer
212 views

LaTeX3's \GetIdInfo: how is its argument automatically populated?

The l3bootstrap's documentation says \GetIdInfo extracts all information from a SVN field. But I have no idea where this field comes from. So I'd like to know how \GetIdInfo does work and if it is ...
1
vote
1answer
276 views

gitinfo (xstring): tag info does not work because of “tag:” before version number

I'm making the switch from subversion to git, and I'm quite happy with the gitinfo package. The only thing I cannot get to work is to show a version number from the tag. I have identified the ...
1
vote
0answers
458 views

Where to put GitInfo hooks on Mac

Where and how does one put the post-checkout and post-commit hooks for using the gitinfo package with latex on a Mac? Example working directory:/Volumes/Boxcryptor Classic/Git/randomproject On ...
3
votes
1answer
288 views

Can gitHeadInfo.gin be safely added to .gitignore (without interfering with gitinfo's proper functioning)?

Can gitHeadInfo.gin be safely added to .gitignore without interfering with gitinfo's proper functioning ? I'm asking this, cuz currently (using gitinfo) git's working directory is never clean: # ...