TL;DR: GPL is viral. Any derived work has to be licensed as GPL. GPL forces to make the source available. Thus, the tex source of the generated PDFs have to be made available, too.
This following argumentation is based on the circumstance, that classicthesis.sty
is offered and included via \usepackage[nochapters]{../classicthesis}
. If it is distributed as .tex file only, the discussion is similar. See "What if the template is distributed as tex file?" below.
Let's go step by step.
Is pdflatex
a compiler?
Yes. "A compiler is a computer program that translates computer code in one programming language (the source language) into another language (the target language)." (copied from Wikipedia). The source language is "LaTeX". The target language is "PDF".
Overleaf also talkes about "Compiler".
The other possible compiler settings are pdfLaTeX (the default), XeLaTeX and LuaLaTeX. You can usually go with pdfLaTeX, but choosing a compiler depends on each project's needs.
Is classicthesis.sty a library?
The classicthesis.sty
can be considered as library: It is used in the tex
file and cannot be easily replaced by something else. Thus, we do not have the loose coupling as in the case with binary drives and the Linux kernel. See for instance https://en.wikipedia.org/wiki/Binary_blob for a discussion on that.
Does that mean, the whole tex source where classicthesis.sty is used is covered by the GPL?
Then let's look at the FAQ of the GPL. If a library is released under the GPL (not the LGPL), does that mean that any software which uses it has to be under the GPL or a GPL-compatible license?. The answer clearly states that if the library is in GPL, the whole source (including the text written by the author) is GPL.
Thus, the whole tex source is also covered by the GPL.
Do I need to ship the tex source with my PDF?
Now, let's look at the compiled pdf. The compiled pdf
is the result of the compilation of the tex
. Thus, it is comparable to the binary resulting from a compilation using a "typical" C compiler. The FAQ is Can I release a modified version of a GPL-covered program in binary form only?. The answer states that the source code the PDF is resulting from also has to be made available.
Thus, if you provide anybody the PDF, you also have to provide the tex source.
On the one hand, this might be a good thing to achieve open access to the edge: All publicly available PDFs are also having their tex source attached. This means that everyone can learn about tex practices etc. On the other hand, if, for instance, one wants to publish a book, one also has to provide the tex source of the book.
Is the PDF really a product of the tex source?
It is questioned whether the PDF is a compiled output or not. I assume that the tool pdflatex
gets tex
and sty
files as input and produces pdf
as output. This is backed by the LaTeX compilation section at wikibooks. In general, a compiler transforms something from a source to another language. That language is often a binary, but it doesn't need to be. Consider XSLT, which may transform to XML and other documents.
Note that pdflatex
is not an interpreter, because pdflatex does not run during viewing the PDF.
GPLv2 states: The source code for a work means the preferred form of the work for making modifications to it.. Thus, even if one regards the PDF as some sort of view, it is NOT the preferred form for modifying it. As a consequence, the tex
source has to be distributed.
Who can enforce this?
In practice, only the authors of classicthesis can enforce this. Thus, if one author contributed to the classic thesis style demands the source for your thesis PDF, you have to provide him the source. IMHO, no one will do that, but if, one has to be prepared for such a case. - This also means that not a third party can say: Hey, person X has licensed his work under GPL and you violate it. Correct it! This can only be done by X. - For a long discussion on this, I would recommend the German book "Open Source Software Rechtliche Rahmenbedingungen der Freien Software" http://www.beck-shop.de/Jaeger-Metzger-Open-Source-Software/productview.aspx?product=14503508
Does it help to have example/demo files published using another license?
Note that it does not help to license the example/demo files under a different license. The GPL "infects" these files too and thus the GPL is additionally in place - with all consequences.
Really? Even if the GPL applies to one file used and not to the main file?
Yes. Even if the sty
file is not the tex
file you are compiling. As tried to express above: GPL is viral. Thus, the license of the sty
file also applies to the tex
file even if you did not explicitly declare the tex
file as GPL. You gave the agreement to the (additional) GPL license when you are using the sty
file. Otherwise, you would not be allowed to use the sty
file at all. By using the file, you agree to GPL and all consequences (see also the open source software book).
Really? GPL really applies to all derived works?
Yes, even if the above cited FAQ doesn't convince you, read on about strong copyleft and the difference to weak copyleft.
GPL is really viral.
What if the template is distributed as tex file?
In case the template consists for one or more tex
files, the GPL applies to each tex
file. If one modifies the tex
file, the modification is also GPL licensed. If one adds an additional document.tex
file, which references the template, that tex
is also subject of GPL. Reason: document.tex
is a derived work and cannot stand without the original template.
Really? Does that apply to any template?
Depends on the license of the template. If there is NO license given, NO modifications may be made! See http://choosealicense.com/no-license/.
But, if there is a license, you have to follow it. For instance, if the template is licensed under LPPL, only the changes to the template itself have to be published. The LPPL is not a viral license.
It also depends on the interpretation of the term "derived work". I assume that any creator of a template assumes a document based on the template not being a derived work. However, another template based on the original template is really a derived work. With a strict interpretation, however, any change of the template is a derived work. Even when adding content only. For instance, this is the implication of the viral property of the GPL. All derived works have to be licensed under GPL.
Further thoughts
May tex code be licensed under GPL after all?
Yes. See FAQ Can I use the GPL for something other than software?. tex
can be interpreted as source code and PDF as the resulting object code. "Object code" is defined as any non-source form of a work.
What does the Free Software Foundation say?
"We recommend that you license your templates under simple permissive terms.".
Are there similar issues with fonts?
Yes. It is considered as complex issue. See https://www.gnu.org/licenses/gpl-faq.html#FontException for more information.
Quick overview on the GPL
For a quick illustration of the GPL see https://tldrlegal.com/license/gnu-general-public-license-v2
Other license options
So, I agree with others that say that the LPPL is more suitable for style files. See also https://tex.stackexchange.com/a/82719/9075.