The GPL is viral. How does this apply to the LaTeX eco system if one uses a package licensed under the GPL2++?

  1. If I use it in a document, must the document also be licensed under the GPL?
  2. If I use it in a package, must that package also be licensed under the GPL?
  3. If I use it in a document class, must the document class also be licensed under the GPL?
  4. If I create a program that creates LaTeX code which uses 1, 2 or 3 - must that program also be licensed under the GPL?
  • 3
    @Martin I assume that the background to the question here is that TeX code is used 'raw' by TeX (ultimately \input), with no compilation. There's a contrast to a compiled GPL program, where I can use it's 'defined interfaces' without accessing the code and without needing to license under the GPL. My worry from the POV of TeX-sx is that this is a legal question, which is not the area of expertise of the majority of us (and indeed the network as a whole avoids legal questions for I think obvious reasons).
    – Joseph Wright
    Aug 27, 2012 at 13:48
  • 1
    @canaaerus: Think of the LaTeX package as a library and all the uses cases are c programs (or libraries) calling that library. Then everything must be licensed as GPL. This is why the LGPL exists... Aug 27, 2012 at 13:49
  • 4
    @MartinSchröder The document you produce is not a program, but data. You aren't required to release under the GPL images produced with "The Gimp".
    – egreg
    Aug 27, 2012 at 15:27
  • 2
    @AndrewStacey: Then it should have been closed as OT, not as NARQ. And I'm not sarcastic. :-) Aug 28, 2012 at 18:53
  • 2

1 Answer 1


My current understanding of this is: All cases must be licensed under the GPL, as they are all modified versions, not aggregates. Or the LaTeX package is a library.

Which is why the GPL is IMHO the wrong FSF license for LaTeX packages; the LGPL would be much better.

  • 3
    Many people who make a contribution want to make it Free. GPL is what they know, what they have heard of, what they admire. I suspect that you are after an education issue (whether I agree with you or not :-) ). Aug 27, 2012 at 23:33

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