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}
3
  • 5
    Why not just include the graphic with \includegraphics?
    – TH.
    Jun 9, 2011 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. =) Jun 9, 2011 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. Jul 15, 2015 at 7:33

4 Answers 4

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.

5
  • Wouldn't EPS do instead of SVG->PDF?
    – raphink
    Jun 9, 2011 at 12:41
  • @Raphink: You still have to convert it for pdfTeX, etc. (usually it's done automatically). Jun 9, 2011 at 12:45
  • @Andrey: I'm using XeTeX, not pdfTeX, does that make a difference?
    – raphink
    Jun 9, 2011 at 12:48
  • I'm trying with \includegraphics{by-nc-nd.eu}. It doesn't work with either pdf or eps. I'm getting : LaTeX Warning: File by-nc-nd.eu' not found on input line 12.`
    – raphink
    Jun 9, 2011 at 12:50
  • 1
    @Raphink LaTeX gets confused when there is more than one dot in the file name. Rename your {by-nc-nd.eu.eps} to something else and you should be good to go. Jun 9, 2011 at 13:00
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

1
  • It is beautiful! Great job!
    – chejnik
    Mar 2, 2016 at 10:40
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)

2
  • 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 9, 2011 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 9, 2011 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 {}.

You must log in to answer this question.

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