12

I have found the ccicons package to typeset Creative Commons logos, but I'm wondering if there is a package that typesets logos like this one:

CC-BY-NC-ND

If not, how would you do that in TiKz or graphicx?

Edit:

I got the svg version of the logo, converted it to PDF with Inkscape, and I'm using the following line:

\includegraphics[width=4em]{by-nc-nd.eu.pdf}

When I build with xelatex, I get:

! Unable to load picture or PDF file 'by-nc-nd.eu.pdf'.
<to be read again> 
                   }
l.12 ...ncludegraphics[width=4em]{by-nc-nd.eu.pdf}
raphink
  • 31,894
  • 5
    Why not just include the graphic with \includegraphics? – TH. Jun 09 '11 at 12:24
  • I think @TH.'s suggestion is great. In the Creative Commons download section all logos are available in eps or svg. IMHO it's worth a shot. EDIT: Andrey was faster than me. =) – Paulo Cereda Jun 09 '11 at 12:39
  • There is value in finding a way to do this so that there is no dependency on any image files at all. The ccicons package and some tikz should work. However, it's not clear if doing something like that would violate the license for using CC icons in the first place, which seems to say that you have to use image files downloaded from their site. – alex.jordan Jul 15 '15 at 07:33

4 Answers4

16

As TH. mentions, there is really no need to create the logo yourself if there are ready versions (in vector format, too!). Get them here.

You might need to convert the logos to the PDF format.

Andrey Vihrov
  • 22,325
7

I wrote a package which can do this. It has the logos bundled.

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

See: Inserting a Creative Commons Licence into a LaTeX document

ypid
  • 1,299
4

I don't use XeLaTeX, but the error might be because of the .eu in by-nc-nd.eu.pdf. Enclose everything before the file extension in {}:

\includegraphics[width=4em]{{by-nc-nd.eu}.pdf}

Another neat option for converting eps to pdf is the epstopdf package that runs the script of the same name automatically and produces a pdf file that is used for the document:

\documentclass{article}

\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}
\includegraphics[width=4em]{{by-nc-nd.eu}.eps}
\end{document}

Edit:

Related question: \includegraphics: Dots in filename.

(Less directly related questions about problematic file names and paths: How to include graphics with spaces in their path?, Include image with spaces in path directory to be processed with dvips, Specifying an absolute Windows path for \includegraphics)

doncherry
  • 54,637
  • 1
    Thanks @doncherry. @Martin's comment in the other answer actually gave me the hint as to removing the dot in the name, and I used Inkscape to convert from svg to pdf. – raphink Jun 09 '11 at 13:23
  • @Raphink: Yup, I discovered the most recent comments on the other answer the second I after I had posted my answer. I'll leave it up for the sake of epstopdf and the option of not changing the file name but using {}. For that matter, I'm just searching for some related questions on file names that I saw the other day. – doncherry Jun 09 '11 at 13:27
0

With pdflatex --shell-escape file.tex you can include the directly the EPS images availables in Creative Commons with \includegraphics{file.eps}, thus saving time avoiding the manual conversion from SVG to PDF. Another advantage, if you want a file.dvi, is that you can render the same file.tex with latex and pdflatex without making any modification.

With --shell-escape automatically pdflatex make this a copy of the EPS image as file-eps-converted-to.pdf that is used for render correctly the document (In spite that the source LaTeX code is still \includegraphics{file.eps} and not \includegraphics{file-eps-converted-to.pdf}).

In the case by-nc-nd.eu.eps the extra dot is also problematic in this case, but as already stated by Martin Tapankov and doncherry, you can solve easily this renaming the eps file or enclosing the name in {}.

Fran
  • 80,769