# Inserting a Creative Commons Licence into a LaTeX document

I'd like to insert a CC license on a manuscript (a book or report). I've seen the page for downloading the CC icons, and also some questions asked in the forum CC logo and Generate CC information.

However, I do not get how to create the actual thing!

Q: Can you please provide an example of a license info page (MWE)? That would be really helpful!

I wrote a package for this as I used something similar as Raniere Silva and I wanted it a bit more clean :)

The package is called doclicense. Check out the following mini example:

\documentclass{article}
\usepackage{hyperref}
\usepackage[
type={CC},
modifier={by-nc-sa},
version={3.0},
\begin{document}
\end{document}


• You forgot the [hidelinks] option to hyperref ;-) – kap May 9 '20 at 21:52
• @kap This depends on your preference. A few reasons for not using hidelinks for this MWE here: This example is not about hyperref. Default options are supposed to be sane. And last but not least, it it actually useful to see here in the screenshot what text is actually a hyperlink. – ypid May 22 '20 at 20:04
• How would I scale the whole \doclicenseThis down, so it is going to be smaller? – nath Jun 8 '20 at 22:32
• @nath github.com/ypid/latex-packages/issues/30 might help which was recently released. Otherwise, feel free to open an issue at github.com/ypid/latex-packages/issues with more input about your use case. – ypid Jun 10 '20 at 20:31

There is a package that do it for you (the documentation is only available in portuguese at the moment): https://gitorious.org/mundo-livre/creative-commons-licenses-for-latex.

For my documents I use the code below in the cover.

 \begin{tabular}{|p{.9\textwidth}|}
\hline
\begin{center}
\includegraphics[scale=1]{cc-by-sa.png}
\end{center}\\
\hline
\end{tabular}

• I would always go for a vector graphic format for example PDF (or SVG). \includegraphics can handle PDFs as well as PNGs ;) – ypid Feb 16 '15 at 18:21

The ccicons LaTeX package provides a set of icons to represent the Creative Commons licenses. There are macros for each icon, as well as shortcuts that allow you to simply drop a specific set of license icons for a license type (e.g., \ccbyncsa will add the CC logo, the attribution icon, the noncommercial (in US dollars) icon, and the share-and-share alike icon)).

Icons are a PostScript Type 1 font, so they scale cleanly.

https://www.ctan.org/pkg/ccicons?lang=en

• Could you explain a bit more about what the package provides? – musarithmia Jan 14 '16 at 19:11
• @muarithmia: For instance, you can use \ccbysa to output icon showing cc by sa. Very simple usage. If you go want to have the "original" figures, go for the doclicense package. – koppor Apr 22 '17 at 20:35

Based on the answer by @raniere-silva, and information on the Creative Commons page, I manage to put the information in a way I liked.

I went to the CC page and download the logo (in svn), based in the kind of license I choose. Using InkScape I transformed into pdf.

\documentclass{book}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}

\definecolor{cccolor}{rgb}{.67,.7,.67}

\begin{document}

\begin{mdframed}[outerlinecolor=black,outerlinewidth=2pt,linecolor=cccolor,middlelinewidth=3pt,roundcorner=10pt]
\begin{center}
\includegraphics[scale=2]{by-nc-sa.pdf}
\end{center}
\end{mdframed}

\end{document}


The final result was

The Creative Commons icons are also included in the Font Awesome font, which is available in LaTeX via the fontawesome5 package:

\documentclass{article}

\usepackage{fontawesome5}

\begin{document}
This answer is under the CC-BY-SA 4.0 International license \faCreativeCommons\ \faCreativeCommonsBy\ \faCreativeCommonsSa
\end{document}


I started using the brilliant https://www.ctan.org/pkg/doclicense package for this. For an article prepared with the amsart class, I wanted the license notice to appear as a footnote. Using \thanks with \doclicenseThis did not work so well, so I ended up using the following:

\maketitle
\insert\footins{% taken from amsart.cls
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep \splitmaxdepth \dp\strutbox
\floatingpenalty10000 \hsize\columnwidth
This is a post-print (accepted manuscript) version of
this paper, which has been published in ... and is
available from \url{...}.