Question: where can I find (legal/pragmatic) information about having latex source files for scientific articles publicly available on github? Or, how would you deal with it?

Problem description:

I like using git for collaborative tex'ing. So why not use it for scientific articles as well? Put up a github repo, collaborate, submit to arxiv while tagging the corresponding commit, incorporating reviewers suggestions, etc. Also, it comes at the additional benefit that not only a compiled preprint on arxiv is available but also your latex sourcefiles. This I think is desirable in terms of transparency and also others can easily reuse/extend complex latex bits you have in your articles.

Most publishers don't have a problem with arxiv preprints. But what about github repos? They don't contain the pdf, but in general, everyone would be able to compile the stuff from the source files on github. Would the source code on github then considered the same as the compiled preprint on arxiv?

I feel like the authors I know, that are using github, they might even just use github without thinking about the potential legal consequences (yes because it seems rather unlikely someone searches through the github repo). Also, if one knows upfront where the article might be submitted to, one can check the legal situation for that particular conference/journal. But sometimes one doesn't know beforehand, so one could end up having the latex source files publicly on the web, for a publication where this is not allowed?

I am looking for a pragmatic answer to this problem, as I think using github for scientific writing is just very efficient and good. Having the sourcefiles in addition to the compiled preprint available seems also desirable to me.

  • 1
    I cannot really understand your question. You can put your tex src files on git and it has advantages (lot of us do it already). But why must this repo be public? If you want to put tex src files publicly (which is not always optimal, since you may have commented out many text parts that may be used in future versions), why use the same template used by the journal? Also, arxiv allows to publicly share tex src files? Why use git for that?
    – Alexandros
    Jun 18, 2015 at 11:15
  • 2
    Consider using private repos, for example on bitbucket. Jun 18, 2015 at 11:16
  • Yes, a lot of people do it. If it is private there shouldn't be any problems. Some do it even public (perhaps unknowingly that so far only really arxiv has the special standing as tolerated preprint arxiv). But the intention would be to in addition to the compiled preprint make the source code for it publicly available -- why? It is more transparent, easier for others to reuse/extend -- e.g. if you have complex tikz plots, derivations or the like in there. Hence, a private repo is not really an option. The question is about the standing of public gitrepos compared to compiled files on arxiv.
    – FrankMert
    Jun 18, 2015 at 11:18
  • 10
    @FrankMert Yes, but arxiv allows to download the src files. What more you want?
    – Alexandros
    Jun 18, 2015 at 11:19
  • 2
    Are you sure you want your works-in-progress visible by all? Open science is good in principle, but sadly there is a good argument for keeping things you are currently working on somewhat private. Jun 18, 2015 at 12:29

3 Answers 3


It is a very common practice for authors to include the LaTeX source files within an arXiv submission. I don't understand why a publisher who is okay with a preprint being published would not be okay with the LaTeX source being published with the rest on arXiv.

Most information in a PDF file can be easily plagiarized (though things like extracting the actual data points in a plot may be tricky). Postscript files are even easier to plagiarize. The advantage of keeping the source code is that the document will remain editable and compilable forever. If a publisher places a blanket ban on publishing paper source code because of concerns such as plagiarism, well... they're doing it wrong.

  • Good to hear that this is common practice in some fields already! Ignoring whether it makes sense or not, do publishers in general have problems with arxiv preprints (pdf+source+graphics)? I think the main concern of authors is, that some might have a problem with it and others not and noone is going to check every potential publisher their work might be submitted to -- hence, the work ends up not being arxived. If this is not the case, this best practive should definitely be pushed in other fields to become best practice!
    – FrankMert
    Jun 18, 2015 at 11:40
  • @FrankMert This is entirely field-specific. For example, in computer science, there is generally no problem. In biology, however, there is usually a problem.
    – jakebeal
    Jun 18, 2015 at 11:51
  • 1
    I'm not aware of any publishers that actually make the distinction between the allowed file formats of a published preprint. In my experience it's very rare that a paper which is written in LaTeX is uploaded to the arXiv without the source code. Looking at the new submissions on all the arXiv subs, the very vast majority of submissions already include the source files (and most of the rest probably weren't written in LaTeX). It already is best practice.
    – Moriarty
    Jun 18, 2015 at 11:51
  • 1
    All in all, that means one cannot really post to arxiv (including source code) without risking the chance to publish with some publishers, while the source code itself seems to make no difference here. This is really bad. So you either arxiv and hope you won't find yourself in the position wanting to publish with this one particular publisher, or you don't arxiv which keeps you all the options open. Downside, you're not arxiving.
    – FrankMert
    Jun 18, 2015 at 12:03
  • 7
    If you use LaTeX source, arXiv will frequently detect that and refuse to allow you to upload just the PDF. So rather than it being "very common practice", the uploading of source files is almost required. Jun 18, 2015 at 12:40

If you upload your papers to arXiv, then your Latex source is already publicly available there (click "other formats" and then "download source"). So the only difference is that the source would also be available on Github.

There is no legal issue with this unless you sign an agreement that forbids it. In that case, the publisher could ask you to remove the manuscript from Github.

  • That would mean, it would need to be removed after signing this contract. Ok, that would be doable. My point is just that noone really can foresee and check any potential publisher and it's legal regulations. I think most publishers don't even mention source files or github, only explicitly only allow arxiv for preprints. Dumb question on the side, can arxiv preprints be removed in case a publisher forces one to do so? (Ignoring, that such publishers shoud -imho- be avoided anyway.)
    – FrankMert
    Jun 18, 2015 at 11:43
  • 1
    arxiv.org/help/withdraw Jun 18, 2015 at 11:44
  • Sorry, was just about to crawl through arxiv site as well. Yeah, so that basically means, it could happen, that a publishers asks you to remove a preprint from arxiv while you cannot really remove it anymore So it potentially could mean you canot publish with certain publishers once your preprint is out there. Well, better to choose another publisher then anyway :-)
    – FrankMert
    Jun 18, 2015 at 11:47

Let's separate out three distinct proposals that are somewhat blended together in your original question. Presented in order of increasing specificity, these are:

  1. Using git (or another similar source control system) for collaborative LaTeX paper-writing
  2. Hosting these on a pseudo-archival external repository host, such as Github
  3. Hosting them on Github in particular

For #1, I think that anybody doing collaborative work in LaTeX benefits greatly by adopting a good source control system, since LaTeX fits the model of source code so well. Depending on your preferences and the nature of your document, you might find SVN, Mercurial, Git, or even some other mechanism most effective.

For #2, it's important to ask what the goal is. Remember, repository services like Github and Bitbucket are NOT archival, despite their age in internet-years. We have no idea whether they will actually be able to survive for a couple more decades (let alone for multiple centuries, like some journals). So if you want long-term archival storage, arXiv is currently the way to go, not a repository service. An external repository, however, means a project is generally more reliable than one's own servers, and makes it easy to manage a project jointly. Some make it easy to host private repositories (Bitbucket, for example, lets you host an unlimited number for free if you are affiliated with a university), others make it harder (with Github, you have to pay a fee to have private repositories). Still, it's hard to see much down-side to using a private externally hosted repository instead of a locally hosted repository, as long as the information is merely confidential and not legally restricted (e.g., by IP or export control considerations).

For #3, then, if you want to use Github in particular, right now you've got to either pay money or be comfortable with a fully publicly observable project. Sometimes that's a good thing (I use it this way for standards development, where we want the whole history to be hanging out in public), and sometimes that's a bad thing (do you really want your LaTeX comments cursing Reviewer #3 to be recorded for all to see?).

In short: use source control for LaTeX, hosting externally can be great, but Github's sometimes a poor choice of external host service.

  • 1
    For the discussion about 2 and 3, this is an okay guide. There are plenty of non-GitHub hosting services that offers (even unlimited number of) private repos for free. And if you are affiliated with a university, check if they provide something similar. Both my current employer and my future employer offer institutional hosting of Git repos. So you don't even need to depend on a 3rd party private company. Jun 18, 2015 at 12:37
  • Do you know the archiving policies of arXiv? See this question of mine.
    – StrongBad
    Jun 18, 2015 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .