Part of the discussion about packaging some of the TikZ answers into a LaTeX package has centred on the issue of licensing the code. Contributions here are licensed under a CC license (see links at the bottom of the page) which isn't the best for software: even the people behind the CC licenses do not recommend its use for software. LaTeX packages are usually licensed under the LPPL (see http://www.latex-project.org/lppl/), but other free licenses such as GNU GPL (see http://www.gnu.org/licenses/gpl.html) are sometimes used. Exactly how the various licenses interact is ... complicated. As the goons memorably quipped,

It's all rather confusing, really.

However, the people who answer questions retain copyright on their material and are therefore free to relicense it as they wish.

In the ensuing discussions, some have felt that the simplest thing to do is to issue a blanket declaration saying that repackaging and relicensing of their code written on this site is allowed. The purpose of this question is to allow people to publicly state what terms their code is released under. Note that this is in addition to the standard SE license terms and is designed to make it easier for people to repackage answers as desired.

There are many open source licenses out there. Some useful links are:

  • The list at gnu, including the FSF's beliefs on which are compatible with GPL.
  • The list at CTAN, including CTAN's beliefs on which are free.

Here are some comments to bear in mind when choosing how to relicense your code:

  1. The purpose of this is to make it easier for others to build on your work.
  2. GPL is probably the most popular for software in general, and LPPL for TeX packages specifically.
  3. The LPPL and GPL are incompatible.
  4. It is possible to license code under several licenses, with the choice of license being for the user to decide. Indeed, any declaration here is in addition to the CC-BY-SA license that the site automatically applies.
  5. If the issue is too confusing, there's always the option of placing the work in to the public domain

Some notes on the licenses:

  • An article on why everything should be GPL-compatible: http://www.dwheeler.com/essays/gpl-compatible.html
  • There is a separate issue of attribution. Many licenses require that the code be properly (and appropriately) attributed. It is for the user (or repackager) to ensure that their reuse of code is properly compliant with the license in this, and other, ways.

When answering this question, please state the terms under which you agree to your code being reused. Sample statements follow, though you are free to adapt them as required.

Dual GPL/LPPL:

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby relicense under the [GPL](http://www.gnu.org/licenses/gpl.html) (version 3 or later) and under the [LPPL](http://www.latex-project.org/lppl/).

Permission to relicense:

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby give permission for it to be used and released under either the [GPL](http://www.gnu.org/licenses/gpl.html) (version 3 or later) or under the [LPPL](http://www.latex-project.org/lppl/).

Public Domain:

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the [CC0](http://wiki.creativecommons.org/CC0).

share
1  
The point about attribution is that, as I understand it, the LPPL demands an explicit attribution. GPL is used for the Context source code, and I have the impression that it is the license of choice for Context modules &c. –  Charles Stewart Apr 9 '11 at 19:07
    
@Charles: That's my reading of the LPPL as well. I figure that the issue of attribution is slightly orthogonal to this discussion. Even if it's not required by a license, it's only polite to include it. –  Loop Space Apr 9 '11 at 19:10
3  
GPL is generally a bad idea for software in general, but that's a discussion for another place. It's bad for TeX code because it allows someone to incompatibly modify the code and release it under the same name. As came up elsewhere, I think the ConTeXt folks were really short sighted by refusing to consider the LPPL (or a similar idea just without the L) due to its name alone. –  TH. Apr 11 '11 at 17:33
3  
@TH. If you look at the discussion on 'From Answers to Packages' then Charles' version doesn't have the explicit relicensing as GPL but merely permission to relicense as GPL. –  Loop Space Apr 11 '11 at 18:02
    
Public domain clause: Now that is crystal clear, nice that something is. –  Charles Stewart Apr 12 '11 at 13:26
    
@Charles: I was going to suggest PD/CC0, by Andrew was faster. I think most code here could be reused under fair use anyway (or is to short to be protected by copyright). –  Caramdir Apr 12 '11 at 16:57
4  
The statement 'the LPPL and GPL are incompatible' is based on LPPL 1.2. There were a lot of e-mails exchanged between Frank Mittelbach and Debian legal (~1600) to sort things out for LPPL 1.3. Now whether LPPL 1.3 is compatible with the GPL, I have no idea :-) –  Joseph Wright Apr 13 '11 at 15:24
2  
I've said before that I'm actually surprised that the site does not make a statement that all code posted here is Public Domain. That's always been the assumption on, for example, c.t.t. (if you post it to a public forum ...). –  Joseph Wright Apr 13 '11 at 15:26
1  
@Joseph: (Re LPPL and GPL) My only source is the page on gnu.org where it says that 1.3 has resolved several issue, but it doesn't come to any conclusion. –  Loop Space Apr 13 '11 at 17:30
1  
+1 for the goons reference –  Seamus May 8 '11 at 22:55
4  
@Joseph and @Andrew -- re the lppl and gpl in particular, there is an article by frank mittelbach in the issue of tugboat now at the printer (32:1, pp.83-94) that covers this ground. from the abstract: "This article reflects on the history of the license, the way it came about, and the reasons for its development and content. It explains why it was chosen even though alternative free licenses have been available at least from 1990 onwards." –  barbara beeton May 13 '11 at 16:15
2  
@barbara: Thanks. Almost worth registering with TUG to read it before it goes online next year. –  Loop Space May 13 '11 at 17:59
    
@JosephWright: Public Domain is a concept you should not use - ask any copyright expert: it's very unclear. BSD is much better. And code on c.t.t. or anywhere else is copyrighted by the author and you should not use it in commercial projects unless you have a clear license from the author. –  Martin Schröder Oct 29 '11 at 14:47
    
@MartinSchröder: I've asked people on c.t.t before about licenses, and got pretty short shrift. There is a strong assumption that anything posted there is 'free' in the broadest sense. –  Joseph Wright Oct 29 '11 at 14:52
    
Also, at least in here in the UK 'public domain' is clear. It means you give up your copyright, in the same way as happens when copyright expires (after a delay) after you die. –  Joseph Wright Oct 29 '11 at 14:53

23 Answers 23

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby relicense under the terms of the WTFPL.

share
1  
Please use a once-clause BSD license and not something that will confuse lawyers. –  Martin Schröder Oct 29 '11 at 14:49
8  
For material contributed to a Q&A site, I am more concerned with the confusion of non-lawyers and so I chose something that explicitly states the "terms and conditions" in one short sentence. The license I chose grants the freedom to re-license my work if someone finds the original license unacceptable. –  Sharpie Oct 30 '11 at 19:41
    
This may sound good to people who have not tried to pick up the pieces but the mess which is created by people not using legally clear licences is not fun to clear up. Packages have been removed from TeX Live due to concerns over licensing. They are removed from Debian (and Fedora and...) for just the same reasons. It doesn't matter how good your intentions. People distributing this stuff have to think about what a court would say if... and a chunk of your code in a derived package could cause that package's removal, whether you want it to or not. Please use something the distros can count on. –  cfr Jul 20 at 1:56

Any LaTeX/TeX code of mine that I publish on http://tex.stackexchange.com/ or http://meta.tex.stackexchange.com/ I hereby relicense under the LPPL (version 1.3c or later).

Any Perl, Bash or other software programming language code of mine (with the explicit exception of LaTeX/TeX code) that I publish on http://tex.stackexchange.com/ or http://meta.tex.stackexchange.com/ I hereby relicense under the GPL (version 3 or later).

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby relicense under the LPPL.

Enrico Gregorio

share

Any TeX code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

Note Regarding Attribution

Code that is placed in the public domain does not require attribution. However, if you have found this site useful, the best way to say "Thank you" is to point others to it. So if you wish to acknowledge the source of the code, I recommend a link or bare URL text pointing to somewhere appropriate on this site: if the code came from a single answer, I would link to that answer, but if it is spread over several then a generic link to the site would suffice.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law, except when stated otherwise in the corresponding answer. Explicitly, I place such code under the CC0.

Note

It is churlish not to attribute public domain code you reuse, but quite legal.

share

Any code of mine that I publish or have published previously on the TeX.SE main site I hereby relicense under the WTFPL.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any TeX code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law, except when stated otherwise in the corresponding answer. Explicitly, I place it under the CC0.    —Clemens Koppensteiner

For the avoidance of doubt, this only applies to TeX source code. Any other text is not included. Also, while you are not required to do so, you are encouraged to add attribution to any code you use.

share
1  
Perhaps a better idea would be to include this in your profile description for maximum visibility. –  Martin Tapankov Apr 12 '11 at 6:36
3  
@Martin: It isn't important for many people, only package creators. For them, the fact that users can't make texts here just vanish (they will be visible to 10k+ users even if deleted) is more important. –  Charles Stewart Apr 12 '11 at 15:00

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

Attribution via a link to the relevant answer is appreciated.

share

Any code of mine that I publish or have published previously on http://tex.stackexchange.com/ I hereby relicense under the LPPL.

share

Any code of mine (TeX, LaTeX, bash, ImageMagick or any other) that I publish on http://tex.stackexchange.com/ or http://meta.tex.stackexchange.com/ or in chat rooms associated with the site I hereby give permission for it to be used and released under either LPPL license in version 1.3 or higher. The works itself, if applicable, fall into the category "author-maintained". This statement applies for any code published before as well.

This statement does not apply to code I provide to users on this site in a private communication like e-mail, instant messanging (other than the site chat), etc. Such code is only for personal use of the user. The user may ask me to re-license it.

Tomáš Hejda

share
    
Could you clarify what steps would be necessary to declare your code unmaintained in the case of non-TeX code (bash, ImageMagick etc.)? Do you intend the same methods of attempted content (which focus on TeX-related communication channels if I remember correctly) to apply to all code, regardless of its TeX-specificity? –  cfr Jul 20 at 2:00
    
@cfr The author-maintained declaration applies basically only to complete files (such as new .sty files that I published here) since the biggest difference between author-maintained and unmaintained is that in the former case you ought to fork the project if you want to modify it. Is it understandable? –  tohecz Jul 20 at 5:32
    
Yes but the real question is what happens if you disappear. Not that I wish you to but the question is what would be necessary to declare code unmaintained in that case. Maybe it is a non-issue and the right thing to say is that for code posted on this site, forking would always be recommended since the disadvantages of forking don't really apply until code is in more general use. (And if you publish a file on ctan or whatever, the usual procedures would be applicable.) –  cfr Jul 20 at 20:14
    
@cfr Don't you face the very same problem with over 3000 LaTeX packages? Hasn't big packages been forked for the very same reason before? IMHO it is a problem of bigger scale than couple hundred code snippets of mine on this site. –  tohecz Jul 20 at 20:22
    
Well for packages on ctan, there is an established method of determining that the package is 'unmaintained'. Then it can get a new maintainer rather than being forked. I guess I'm just curious as to why LPPL when this doesn't appear to be a particular issue with code here. (That it isn't is kind of my point. Why use a licence which makes a big deal of this when it doesn't really seem relevant?) –  cfr Jul 21 at 0:39

My code is highly unlikely to be all that useful, but anyway...

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any LaTeX/TeX code of mine that I publish on http://tex.stackexchange.com/ or http://meta.tex.stackexchange.com/ I hereby relicense under the LPPL (version 1.3c or later).

Any Perl, Bash or other software programming language code of mine (with the explicit exception of LaTeX/TeX code) that I publish on http://tex.stackexchange.com/ or http://meta.tex.stackexchange.com/ I hereby relicense under the GPL (version 3 or later).

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby relicense under the LPPL.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place under the LPPL, version 1.3 or later.

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

share

Any TeX code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

Note Regarding Attribution

Code that is placed in the public domain does not require attribution. However, if you have found this site useful, the best way to say "Thank you" is to point others to it. So if you wish to acknowledge the source of the code, I recommend a link or bare URL text pointing to somewhere appropriate on this site: if the code came from a single answer, I would link to that answer, but if it is spread over several then a generic link to the site would suffice.

Note: Thank you, Andrew Stacey, for writing what I wanted to write :-)

share

Any code (or any stuff for more general) of mine that I publish or have published previously on http://tex.stackexchange.com/ is free as in "free of charge" and "freedom". You can claim it as yours. No attribution or permission is needed.

share

Any code of mine that I publish on TeX.SX I hereby relicense under the LPPL.

Claudio

share

Any code of mine that I publish on http://tex.stackexchange.com/ I hereby relicense under the WTFPL.

share

You must log in to answer this question.

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