I am currently writing a technical document with various code listings and diagrams.

I would like to release the actual text under the GNU-FDL license, while keeping the code listings under GNU-GPL V3.0 or later.

From what I have read, I am in my right to release my work under multiple licenses.

My question is now, how do I include the licenses in the repository and document. And how do I state what is released under which license?

My first attempt at writing a license notice led me to the following:

This document is released under the GNU-FDL license.

While all included code listings are released under the GNU-GPL V3.0+ license.

<links to the individual license texts>

I have also read a little bit about the CC BY-SA 4.0 license, but I am less familiar with it.

Any feedback and suggestions will be greatly appreciated!

  • Pedantically: it is the "GNU Free Documentation License", not GNU-FDL license, which would be "GNU Free Documentation License License". Similarly it is just the "GNU General Public License", you don't need another "license" at the end. Feb 9 at 11:41

2 Answers 2


Although I would phrase it a bit differently, your first attempt at a license notice is fine.

If your source code also appears in the (printed) document, I would phrase the license notice as

This document is released under the GNU-FDL license.
The included code listings are also released under the GPL license version 3 or later.

<links to the individual license texts>

The main differences with your version are:

  • I refer to the GPL license in the same way as the license reference that you would add to the source files. Such consistency avoids confusion, but otherwise it is just a textual change.
  • I made the source code dual-licensed under both the FDL and the GPLv3+ (by including the word "also"). I haven't checked all the FDL requirements, but that may make it easier to create hardcopies of the document without having to wonder what hoops to jump through to satisfy the GPLv3 requirements on the source listings. The idea here is that people can choose to apply only the FDL license to that hardcopy.
  • I do something similar for my documents which are a combination of text and source code. Usually I just dual-license the entire work, and include a recommendation that for software the GPL is used and for non-software CC-BY-SA is used (or whatever licenses you prefer). This reduces the amount I "protect the user from themselves", but seems to keep the amount the user has to understand in order to use the work minimal. Feb 26 at 13:15

Online software and television firmware bundles all the license notices in one menu item. Gazillion pages of "PQ software distributed under the Foo License, MN software distributed under the Fizz License, etc."

As a consumer, I would understand the intent if a document author created a license appendix.

Code sample on page 234 copyright Some Dude and released under the Foo license. See hyperlink+text for full license. Etcetera.
Ad nauseum.
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Feb 10 at 16:35

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.