Strauman / travis-latexbuild

Building LaTeX packages using Travis-CI
12 stars 4 forks source link

gitinfo2 compatibility #27

Closed shabbychef closed 4 years ago

shabbychef commented 4 years ago

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 commented 4 years ago

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

Few questions:

PS Is your username a reference to Chebyshev? :)

shabbychef commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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