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.

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

• 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 https://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/).

Any code of mine that I publish on https://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 https://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).

• 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
• 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
• @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
• 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
• 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
• @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 for the goons reference – Seamus May 8 '11 at 22:55
• @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
• @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

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

• Please use a once-clause BSD license and not something that will confuse lawyers. – Martin Schröder Oct 29 '11 at 14:49
• 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 '14 at 1:56
• @cfr This is as tested as other licenses. Plus Free Software Foundation recognizes it. Court compatible doesn't mean bloated text. Those licences are also questionable. – percusse Sep 4 '14 at 23:38
• @percusse I was responding to the comment rather than the licence. I know nothing about the legal-acceptability of the licence. My point was that choosing a licence which will satisfy lawyers is important for the interests of non-lawyers, too. Will-keep-lawyers-happy does not need to mean will-confuse-the-rest-of-us. Whether this particular licence fulfils the criteria or not is another question. – cfr Sep 5 '14 at 0:14
• @percusse Also, the FSF lists it but recommends not using it regardless of intentions, although I can't find an explanation of why. Do you know where they explain this? – cfr Mar 19 '18 at 23:46
• @cfr It's based on a hypothetical courtcase interpretation. There is nothing blocking it and it is not court tested so that's just rumor and scaremongering. en.wikipedia.org/wiki/WTFPL#Reception – percusse Mar 20 '18 at 9:36
• @percusse Thanks. You don't know anywhere where FSF give their reasoning, do you? The OSI reasoning seems confused to me, though I may have misunderstood something. (As I understand it, their reasoning is: This licence is no different from public domain. So, better to use public domain instead. Therefore, reject this licence. But public domain does not exist in Europe. Therefore, reject this licence anyway. But why isn't the Europe point a reason not to reject it? I don't see the logic here at all.) – cfr Mar 20 '18 at 12:59
• @cfr First rule of law is that there is no logic to it. By the way, it is only OSI's opinion not a general consensus. If more people adopt it it becomes the norm. Most of these institutions possess self proclaimed validity anyway. I don't know any courtcase regarding these in Europe (not that I thoroughly researched). – percusse Mar 20 '18 at 13:28
• @percusse I think there is logic in most legal systems, albeit a rather twisted and peculiar one at times. But, really, I was just curious about FSF's reasoning is all. I'm not sure OSI's reasoning is supposed to be legal, but, if it is, that might explain why it seems illogical. (I think there's logic in most legal systems, but not of the logician's kind.) – cfr Mar 20 '18 at 14:06

Any LaTeX/TeX code of mine that I publish on https://tex.stackexchange.com/ or https://tex.meta.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 https://tex.stackexchange.com/ or https://tex.meta.stackexchange.com/ I hereby relicense under the GPL (version 3 or later).

Any code of mine that I publish on https://tex.stackexchange.com/ I hereby relicense under the LPPL, version 1.3 or later (not author maintained).

Enrico Gregorio

• Would you be so kind to add precisions regarding under which particular version(s) of the LPPL your code is released? My answer here contains a .sty file that uses code of yours, but it's impossible for me to write a proper license statement in this .sty file without knowing this information. Maybe some statement like mine? Thanks. – frougon Apr 18 at 9:48
• @frougon I don't really care, any version of LPPL is good, but just for precision, I added a number. – egreg Apr 18 at 10:31

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

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.

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

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

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

Any TeX code of mine that I publish on https://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.

• Perhaps a better idea would be to include this in your profile description for maximum visibility. – Martin Tapankov Apr 12 '11 at 6:36
• @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 https://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

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

Any code of mine that I publish on https://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.

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

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

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

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

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

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

Any LaTeX/TeX code of mine that I publish on https://tex.stackexchange.com/ or https://tex.meta.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 https://tex.stackexchange.com/ or https://tex.meta.stackexchange.com/ I hereby relicense under the GPL (version 3 or later).

Any code of mine (TeX, LaTeX, bash, ImageMagick or any other) that I publish on https://tex.stackexchange.com/ or https://tex.meta.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

• 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 '14 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? – yo' Jul 20 '14 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 '14 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. – yo' Jul 20 '14 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 '14 at 0:39

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

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

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

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 :-)

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

Claudio

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

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

Mikko Korpela

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

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

JB

Any TeX code of mine I publish and published on https://tex.stackexchange.com/ I hereby license as Beer-Ware. If you reuse it it should contain the following comment:

% ----------------------------------------------------------------------------
% "THE BEER-WARE LICENSE" (Revision 42):
% Jonathan P. Spratte  wrote this code.  As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a beer in return. Jonathan P. Spratte
% ----------------------------------------------------------------------------


Any non-TeX code I publish and published on https://tex.stackexchange.com/ I hereby license under the terms and conditions of the GPL, version 3 of that license or later.

Any code of mine that is published on https://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.

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

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

May the source be with you.

RGS

• You are very generous, but why should I claim that your software is mine when it is not? (+1 for "may the source be with you"). – CarLaTeX Aug 25 '18 at 5:46
• @CarLaTeX here I come for fun and learn. Unfortunately, we don't even have the power to hold the higher powers from changing the layout of this site. Hence, I just let it go :P (In a serious note, sometime people do claim that. So, instead of having bad feelings at the end, it's better to relinquish things now). – Raaja Aug 25 '18 at 5:48
• Of course, all we are! But if I'm answering a question using some of your code, I think it is correct to say you wrote it. Or, at least, don't say I wrote it. – CarLaTeX Aug 25 '18 at 5:53
• @CarLaTeX I agree with you. For instance, initially I was not doing that myself until one day marmot / TeXnician / someone else pointed me out on "how to nice behaviour". So, now sticking with it. – Raaja Aug 25 '18 at 5:55
• Very good, and continue to help us! :) – CarLaTeX Aug 25 '18 at 6:09
• @CarLaTeX Sure! – Raaja Aug 25 '18 at 6:20