12

This question is related to Compiling documents online.

I store my LaTeX documents in a git repository on GitHub. Is there a web service which offers a post-commit hook for GitHub which automatically fetches my document and compiles it?

For example, ReadTheDocs provides compilation for documentation of Python projects stored in GitHub repositories; the documentation is fetched and compiled after each commit to the repository.

5 Answers5

6

http://latex.aslushnikov.com/

Is what you are searching for. Example of compile git repo from some master LaTeX file:

PDF

restrepo
  • 169
  • This is almost what I'm looking for, but there are some issues. 1) It's missing a GitHub post-commit hook for automatic compilation and publishing of compiled documents. 2) (A related issue) The /compile URL seems to respond to GET requests instead of POST requests. 3) There is no way of specifying external LaTeX packages to be automatically downloaded from CTAN. (Necessary because it is bad style to store a copy of all necessary LaTeX packages in my Git repository.) – argentpepper Jul 24 '14 at 17:59
  • Also, if this is a service that you created yourself, you should really disclose this fact: http://meta.stackexchange.com/q/15787 – argentpepper Jul 24 '14 at 18:00
  • 1
    I'm the author of the service. Please, feel free to submit any issues here: https://github.com/aslushnikov/latex-online/issues – Andrey Lushnikov May 12 '15 at 09:46
2

The ShareLaTeX Cloud Compiler was shut down on the 21st of July 2018. So this answer is not valid any more.

You can use ShareLaTeX on public repos, but the problem is that you can compile only one file in a repo.

Or you can use a payed version and sync your ShareLaTeX account with GitHub too.

Kpym
  • 23,002
  • The ShareLaTeX GitHub LaTeX continuous integration service seems to be basically what I was looking for. I knew someone would build this service eventually, it just took way longer than I was expecting. – argentpepper Jun 16 '16 at 14:55
2

With GitHub Actions you can accomplish this. There are a few LaTeX actions, the one I found to work most easily is https://github.com/dante-ev/latex-action

You can store the compiled artifact, as I do in my LaTeX git template https://github.com/evanberkowitz/latex-base, so that after every push a new artifact is available for download and after every pull request a PDF with the diffs highlighted is available.

Unfortunately, the latest compiled artifacts' URLs are not stable---there has been an open issue for a bit over a year (as of this writing).

evanb
  • 259
2

Not exactly the answer you want, I guess (and to finish this question):

Have a closer look to ScribTeX. On the website you can read: "Access to your project's git repository" as mentioned in your cited question compiling documents online (see answer of Sharpie).

I do not know other web services offering what you are searching for.

Mensch
  • 65,388
1

https://github.com/dbrgn/github-latex-builder

You'd need to self-host it (note security warnings).

anps
  • 115