0

I am trying to compile a beamer presentation featuring the following line:

{\includegraphics[width=\paperwidth, height=\headheight, opacity=0.25]{heads/head3.jpg}}

No errors occur in my ubuntu installation where I have installed texlive-full. However, in another machine where I use Fedora and I have installed texlive-scheme-full I get the following error:

! Package keyval Error: opacity undefined.

Does anyone know if I am missing a package? Is there anything else I can do to get it to work without removing this line?

  • Welcome to TeX.SX. Please, could you provide a minimal but complete working (or not) example? It will be easier to help you. In any case, I think that opacity is not a valid graphicx option. Did you get this line from a working presentation? – Ignasi Nov 20 '14 at 09:15
  • 1
    Welcome to TeX-sx! Please construct a full minimal working example (MWE) of you issue showing what packages you load. The bundles of TeX code that come with different Linux distros don't necessarily have anything like the same content as one another. What would be useful is to add \listfiles to your input and copy the two File list outputs from your log files into the question. My guess is there is a version difference in some package. – Joseph Wright Nov 20 '14 at 09:15
  • This line comes from a working presentation and also worked with my Ubuntu installation. I am afraid I can't upload a MWE since the content of the presentation is confidential. I managed to get it to work with {\transparent{0.75}\includegraphics[width=\paperwidth, height=\headheight]{heads/head3.jpg}} which is probably equivalent. But I would still appreciate it if somebody could tell me whether the opacity option is valid in \includegraphics[] – Panagiotis Nov 20 '14 at 09:24
  • 3
    Apart from head3.jpg, a minimal working example (MWE) can hardly be confidential. – AlexG Nov 20 '14 at 09:27
  • @Panagiotis You can replace confidential information with bogus text to still outline the issue, if you feel it is necessary. – 1010011010 Nov 20 '14 at 09:31
  • 1
    @Panagiotis A minimal example doesn't need to have any real content at all. For example, adding \PassOptionsToPackage{demo}{graphicx} before \documentclass{beamer} will mean that LaTeX will not look for a real image but just use a 'filler', so you don't even need head3.jpg. – Joseph Wright Nov 20 '14 at 09:36
  • This line is included in the .sty file that came with the presentation, I wouldn't know what to remove from there and I do not have permission to share it publicly, I am sorry. Reproducing the error is quite simple (here is an MWE: https://www.writelatex.com/1844779mpqnph) and my question is extremely specific (should I install a package so that I can use opacity in \includegraphics?) – Panagiotis Nov 20 '14 at 09:36
  • @Panagiotis Unsurprisingly that gives an error as opacity isn't a standard graphicx key. The question is therefore why you have a version you say works, for which we do need more information. – Joseph Wright Nov 20 '14 at 09:38
  • @JosephWright I understand, I will have a closer look at the output of my Ubuntu machine and I will share it later today when I have access to it. I would accept that as an answer if nobody had an idea on how opacity can be used as a key. – Panagiotis Nov 20 '14 at 09:47
  • Put \listfiles in your preamble and compile on both machines. It will show the packages used and their version numbers. Install the version of graphicx.sty that's on the working machine onto the non-working machine. – Matthew Leingang Nov 20 '14 at 11:55
  • There was a tune-up in beamer a while ago to not simply ignore unknown keys: I can't be sure, but I wonder if this might be the difference. – Joseph Wright Nov 20 '14 at 12:00

1 Answers1

0

The following compiles also fine in my Ubuntu machine:

\includegraphics[width=\paperwidth, height=\headheight, baby=0.25]{heads/test}

Seems that Fedora has a more up to date version of graphicx package (and/or of some other related package) that does not contain the bug. (Obviously, "baby" does not belong in the keyval options for includegraphics, but the version of graphicx that comes with Ubuntu installations just ignores the issue without even a warning.)

For what it's worth, my Ubuntu installation is quite old, in particular, 10.04, but generally an up to date Fedora has more recent versions of packages than an up to date Ubuntu.

DG'
  • 21,727
hamster
  • 16
  • I have pdfTeX 3.1415926-2.6-1.40.14 (TeX Live 2014/dev) – Panagiotis Nov 20 '14 at 11:48
  • 3
    Doesn't look like an answer. Don't see the relation to opacity. – AlexG Nov 20 '14 at 11:50
  • 2
    @AlexG, well, it is an answer in the sense that you could have anything as a bogus option in ]includegraphics, and it would be ignored. In this case, opacity does not belong to the keyval options either, so it is a bogus option. – hamster Nov 20 '14 at 11:53
  • The OP can use \transparent, as it is explained here: – hamster Nov 20 '14 at 11:54
  • 1
    http://tex.stackexchange.com/questions/86500/includegraphics-set-image-opacity – hamster Nov 20 '14 at 11:55
  • I believe this is the only answer/comment that helped us in reaching a conclusion and since no other answers are available I will accept. I also changed the title of the question so that it makes more sense for future reference. – Panagiotis Nov 21 '14 at 07:56