34

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!

1

6 Answers 6

38

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

6
  • You forgot the [hidelinks] option to hyperref ;-)
    – kap
    Commented May 9, 2020 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
    Commented May 22, 2020 at 20:04
  • 1
    How would I scale the whole \doclicenseThis down, so it is going to be smaller?
    – nath
    Commented Jun 8, 2020 at 22:32
  • 1
    @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
    Commented Jun 10, 2020 at 20:31
  • One nice thing about this package is that it also includes the license as metadata (XMP) :)
    – a3nm
    Commented Oct 4, 2023 at 15:39
13

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

3
  • Could you explain a bit more about what the package provides? Commented Jan 14, 2016 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
    Commented Apr 22, 2017 at 20:35
  • Fontawesome and fontawesome5 will get you some of these icons, too. Commented Feb 20, 2021 at 20:04
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}
1
  • 1
    I would always go for a vector graphic format for example PDF (or SVG). \includegraphics can handle PDFs as well as PNGs ;)
    – ypid
    Commented Feb 16, 2015 at 18:21
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

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

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .