33

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!

Dox
  • 5,729
  • As an additional point to this: in addition to adding the license in a human-readable way, you probably want to include it in a machine-readable way as well. The standard for this is XMP. There is a LaTeX package called "xmpincl" for the purpose: https://blogs.igalia.com/juanjo/2006/06/07/embedding-license-info-inside-a-pdf-with-latex/ https://creativecommons.org/2004/06/22/xmpembeddingforpdflatex/ – a3nm Oct 04 '23 at 15:37

6 Answers6

37

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},
]{doclicense}
\begin{document}
\doclicenseThis
\end{document}

enter image description here

ypid
  • 1,299
  • You forgot the [hidelinks] option to hyperref ;-) – kap May 09 '20 at 21:52
  • 1
    @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 08 '20 at 22:32
  • 1
    @nath https://github.com/ypid/latex-packages/issues/30 might help which was recently released. Otherwise, feel free to open an issue at https://github.com/ypid/latex-packages/issues with more input about your use case. – ypid Jun 10 '20 at 20:31
  • One nice thing about this package is that it also includes the license as metadata (XMP) :) – a3nm Oct 04 '23 at 15:39
12

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
 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
 \begin{center}
 \includegraphics[scale=1]{cc-by-sa.png}
 \end{center}\\
 \hline
 \end{tabular}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
  • 1
    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
12

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

Phoebe
  • 240
  • 2
  • 7
9

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]
  This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
  \begin{center}
    \includegraphics[scale=2]{by-nc-sa.pdf}
  \end{center}
\end{mdframed}

\end{document}

The final result was

Logo of the Creative Commons licesnse

Dox
  • 5,729
6

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}

example_output

Droplet
  • 1,282
2

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{...}.
  \doclicenseThis\par}