Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitinfo2 compatibility #27

Closed
shabbychef opened this issue Nov 17, 2019 · 4 comments
Closed

gitinfo2 compatibility #27

shabbychef opened this issue Nov 17, 2019 · 4 comments

Comments

@shabbychef
Copy link
Contributor

Thanks for documenting travis-latexbuild. I usually use the gitinfo2 package in LaTeX to put the git info into the doc (either watermark, or a footnote). I hacked the .travis/travis-texbuild.sh script to create the file that gitinfo2 expects, seen here.

I'm not sure you want to prescribe this for all users, and probably want to avoid creeping featurism, but maybe make a note in your instructions how this can be done.

Thanks again for your work here, I have found it very useful.

@PHPirates
Copy link
Collaborator

PHPirates commented Nov 17, 2019

Nice, I like the footnote. I think it would be nice indeed to put it in a readme somewhere.

Few questions:

  • You have Hugh's tinytex script also in your repo, but you don't use it right?
  • It looks like your part of the script is not tied to this Docker build method, because you just generate this gitHeadInfo.gin file, is this right? Because then it can be used for any build method, and it would perhaps make more sense to add it here: https://github.com/PHPirates/travis-ci-latex-pdf

PS Is your username a reference to Chebyshev? :)

@shabbychef
Copy link
Contributor Author

Yes, I tried the tinytex approach first, but had some mysterious travis fails. Since I do a lot of work in R, it seemed like the natural route. On the downside, the simulations required to turn my Rnw files to tex files would take too long for travis.

Yes, the generation of gitHeadInfo.gin seems orthogonal to the Docker script and could be used elsewhere.

And, yes, it is. You are perhaps the first person to get the reference. Everyone else asks if I am a chef...

@PHPirates
Copy link
Collaborator

PHPirates commented Nov 18, 2019

Me too, I actually disabled the tinytex approach in my mentioned repo because it failed, and I thought that since nobody used it anyway I didn't bother to fix it.
It was very slow anyway if I recall correctly (and that's even without Knitr), so even if you are an R fan it's probably more convenient to choose an other build method (like this one). It's good practice to commit Knitr generated files to git anyway I think.

I just tried to use gitinfo2 but it doesn't recognise the \gitHash command, any idea why? (I used the git hook script http://ftp.snt.utwente.nl/pub/software/tex/macros/latex/contrib/gitinfo2/post-xxx-sample.txt that you used as well)
[Edit] Nevermind, works now. Will try it on Travis as well.

@PHPirates
Copy link
Collaborator

I put it here: https://github.com/PHPirates/travis-ci-latex-pdf#tips
Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants