18

I'm currently writing my master thesis, and the classicthesis template we're supposed to use is licensed GPLv2+.

As I understand the GPL, this makes my written thesis a derivative work, and would imply that the thesis (both the LaTeX source and the resulting PDF) is also licensed GPLv2/3. As the finished thesis will probably be uploaded to some public repository, it will also be "distributed" in the sense of the GPL.

Am I understanding this specific case correctly, i.e. do I have to put a notice into my thesis that it is GPLv2/3-licensed and include the LaTeX sources in the distribution / make them available as per the GPL? Or does this not count as a derivative work (and why)?

5
  • 1
    Wouldn't it be more like your thesis being an application of the thesis-template. A derivative work, would be if you modified the thesis-template to match, say, the style guidelines of your university.
    – Dohn Joe
    Apr 10, 2016 at 20:00
  • @DohnJoe I'm not sure. I always thought taking some code, adding some more to it, and compiling it was a derivative work - is that incorrect?
    – malexmave
    Apr 11, 2016 at 6:43
  • Related: The GPL and LaTeX packages Apr 11, 2016 at 20:01
  • @MartinSchröder Thanks for the link. However, I don't think it applies directly here, since the template is not only a class file, but also a number of other .tex files which you fill up with your own content. (Although you could argue that if it applies to class files, it probably applies even more to my case)
    – malexmave
    Apr 12, 2016 at 7:20
  • 3
    I'd argue that yes, your sources for your thesis will clearly have to be GPL. The PDF can be though of to be the "object code" mentioned in section 3 of the GPL, so it will also be GPLed and you would have to distribute the source of your work alongside witn it. Apr 12, 2016 at 20:38

7 Answers 7

7

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.

23
  • 1
    @PhilipPirrip I updated my answer accordingly. With pointers to explanations of compilers and that GPL is really viral. Regarding your template question, the EULA answers the question. You may copy and use the media elements in projects and documents. You may not (i) sell, license or distribute copies of the media elements by themselves ... (ii) grant your customers rights to further license or distribute the media elements
    – koppor
    Jul 23, 2016 at 15:18
  • 1
    @PhilipPirrip Compilers just transform from language A to language B. B does not need to be an executable or a library. B may be an XML file, HTML files, a PDF, etc.
    – koppor
    Jul 23, 2016 at 15:20
  • 1
    TeX/LaTeX are interpreters. They produce nicely placed boxes. pdflatex fills them with contents. pdflatex might be considered a compiler (better: typesetter). PDF is not a compiled program, it does not replace the functionality of classicthesis.sty in any way. Jul 23, 2016 at 15:25
  • 2
    Further point: The template (tex-document) doesn't need classicthesis.sty. You can redistribute the work (tex( without including the package file (sty).
    – Johannes_B
    Jul 23, 2016 at 15:45
  • 2
    Object code is not intended to be reused somehow. This is similar to binaries compiled using gcc. The point is that the PDF is generated out of the tex files.
    – koppor
    Jul 23, 2016 at 18:06
9

A slightly peripheral addition: https://bitbucket.org/amiede/classicthesis/issues/123/gpl-suitable

The author's opinion is that if you use the LaTeX template to create another document (e.g. PDF) and aren't running the LaTeX code directly and make no modifications to the original code, then it's no longer covered by the GPL.

I suspect that in general terms that is a debatable point given the FSF's stance on the viral nature of the GPL, but in this case the author is clearly giving you the option to licence the final output of your thesis as you see fit.

2
  • Hey, good find! In the end it's up to the author how to license their work, so if he is clearly dual-licensing it then that would be great. It's not very clear to me though (partly because I don't understand enough German! and Google Translate is only so good), particularly because he doesn't say what license would now apply if the GPL doesn't.
    – Tim Malone
    May 6, 2016 at 10:24
  • You're even allowed to make modifications to the original code, but only for yourself. If you're further distributing the code, it has to be GPL'ed. See my answer below. (also note that it's not the author's opinion that's currently showing on bitbucket.org, the German post is someone else's quiry to the author) May 8, 2016 at 0:30
4

Reading http://www.gnu.org/licenses/gpl-faq.html I found all these apply to the case of classic thesis template:

Using the GNU GPL will require that all the released improved versions be free software. This means you can avoid the risk of having to compete with a proprietary modified version of your own work.

The GPL does not require you to release your modified version, or any part of it. You are free to make modifications and use them privately, without ever releasing them.

But if you release the modified version to the public in some way, the GPL requires you to make the modified source code available to the program's users, under the GPL.

Copyright law does not give you any say in the use of the output people make from their data using your program. If the user uses your program to enter or convert his own data, the copyright on the output belongs to him, not you. More generally, when a program translates its input into some other form, the copyright status of the output inherits that of the input it was generated from.

You could artificially make a program copy certain text into its output even if there is no technical reason to do so. But if that copied text serves no practical purpose, the user could simply delete that text from the output and use only the rest. Then he would not have to obey the conditions on redistribution of the copied text.

The output of a program is not, in general, covered by the copyright on the code of the program. So the license of the code of the program does not apply to the output, whether you pipe it into a file, make a screenshot, screencast, or video.

If a programming language interpreter is released under the GPL, does that mean programs written to be interpreted by it must be under GPL-compatible licenses? When the interpreter just interprets a language, the answer is no. The interpreted program, to the interpreter, is just data; a free software license like the GPL, based on copyright law, cannot limit what data you use the interpreter on. You can run it on any data (interpreted program), any way you like, and there are no requirements about licensing that data to anyone.

You can apply the GPL to any kind of work, as long as it is clear what constitutes the “source code” for the work. The GPL defines this as the preferred form of the work for making changes in it.

Thus, in short: if you modify and want to distribute a derivative of classicthesis.sty or the whole template, you're only allowed to do it under GPL license. This applies only to the code, not the data (that you own) you run through the code. You're most likely to remove all text provided with the template and replace it with your own text. The output in the form of a PDF belongs to you only, and you're free to do with it whatever you want.

7
  • 1
    Doesn't this apply to LaTeX as the program, not to the template?
    – Tim Malone
    May 8, 2016 at 20:24
  • I don't think so. After all, classicthesis.sty IS a program that you feed your text (data) to. May 8, 2016 at 22:40
  • Hmm I'm not sure I agree with that - it's a template that you edit, not a program that you feed data to.
    – Tim Malone
    May 9, 2016 at 19:29
  • So, how many words of the original template will remain in the produced pdf? I'd say very few. Thesis being one of them. In the end, you're not redistributing the template itself, only your own data (text) that has been run through classicthesis.sty (and many others). Can someone use your pdf to typeset a new thesis? So in what way are you competing against classic thesis template? May 9, 2016 at 21:06
  • It's got nothing to do with competition - nor with words. The result is typeset with the source code of the original, which in my opinion makes it derivative of it, unless you completely remove the original source (ie don't use the template).
    – Tim Malone
    May 9, 2016 at 21:08
4

Templates and licensing, oh joy.

classicthesis.sty (package/software) defines the layout of the final result. Usually, LaTeX package files are licensed under the LPPL. Classicthesis is under GPL, because using the GPL seems to be cool.

Classicthesis (template, example) also provides an example file, with some dummy text. You are replacing the example text with your ideas, the content is yours. You can license your stuff in any way you see fit. The final result is a pdf (or a printed version), not software. No GPL.

If you modify the files and make them publicly available, for example as code examples in your document, then the content is not yours and you have to obey the license.

Of course i agree, that this whole template business is confusing. The term template for LaTeX isn't even defined. What is a LaTeX template?. If you are interested, you can read about my confusion.

How about all this with the LPPL?

10
  • The sty can be considered as library and the resulting pdf as binary. That means all tex source (even the thesis) is covered by the GPL (compare gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL). The source has to be made available with the PDF - compare gnu.org/licenses/gpl-faq.html#ModifiedJustBinary.
    – koppor
    Jul 23, 2016 at 12:36
  • @koppor And that's why the GPL is not suitable for package files.
    – Johannes_B
    Jul 23, 2016 at 12:38
  • @koppor When i use Microsoft Paint to create a simple image, under wht license is the image?
    – Johannes_B
    Jul 23, 2016 at 12:46
  • Depends on what one wants to achieve. Does one want to have open access to the edge meaning that also the tex source of all scientific publications have to be open? Does one want to enforce that by providing a great template? Or does one want to provide a great template that research, if confidential or not, gets better/fester? See also freebsd.org/doc/en_US.ISO8859-1/articles/bsdl-gpl/article.html for an interesting discussion about that.
    – koppor
    Jul 23, 2016 at 12:54
  • @koppor Good point. I poked André about it.
    – Johannes_B
    Jul 23, 2016 at 12:57
3

The short answer is yes, in my opinion and interpretation (IANAL), you will have to license your thesis under the GPL, version 2 or later (or another compatible license, if you can find one!)


The longer answer:

If you are using the classicthesis template, then in my opinion you are correct, your work is going to be a derivative of that template. The only way to avoid this is to create your thesis from scratch without using the template. It'd be pretty difficult to argue that your work isn't deriviate of it if it has indeed started from it.

There is a clear disagreement on this stance, so in the end you're going to need a make a decision where you stand personally.

If you decide that your work is a derivative, you will then need to comply with all of the GPL's requirements. If the template is licensed under 'GPL2 or later', you can choose to do the same, OR specifically license it as either 'version 2' or 'version 3', OR license it as 'version 3 or later' - the option is entirely up to you.

You'd then need to clearly license your thesis as such, and either provide the LaTeX source when you distribute it or include in the PDF a clearly written offer to provide the source if asked (that written offer provision may suit you well in this case, it'll save you having to worry about distributing the source unless specifically requested!).

This page has more information about how to apply the license.

8
  • 1
    IMHO there is a confusion between the LaTeX code used to generate a template and the actual content of the thesis being or not a derivative work. @leezer3 link to bitbucket.org/amiede/classicthesis/issues/123/gpl-suitable provides IMHO a better answer May 7, 2016 at 18:59
  • One thing is a derivative template that you want to distribute, that'll have to remain under GPL, but here you're just using the code (that you're allowed to change for yourself) to typeset a document consisting of only your words. Your input makes the output also yours. May 8, 2016 at 10:55
  • I definitely agree that "your input" makes the output yours, but I just don't think that the entire thing is "your input" if it's only output that way because of the template you're building upon.
    – Tim Malone
    May 9, 2016 at 19:32
  • 1
    Microsoft Office has templates. Has anyone ever checked under which license those documents have to be released? Who owns them, the author or Microsoft? Even an empty document is a template. It still has a defined format for headings, page number placement, knows how to do headers and footers etc. May 10, 2016 at 2:21
  • 1
    @Johannes_B clearly the problem here is GPL is really not appropriate for styles, as mentioned by many others before. Trying to "bend" the rules to make way for "awkward" cases should not be the way forward. If GPL becomes plastic in this way, then everyone will start abusing it for their own ends. Unfortunately these cases are the price to pay for the creation of such a viral license as GPL; too good for it's own good.
    – glopes
    Jul 25, 2016 at 1:44
2

Standard disclaimer: IANAL, as such this is not legal advice.

The case is actually not clear cut. In my opinion there are two different works here: the design of the template, and the code behind the design of the template. The code does not actually make it into the final output PDF, so the GPL is not actually relevant. The template is what makes it less clear cut. It may very well be that such a template is not creative/original enough to be copyrightable.

We can actually look at another program similar to LaTeX. Lilypond is a music typesetting problem, and its license is GPLv3 (plus a font exception for PDF embedding). Probably no sensible person would argue that the default style of lilypond output requires the output to be GPLv3.

There is a valid question: what is the difference between \documentclass or \usepackage and an import statement in python, that would cause the latter to require GPL compliance? The difference is simple: import introduces a runtime dependency. No dependency is introduced when \documentclass is used.

UPDATE: I see that a lot of the arguments made relies on the architecture of LaTeX. I don't see how this matters - if you use work A to produce work B, whether B is a derivative work of A is a property of B itself, not the process used to produce B. The reason that architecture matters for GPL vs LGPL is that static linking vs dynamic linking produce different works.

6
  • If it were just a .sty file, you would have an argument, but the classicthesis template also contains a number of files that authors are supposed to take as a starting point and make their own changes to. It is those files that make it a template and cause the resulting work to be a derivative of the template. May 22, 2020 at 6:23
  • Whether you are changing the file is irrelevant to the GPL. This is not the LGPL we are talking about.
    – Max Xiong
    May 22, 2020 at 13:16
  • 1
    The author has added this in the package documentation: "We will not demand the sources for theses, books, CVs, etc. that were created using classicthesis."
    – Max Xiong
    May 22, 2020 at 13:23
  • @BartvanIngenSchenau So I think what you are saying is that your modified template tex file must be under the GPL. This is not correct - the modified template tex file must be under the GPL only if it is distributed. The only question here is whether the PDF is a derivative of the ORIGINAL files in the package, and not any modified versions.
    – Max Xiong
    Feb 23, 2021 at 19:57
  • The PDF is related to the LaTeX document by a mechanical transformation. That does not create a new derivative work, but just straight copies the copyright interests over. The document is created by literally modifying a template file. That does create a derivative work. This chain of actions makes the PDF a derivative work of the original template files. Any work that is directly or indirectly derived from a work under the GPL license can only be distributed itself under the GPL license as well. Feb 24, 2021 at 6:25
1

As of 2022-02-27:

PDFs produced with latex and classicthesis shall not be considered derivative works of classicthesis in the sense of the GPL.

More on this issue here https://bitbucket.org/amiede/classicthesis/issues/123/gpl-suitable

However, it's unclear if a lawyer would accept this, because doesn't GPL have clauses saying you can't modify GPLv2 and still call it GPLv2. Also the author hasn't even modified COPYING to reflect that it's no longer GPLv2; or that GPLv2 is not covering certain files and certain targets (e.g., PDF, HTML).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.